Interface IMedia
Namespace:System.Dynamic.ExpandoObject
Assembly:Umbraco.Core.dll
Syntax
public interface IMedia : IContentBase, IUmbracoEntity, IAggregateRoot, IDeletableEntity, IEntity, IDeepCloneable, IRememberBeingDirty, ICanBeDirty
Properties
ContentType
Gets the ContentType used by this Media object
Declaration
IMediaType ContentType { get; }
Property Value
Type | Description |
---|---|
IMediaType |
Methods
ChangeContentType(IMediaType)
Changes the IMediaType for the current content object
Declaration
void ChangeContentType(IMediaType contentType)
Parameters
Type | Name | Description |
---|---|---|
IMediaType | contentType | New ContentType for this content |
Remarks
Leaves PropertyTypes intact after change
ChangeContentType(IMediaType, Boolean)
Changes the IMediaType for the current content object and removes PropertyTypes, which are not part of the new ContentType.
Declaration
void ChangeContentType(IMediaType contentType, bool clearProperties)
Parameters
Type | Name | Description |
---|---|---|
IMediaType | contentType | New ContentType for this content |
System.Boolean | clearProperties | Boolean indicating whether to clear PropertyTypes upon change |