Class Property
Represents a property.
Namespace: Umbraco.Core.Models
Assembly: Umbraco.Core.dll
Syntax
[Serializable]
[DataContract(IsReference = true)]
public class Property : EntityBase, IRememberBeingDirty, ICanBeDirty, IEntity, IDeepCloneable
Constructors
View SourceProperty()
Initializes a new instance of the Property class.
Declaration
protected Property()
Property(Int32, PropertyType)
Initializes a new instance of the Property class.
Declaration
public Property(int id, PropertyType propertyType)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | id | |
PropertyType | propertyType |
Property(PropertyType)
Initializes a new instance of the Property class.
Declaration
public Property(PropertyType propertyType)
Parameters
Type | Name | Description |
---|---|---|
PropertyType | propertyType |
Properties
View SourceAlias
Returns the Alias of the PropertyType, which this Property is based on
Declaration
[DataMember]
public string Alias { get; }
Property Value
Type | Description |
---|---|
System.String |
PropertyType
Returns the PropertyType, which this Property is based on
Declaration
[IgnoreDataMember]
public PropertyType PropertyType { get; }
Property Value
Type | Description |
---|---|
PropertyType |
Values
Gets the list of values.
Declaration
[DataMember]
public IReadOnlyCollection<Property.PropertyValue> Values { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyCollection<Property.PropertyValue> |
Methods
View SourceGetValue(String, String, Boolean)
Gets the value.
Declaration
public object GetValue(string culture = null, string segment = null, bool published = false)
Parameters
Type | Name | Description |
---|---|---|
System.String | culture | |
System.String | segment | |
System.Boolean | published |
Returns
Type | Description |
---|---|
System.Object |
PerformDeepClone(Object)
Declaration
protected override void PerformDeepClone(object clone)
Parameters
Type | Name | Description |
---|---|---|
System.Object | clone |
SetValue(Object, String, String)
Sets a value.
Declaration
public void SetValue(object value, string culture = null, string segment = null)
Parameters
Type | Name | Description |
---|---|---|
System.Object | value | |
System.String | culture | |
System.String | segment |