Represents an abstract class for base Content properties and methods
InheritanceSystem.Object
Namespace: Umbraco.Cms.Core.Models Assembly: Umbraco.Core.dll Syntax[DataContract(IsReference = true)]
public abstract class ContentBase : TreeEntityBase, IContentBase, IUmbracoEntity, ITreeEntity, IEntity, IDeepCloneable, IRememberBeingDirty, ICanBeDirty
Constructors View Source ContentBase(String, Int32, IContentTypeComposition, IPropertyCollection, String)
Initializes a new instance of the ContentBase class.
Declarationprotected ContentBase(string name, int parentId, IContentTypeComposition contentType, IPropertyCollection properties, string culture = null)
Parameters View Source ContentBase(String, IContentBase, IContentTypeComposition, IPropertyCollection, String)
Initializes a new instance of the ContentBase class.
Declarationprotected ContentBase(string name, IContentBase parent, IContentTypeComposition contentType, IPropertyCollection properties, string culture = null)
Parameters Properties View Source AvailableCultures
Gets the available cultures.
Declarationpublic IEnumerable<string> AvailableCultures { get; }
Property Value Type Description IEnumerable<System.String> View Source ContentType Declaration
[IgnoreDataMember]
public ISimpleContentType ContentType { get; }
Property Value View Source ContentTypeId
Integer Id of the default ContentType
Declaration[DataMember]
public int ContentTypeId { get; }
Property Value Type Description System.Int32 View Source CultureInfos
Gets culture infos of the content item.
Declaration[DataMember]
public ContentCultureInfosCollection CultureInfos { get; set; }
Property Value View Source Properties
Gets or sets the collection of properties for the entity.
Declaration[DataMember]
public IPropertyCollection Properties { get; set; }
Property Value View Source VersionId Declaration
[IgnoreDataMember]
public int VersionId { get; set; }
Property Value Type Description System.Int32 View Source WriterId
Id of the user who wrote/updated this entity
Declaration[DataMember]
public int WriterId { get; set; }
Property Value Type Description System.Int32 Methods View Source ChangeContentType(ISimpleContentType) Declaration
public void ChangeContentType(ISimpleContentType contentType)
Parameters View Source GetCultureName(String)
Gets the name of the content item for a specified language.
Declarationpublic string GetCultureName(string culture)
Parameters Type Name Description System.String culture Returns Type Description System.String View Source GetDirtyProperties()
Gets properties that are dirty.
Declarationpublic override IEnumerable<string> GetDirtyProperties()
Returns Type Description IEnumerable<System.String> View Source GetUpdateDate(String)
Gets the date a culture was updated.
Declarationpublic DateTime? GetUpdateDate(string culture)
Parameters Type Name Description System.String culture Returns Type Description System.Nullable<DateTime> View Source GetValue(String, String, String, Boolean)
Gets the value of a Property
Declarationpublic object GetValue(string propertyTypeAlias, string culture = null, string segment = null, bool published = false)
Parameters Type Name Description System.String propertyTypeAlias System.String culture System.String segment System.Boolean published Returns Type Description System.Object View Source GetValue<TValue>(String, String, String, Boolean)
Gets the typed value of a Property
Declarationpublic TValue GetValue<TValue>(string propertyTypeAlias, string culture = null, string segment = null, bool published = false)
Parameters Type Name Description System.String propertyTypeAlias System.String culture System.String segment System.Boolean published Returns Type Parameters View Source GetWereDirtyProperties()
Gets properties that were dirty.
Declarationpublic override IEnumerable<string> GetWereDirtyProperties()
Returns Type Description IEnumerable<System.String> View Source HasProperty(String)
Gets a value indicating whether the content entity has a property with the supplied alias.
Declarationpublic bool HasProperty(string propertyTypeAlias)
Parameters Type Name Description System.String propertyTypeAlias Returns Type Description System.Boolean View Source IsCultureAvailable(String)
Gets a value indicating whether a given culture is available.
Declarationpublic bool IsCultureAvailable(string culture)
Parameters Type Name Description System.String culture Returns Type Description System.Boolean View Source IsDirty()
Determines whether the current entity is dirty.
Declarationpublic override bool IsDirty()
Returns Type Description System.Boolean View Source IsEntityDirty()
Gets a value indicating whether the current entity's own properties (not user) are dirty.
Declarationpublic bool IsEntityDirty()
Returns Type Description System.Boolean View Source IsPropertyDirty(String)
Determines whether a specific property is dirty.
Declarationpublic override bool IsPropertyDirty(string propertyName)
Parameters Type Name Description System.String propertyName Returns Type Description System.Boolean View Source PerformDeepClone(Object)
Used by inheritors to modify the DeepCloning logic
Declarationprotected override void PerformDeepClone(object clone)
Parameters Type Name Description System.Object clone View Source PropertiesChanged(Object, NotifyCollectionChangedEventArgs) Declaration
protected void PropertiesChanged(object sender, NotifyCollectionChangedEventArgs e)
Parameters Type Name Description System.Object sender System.Collections.Specialized.NotifyCollectionChangedEventArgs e View Source RemoveValue(String)
Removes a Property value.
Declarationpublic void RemoveValue(string propertyTypeAlias)
Parameters Type Name Description System.String propertyTypeAlias
The alias of the property value to remove.
View Source ResetDirtyProperties(Boolean)Resets dirty properties.
Declarationpublic override void ResetDirtyProperties(bool rememberDirty)
Parameters Type Name Description System.Boolean rememberDirty
A value indicating whether to remember dirty properties.
View Source ResetWereDirtyProperties() Declarationpublic override void ResetWereDirtyProperties()
View Source SetCultureName(String, String)
Sets the name of the content item for a specified culture.
Declarationpublic void SetCultureName(string name, string culture)
Parameters Type Name Description System.String name System.String culture View Source SetValue(String, Object, String, String)
Sets the (edited) value of a Property
Declarationpublic void SetValue(string propertyTypeAlias, object value, string culture = null, string segment = null)
Parameters Type Name Description System.String propertyTypeAlias System.Object value System.String culture System.String segment View Source WasDirty()
Determines whether the current entity is dirty.
Declarationpublic override bool WasDirty()
Returns Type Description System.Boolean View Source WasEntityDirty()
Gets a value indicating whether the current entity's own properties (not user) were dirty.
Declarationpublic bool WasEntityDirty()
Returns Type Description System.Boolean View Source WasPropertyDirty(String)
Determines whether a specific property was dirty.
Declarationpublic override bool WasPropertyDirty(string propertyName)
Parameters Type Name Description System.String propertyName Returns Type Description System.Boolean
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4