Class EntityObjectCollectionProperty
Represents a property that can store a collection of entity objects.
Inheritance
Implements
Inherited Members
Namespace: TimeCockpit.Data.DataModel
Assembly: TimeCockpit.Data.dll
Syntax
[DataType(typeof(IEnumerable<EntityObject>))]
[Column(typeof(byte[]), SizePropertyName = "MaxStorageSize")]
[DefaultValue(new byte[]{})]
public sealed class EntityObjectCollectionProperty : BinaryProperty, IDynamicMetaObjectProvider, INotifyPropertyChanged, IDataErrorInfo, INullable
Remarks
This class uses BinaryProperty store store a serialized version of lists of EntityObject objects.
Constructors
EntityObjectCollectionProperty()
Initializes a new instance of the EntityObjectCollectionProperty class
Declaration
public EntityObjectCollectionProperty()
EntityObjectCollectionProperty(IEnumerable<KeyValuePair<Object, Object>>)
Initializes a new instance of the EntityObjectCollectionProperty class
Declaration
public EntityObjectCollectionProperty(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 |
EntityObjectCollectionProperty(EntityObjectCollectionProperty)
Initializes a new instance of the EntityObjectCollectionProperty class.
Declaration
public EntityObjectCollectionProperty(EntityObjectCollectionProperty element)
Parameters
Type | Name | Description |
---|---|---|
EntityObjectCollectionProperty | 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
Pack(Object, Byte[])
Converts a list of EntityObject objects into it's binary representation
Declaration
protected override byte[] Pack(object content, byte[] blobEncryptionKey)
Parameters
Type | Name | Description |
---|---|---|
System.Object | content | List of entity objects ( |
System.Byte[] | blobEncryptionKey | optional encryption key which can be used for storing blobs |
Returns
Type | Description |
---|---|
System.Byte[] | Binary representation of |
Overrides
Unpack(Byte[], Byte[])
Converts the binary content into a list of EntityObject objects.
Declaration
protected override object Unpack(byte[] content, byte[] blobEncryptionKey)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | content | Binary content |
System.Byte[] | blobEncryptionKey | optional encryption key which can be used for storing blobs |
Returns
Type | Description |
---|---|
System.Object | List of entity objects ( |
Overrides
ValidateValue(Object, out String)
Validates the value for the entity object collection property.
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 error message. |
Returns
Type | Description |
---|---|
System.Boolean | Returns true. |