Class PropertyType
Inheritance
System.Object
Namespace:System.Dynamic.ExpandoObject
Assembly:Umbraco.Core.dll
Syntax
[Serializable]
[DataContract(IsReference = true)]
public class PropertyType : Entity, IEntity, IDeepCloneable, IRememberBeingDirty, ICanBeDirty, IEquatable<PropertyType>
Constructors
PropertyType(String, DataTypeDatabaseType)
Declaration
public PropertyType(string propertyEditorAlias, DataTypeDatabaseType dataTypeDatabaseType)
Parameters
PropertyType(String, DataTypeDatabaseType, String)
Declaration
public PropertyType(string propertyEditorAlias, DataTypeDatabaseType dataTypeDatabaseType, string propertyTypeAlias)
Parameters
Type |
Name |
Description |
System.String |
propertyEditorAlias |
|
DataTypeDatabaseType |
dataTypeDatabaseType |
|
System.String |
propertyTypeAlias |
|
PropertyType(IDataTypeDefinition)
Declaration
public PropertyType(IDataTypeDefinition dataTypeDefinition)
Parameters
PropertyType(IDataTypeDefinition, String)
Declaration
public PropertyType(IDataTypeDefinition dataTypeDefinition, string propertyTypeAlias)
Parameters
Properties
Alias
Gets of Sets the Alias of the PropertyType
Declaration
[DataMember]
public string Alias { get; set; }
Property Value
Type |
Description |
System.String |
|
DataTypeDefinitionId
Gets of Sets the Id of the DataType (Definition), which the PropertyType is "wrapping"
Declaration
[DataMember]
public int DataTypeDefinitionId { get; set; }
Property Value
Type |
Description |
System.Int32 |
|
DataTypeId
Gets of Sets the Id of the DataType control
Declaration
[Obsolete("Property editor's are defined by a string alias from version 7 onwards, use the PropertyEditorAlias property instead. This method will return a generated GUID for any property editor alias not explicitly mapped to a legacy ID")]
public Guid DataTypeId { get; set; }
Property Value
Type |
Description |
System.Guid |
|
Description
Gets of Sets the Description for the PropertyType
Declaration
[DataMember]
public string Description { get; set; }
Property Value
Type |
Description |
System.String |
|
HelpText
Gets of Sets the Help text for the current PropertyType
Declaration
[DataMember]
[Obsolete("Not used anywhere, will be removed in future versions")]
public string HelpText { get; set; }
Property Value
Type |
Description |
System.String |
|
Mandatory
Gets of Sets the Boolean indicating whether a value for this PropertyType is required
Declaration
[DataMember]
public bool Mandatory { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
Name
Gets of Sets the Name of the PropertyType
Declaration
[DataMember]
public string Name { get; set; }
Property Value
Type |
Description |
System.String |
|
PropertyEditorAlias
Declaration
[DataMember]
public string PropertyEditorAlias { get; set; }
Property Value
Type |
Description |
System.String |
|
SortOrder
Gets of Sets the Sort order of the PropertyType, which is used for sorting within a group
Declaration
[DataMember]
public int SortOrder { get; set; }
Property Value
Type |
Description |
System.Int32 |
|
ValidationRegExp
Gets or Sets the RegEx for validation of legacy DataTypes
Declaration
[DataMember]
public string ValidationRegExp { get; set; }
Property Value
Type |
Description |
System.String |
|
Methods
CreatePropertyFromValue(Object)
Create a new Property object that conforms to the Type of the DataType
and can be validated according to DataType validation / Mandatory-check.
Declaration
public Property CreatePropertyFromValue(object value)
Parameters
Type |
Name |
Description |
System.Object |
value |
|
Returns
DeepClone()
Declaration
public override object DeepClone()
Returns
Type |
Description |
System.Object |
|
Equals(PropertyType)
Declaration
public bool Equals(PropertyType other)
Parameters
Returns
Type |
Description |
System.Boolean |
|
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type |
Description |
System.Int32 |
|
IsPropertyTypeValid(Object)
Gets a value indicating whether the value is of the expected type
for the property, and can be assigned to the property "as is".
Declaration
public bool IsPropertyTypeValid(object value)
Parameters
Type |
Name |
Description |
System.Object |
value |
The value.
|
Returns
Type |
Description |
System.Boolean |
True if the value is of the expected type for the property,
and can be assigned to the property "as is". Otherwise, false, to indicate
that some conversion is required.
|
IsPropertyValueValid(Object)
Validates the Value from a Property according to the validation settings
Declaration
public bool IsPropertyValueValid(object value)
Parameters
Type |
Name |
Description |
System.Object |
value |
|
Returns
Type |
Description |
System.Boolean |
True if valid, otherwise false
|