Search Results for

    Show / Hide Table of Contents
    View Source

    Class Property

    Represents a property.

    Inheritance
    System.Object
    BeingDirtyBase
    EntityBase
    Namespace: Umbraco.Cms.Core.Models
    Assembly: Umbraco.Core.dll
    Syntax
    public class Property : EntityBase, IProperty, IEntity, IDeepCloneable, IRememberBeingDirty, ICanBeDirty

    Constructors

    View Source

    Property()

    Initializes a new instance of the Property class.

    Declaration
    protected Property()
    View Source

    Property(Int32, IPropertyType)

    Initializes a new instance of the Property class.

    Declaration
    public Property(int id, IPropertyType propertyType)
    Parameters
    Type Name Description
    System.Int32 id
    IPropertyType propertyType
    View Source

    Property(IPropertyType)

    Initializes a new instance of the Property class.

    Declaration
    public Property(IPropertyType propertyType)
    Parameters
    Type Name Description
    IPropertyType propertyType

    Properties

    View Source

    Alias

    Returns the Alias of the PropertyType, which this Property is based on

    Declaration
    public string Alias { get; }
    Property Value
    Type Description
    System.String
    View Source

    PropertyType

    Returns the PropertyType, which this Property is based on

    Declaration
    public IPropertyType PropertyType { get; }
    Property Value
    Type Description
    IPropertyType
    View Source

    PropertyTypeId

    Returns the Id of the PropertyType, which this Property is based on

    Declaration
    public int PropertyTypeId { get; }
    Property Value
    Type Description
    System.Int32
    View Source

    Values

    Gets the list of values.

    Declaration
    public IReadOnlyCollection<IPropertyValue> Values { get; set; }
    Property Value
    Type Description
    IReadOnlyCollection<IPropertyValue>
    View Source

    ValueStorageType

    Returns the DatabaseType that the underlaying DataType is using to store its values

    Declaration
    public ValueStorageType ValueStorageType { get; }
    Property Value
    Type Description
    ValueStorageType
    Remarks

    Only used internally when saving the property value.

    Methods

    View Source

    ConvertAssignedValue(Object)

    Declaration
    public object ConvertAssignedValue(object value)
    Parameters
    Type Name Description
    System.Object value
    Returns
    Type Description
    System.Object
    View Source

    CreateWithValues(Int32, IPropertyType, Property.InitialPropertyValue[])

    Creates a new Property instance for existing IProperty

    Declaration
    public static Property CreateWithValues(int id, IPropertyType propertyType, params Property.InitialPropertyValue[] values)
    Parameters
    Type Name Description
    System.Int32 id
    IPropertyType propertyType
    Property.InitialPropertyValue[] values

    Generally will contain a published and an unpublished property values

    Returns
    Type Description
    Property
    View Source

    GetValue(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
    View Source

    PerformDeepClone(Object)

    Declaration
    protected override void PerformDeepClone(object clone)
    Parameters
    Type Name Description
    System.Object clone
    View Source

    PublishValues(String, String)

    Declaration
    public void PublishValues(string culture = "*", string segment = "*")
    Parameters
    Type Name Description
    System.String culture
    System.String segment
    View Source

    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
    View Source

    UnpublishValues(String, String)

    Declaration
    public void UnpublishValues(string culture = "*", string segment = "*")
    Parameters
    Type Name Description
    System.String culture
    System.String segment
    • Improve this Doc
    • View Source
    In This Article
    • Constructors
      • Property()
      • Property(Int32, IPropertyType)
      • Property(IPropertyType)
    • Properties
      • Alias
      • PropertyType
      • PropertyTypeId
      • Values
      • ValueStorageType
    • Methods
      • ConvertAssignedValue(Object)
      • CreateWithValues(Int32, IPropertyType, Property.InitialPropertyValue[])
      • GetValue(String, String, Boolean)
      • PerformDeepClone(Object)
      • PublishValues(String, String)
      • SetValue(Object, String, String)
      • UnpublishValues(String, String)
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX