removes unused methods and internalizes methods we can't expose yet
This commit is contained in:
@@ -69,7 +69,7 @@ namespace Umbraco.Core.Models
|
||||
[IgnoreDataMember]
|
||||
public ISimpleContentType ContentType { get; private set; }
|
||||
|
||||
protected void ChangeContentType(ISimpleContentType contentType)
|
||||
internal void ChangeContentType(ISimpleContentType contentType)
|
||||
{
|
||||
ContentType = contentType;
|
||||
ContentTypeId = contentType.Id;
|
||||
|
||||
@@ -4,19 +4,6 @@ namespace Umbraco.Core.Models
|
||||
{
|
||||
public interface IMedia : IContentBase
|
||||
{
|
||||
/// <summary>
|
||||
/// Changes the <see cref="IMediaType"/> for the current content object
|
||||
/// </summary>
|
||||
/// <param name="contentType">New ContentType for this content</param>
|
||||
/// <remarks>Leaves PropertyTypes intact after change</remarks>
|
||||
void ChangeContentType(IMediaType contentType);
|
||||
|
||||
/// <summary>
|
||||
/// Changes the <see cref="IMediaType"/> for the current content object and removes PropertyTypes,
|
||||
/// which are not part of the new ContentType.
|
||||
/// </summary>
|
||||
/// <param name="contentType">New ContentType for this content</param>
|
||||
/// <param name="clearProperties">Boolean indicating whether to clear PropertyTypes upon change</param>
|
||||
void ChangeContentType(IMediaType contentType, bool clearProperties);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ namespace Umbraco.Core.Models
|
||||
/// </summary>
|
||||
/// <param name="contentType">New MediaType for this Media</param>
|
||||
/// <remarks>Leaves PropertyTypes intact after change</remarks>
|
||||
public void ChangeContentType(IMediaType contentType)
|
||||
internal void ChangeContentType(IMediaType contentType)
|
||||
{
|
||||
ChangeContentType(contentType, false);
|
||||
}
|
||||
@@ -68,7 +68,7 @@ namespace Umbraco.Core.Models
|
||||
/// </summary>
|
||||
/// <param name="contentType">New MediaType for this Media</param>
|
||||
/// <param name="clearProperties">Boolean indicating whether to clear PropertyTypes upon change</param>
|
||||
public void ChangeContentType(IMediaType contentType, bool clearProperties)
|
||||
internal void ChangeContentType(IMediaType contentType, bool clearProperties)
|
||||
{
|
||||
ChangeContentType(new SimpleContentType(contentType));
|
||||
|
||||
@@ -81,16 +81,5 @@ namespace Umbraco.Core.Models
|
||||
Properties.CollectionChanged += PropertiesChanged;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Changes the Trashed state of the content object
|
||||
/// </summary>
|
||||
/// <param name="isTrashed">Boolean indicating whether content is trashed (true) or not trashed (false)</param>
|
||||
/// <param name="parentId"> </param>
|
||||
public void ChangeTrashedState(bool isTrashed, int parentId = -20)
|
||||
{
|
||||
Trashed = isTrashed;
|
||||
//The Media Recycle Bin Id is -21 so we correct that here
|
||||
ParentId = parentId == -20 ? -21 : parentId;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user