Class Media
Represents a Media object
Namespace: Umbraco.Core.Models
Assembly: Umbraco.Core.dll
Syntax
[Serializable]
[DataContract(IsReference = true)]
public class Media : ContentBase, IMedia, IContentBase, IUmbracoEntity, ITreeEntity, IEntity, IDeepCloneable, IRememberBeingDirty, ICanBeDirty
Constructors
View SourceMedia(String, Int32, IMediaType)
Constructor for creating a Media object
Declaration
public Media(string name, int parentId, IMediaType contentType)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | name of the Media object |
System.Int32 | parentId | Id of the Parent IMedia |
IMediaType | contentType | MediaType for the current Media object |
Media(String, Int32, IMediaType, PropertyCollection)
Constructor for creating a Media object
Declaration
public Media(string name, int parentId, IMediaType contentType, PropertyCollection properties)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Name of the Media object |
System.Int32 | parentId | Id of the Parent IMedia |
IMediaType | contentType | MediaType for the current Media object |
PropertyCollection | properties | Collection of properties |
Media(String, IMedia, IMediaType)
Constructor for creating a Media object
Declaration
public Media(string name, IMedia parent, IMediaType contentType)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | name of the Media object |
IMedia | parent | Parent IMedia object |
IMediaType | contentType | MediaType for the current Media object |
Media(String, IMedia, IMediaType, PropertyCollection)
Constructor for creating a Media object
Declaration
public Media(string name, IMedia parent, IMediaType contentType, PropertyCollection properties)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | name of the Media object |
IMedia | parent | Parent IMedia object |
IMediaType | contentType | MediaType for the current Media object |
PropertyCollection | properties | Collection of properties |