Class MediaType
Represents the content type that a Media object is based on
Namespace:System.Dynamic.ExpandoObject
Assembly:Umbraco.Core.dll
Syntax
[Serializable]
[DataContract(IsReference = true)]
public class MediaType : ContentTypeCompositionBase, IMediaType, IContentTypeComposition, IContentTypeBase, IUmbracoEntity, IAggregateRoot, IDeletableEntity, IEntity, IDeepCloneable, IRememberBeingDirty, ICanBeDirty
Constructors
MediaType(Int32)
Constuctor for creating a MediaType with the parent's id.
Declaration
public MediaType(int parentId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | parentId |
Remarks
Only use this for creating MediaTypes at the root (with ParentId -1).
MediaType(IMediaType)
Constuctor for creating a MediaType with the parent as an inherited type.
Declaration
public MediaType(IMediaType parent)
Parameters
Type | Name | Description |
---|---|---|
IMediaType | parent |
Remarks
Use this to ensure inheritance from parent.
MediaType(IMediaType, String)
Constuctor for creating a MediaType with the parent as an inherited type.
Declaration
public MediaType(IMediaType parent, string alias)
Parameters
Type | Name | Description |
---|---|---|
IMediaType | parent | |
System.String | alias |
Remarks
Use this to ensure inheritance from parent.
Methods
DeepCloneWithResetIdentities(String)
Creates a deep clone of the current entity with its identity/alias and it's property identities reset
Declaration
public IMediaType DeepCloneWithResetIdentities(string alias)
Parameters
Type | Name | Description |
---|---|---|
System.String | alias |
Returns
Type | Description |
---|---|
IMediaType |