Media
The Media class represents a single item in the media tree.
using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Core.Services;Constructors
new Media(string name, IMedia parent, IMediaType mediaType)
new Media(string name, IMedia parent, IMediaType mediaType, IPropertyCollection properties)
new Media(string name, int parentId, IMediaType mediaType)
new Media(string name, int parentId, IMediaType mediaType, IPropertyCollection properties)
Properties
.CreateDate
.CreatorId
.ContentType
.ContentTypeId
.Id
.Key
.Level
.Name
.ParentId
.Path
.Properties
.SortOrder
.Trashed
.UpdateDate
.Version
Methods
.ChangeContentType(IMediaType mediaType)
.GetCreatorProfile()
.GetValue(string propertyTypeAlias)
.GetValue< TPassType >(string propertyTypeAlias)
.HasProperty(string propertyTypeAlias)
.SetValue(string propertyTypeAlias, object value)
.ToXml()
Last updated
Was this helpful?