Class BooleanProperty
Represents a property of type bool in the Time Cockpit data model.
Inheritance
System.Object
BooleanProperty
Implements
System.Dynamic.IDynamicMetaObjectProvider
System.ComponentModel.INotifyPropertyChanged
System.ComponentModel.IDataErrorInfo
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: TimeCockpit.Data.DataModel
Assembly: TimeCockpit.Data.dll
Syntax
[DataType(typeof(bool))]
[Column(typeof(bool))]
[DefaultValue(false)]
[FriendlyTypeName("Boolean")]
public class BooleanProperty : PersistedProperty, IDynamicMetaObjectProvider, INotifyPropertyChanged, IDataErrorInfo, INullable
Constructors
BooleanProperty()
Initializes a new instance of the BooleanProperty class.
Declaration
public BooleanProperty()
BooleanProperty(IEnumerable<KeyValuePair<Object, Object>>)
Initializes a new instance of the BooleanProperty class.
Declaration
public BooleanProperty(IEnumerable<KeyValuePair<object, object>> properties)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<System.Object, System.Object>> | properties | Collection of properties. |
BooleanProperty(BooleanProperty)
Initializes a new instance of the BooleanProperty class.
Declaration
public BooleanProperty(BooleanProperty element)
Parameters
Type | Name | Description |
---|---|---|
BooleanProperty | element | The element. |
Properties
ClrDefaultValue
Gets the default valud for the datatype for the property.
Declaration
public override object ClrDefaultValue { get; }
Property Value
Type | Description |
---|---|
System.Object |
Overrides
DataType
Gets the datatype for the property.
Declaration
public override Type DataType { get; }
Property Value
Type | Description |
---|---|
System.Type |
Overrides
Methods
Convert(Object)
Converts an object to the type of the property.
Declaration
public override object Convert(object value)
Parameters
Type | Name | Description |
---|---|---|
System.Object | value | Object to convert. |
Returns
Type | Description |
---|---|
System.Object | Returns the converted object. |
Overrides
ValidateValue(Object, out String)
Validates that the value is of type System.Boolean or null, if the property is null-able.
Declaration
public override bool ValidateValue(object value, out string errorMessage)
Parameters
Type | Name | Description |
---|---|---|
System.Object | value | The value to validate. |
System.String | errorMessage | The resulting error message, or null if there is none. |
Returns
Type | Description |
---|---|
System.Boolean | Returns true if the value is valid, false otherwise. |