Class Media
Represents a Media object
Namespace: Umbraco.Cms.Core.Models
Assembly: Umbraco.Core.dll
Syntax
[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 mediaType)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | name of the Media object |
System.Int32 | parentId | Id of the Parent IMedia |
IMediaType | mediaType | MediaType for the current Media object |
Media(String, Int32, IMediaType, IPropertyCollection)
Constructor for creating a Media object
Declaration
public Media(string name, int parentId, IMediaType mediaType, IPropertyCollection properties)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Name of the Media object |
System.Int32 | parentId | Id of the Parent IMedia |
IMediaType | mediaType | MediaType for the current Media object |
IPropertyCollection | properties | Collection of properties |
Media(String, IMedia, IMediaType)
Constructor for creating a Media object
Declaration
public Media(string name, IMedia parent, IMediaType mediaType)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | name of the Media object |
IMedia | parent | Parent IMedia object |
IMediaType | mediaType | MediaType for the current Media object |
Media(String, IMedia, IMediaType, IPropertyCollection)
Constructor for creating a Media object
Declaration
public Media(string name, IMedia parent, IMediaType mediaType, IPropertyCollection properties)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | name of the Media object |
IMedia | parent | Parent IMedia object |
IMediaType | mediaType | MediaType for the current Media object |
IPropertyCollection | properties | Collection of properties |