View Source
Class Property
Assembly: Umbraco.Core.dll
Syntax
[Serializable]
[DataContract(IsReference = true)]
public class Property : EntityBase, IProperty, IEntity, IDeepCloneable, IRememberBeingDirty, ICanBeDirty
Constructors
View Source
Property(int, IPropertyType)
Initializes a new instance of the Property class.
Declaration
public Property(int id, IPropertyType propertyType)
Parameters
View Source
Property(IPropertyType)
Initializes a new instance of the Property class.
Declaration
public Property(IPropertyType propertyType)
Parameters
Properties
View Source
Alias
Returns the Alias of the PropertyType, which this Property is based on
Declaration
[DataMember]
public string Alias { get; }
Property Value
View Source
PropertyType
Returns the PropertyType, which this Property is based on
Declaration
[IgnoreDataMember]
public IPropertyType PropertyType { get; }
Property Value
View Source
PropertyTypeId
Returns the Id of the PropertyType, which this Property is based on
Declaration
[IgnoreDataMember]
public int PropertyTypeId { get; }
Property Value
View Source
ValueStorageType
Returns the DatabaseType that the underlaying DataType is using to store its values
Declaration
[IgnoreDataMember]
public ValueStorageType ValueStorageType { get; }
Property Value
View Source
Values
Declaration
[DataMember]
public IReadOnlyCollection<IPropertyValue> Values { get; set; }
Property Value
Methods
View Source
ConvertAssignedValue(object?)
Declaration
public object? ConvertAssignedValue(object? value)
Parameters
| Type |
Name |
Description |
| object |
value |
|
Returns
View Source
CreateWithValues(int, IPropertyType, params InitialPropertyValue[])
Declaration
public static Property CreateWithValues(int id, IPropertyType propertyType, params Property.InitialPropertyValue[] values)
Parameters
Returns
View Source
GetValue(string?, string?, bool)
Declaration
public object? GetValue(string? culture = null, string? segment = null, bool published = false)
Parameters
| Type |
Name |
Description |
| string |
culture |
|
| string |
segment |
|
| bool |
published |
|
Returns
View Source
Used by inheritors to modify the DeepCloning logic
Declaration
protected override void PerformDeepClone(object clone)
Parameters
| Type |
Name |
Description |
| object |
clone |
|
View Source
PublishPartialValues(IDataEditor, string?)
Declaration
public void PublishPartialValues(IDataEditor dataEditor, string? culture)
Parameters
| Type |
Name |
Description |
| IDataEditor |
dataEditor |
|
| string |
culture |
|
View Source
PublishValues(string?, string?)
Declaration
public void PublishValues(string? culture = "*", string? segment = "*")
Parameters
| Type |
Name |
Description |
| string |
culture |
|
| string |
segment |
|
View Source
SetValue(object?, string?, string?)
Declaration
public bool SetValue(object? value, string? culture = null, string? segment = null)
Parameters
| Type |
Name |
Description |
| object |
value |
|
| string |
culture |
|
| string |
segment |
|
Returns
| Type |
Description |
| bool |
true if the value was set (updated), false otherwise.
|
View Source
UnpublishValues(string?, string?)
Declaration
public void UnpublishValues(string? culture = "*", string? segment = "*")
Parameters
| Type |
Name |
Description |
| string |
culture |
|
| string |
segment |
|