Class EntityObjectCollectionProperty
- Namespace
- TimeCockpit.Data.DataModel
- Assembly
- TimeCockpit.Data.dll
Represents a property that can store a collection of entity objects.
[DataType(typeof(IEnumerable<EntityObject>))]
[Column(typeof(byte[]), SizePropertyName = "MaxStorageSize")]
[DefaultValue(new byte[]{})]
public sealed class EntityObjectCollectionProperty : BinaryProperty, IDynamicMetaObjectProvider, INotifyPropertyChanged, IDataErrorInfo, INullable
- Inheritance
-
ObjectEntityObjectCollectionProperty
- Implements
-
IDynamicMetaObjectProviderINotifyPropertyChangedIDataErrorInfo
- Inherited Members
-
Object.ToString()Object.Equals(Object)Object.Equals(Object, Object)Object.ReferenceEquals(Object, Object)Object.GetHashCode()Object.GetType()Object.MemberwiseClone()
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
public EntityObjectCollectionProperty()
EntityObjectCollectionProperty(IEnumerable<KeyValuePair<Object, Object>>)
Initializes a new instance of the EntityObjectCollectionProperty class
public EntityObjectCollectionProperty(IEnumerable<KeyValuePair<object, object>> properties)
Parameters
propertiesIEnumerable<KeyValuePair<Object, Object>>Collection of properties
EntityObjectCollectionProperty(EntityObjectCollectionProperty)
Initializes a new instance of the EntityObjectCollectionProperty class.
public EntityObjectCollectionProperty(EntityObjectCollectionProperty element)
Parameters
elementEntityObjectCollectionPropertyThe element.
Properties
ClrDefaultValue
Gets the default valud for the datatype for the property.
public override object ClrDefaultValue { get; }
Property Value
- Object
DataType
Gets the datatype for the property.
public override Type DataType { get; }
Property Value
- Type
Methods
Pack(Object, Byte[])
Converts a list of EntityObject objects into it's binary representation
protected override byte[] Pack(object content, byte[] blobEncryptionKey)
Parameters
contentObjectList of entity objects (
IEnumerable<EntityObject>)blobEncryptionKeyByte[]optional encryption key which can be used for storing blobs
Returns
- Byte[]
Binary representation of
content
Unpack(Byte[], Byte[])
Converts the binary content into a list of EntityObject objects.
protected override object Unpack(byte[] content, byte[] blobEncryptionKey)
Parameters
contentByte[]Binary content
blobEncryptionKeyByte[]optional encryption key which can be used for storing blobs
Returns
- Object
List of entity objects (
IEnumerable<EntityObject>)
ValidateValue(Object, out String)
Validates the value for the entity object collection property.
public override bool ValidateValue(object value, out string errorMessage)
Parameters
valueObjectThe value to validate.
errorMessageStringThe error message.
Returns
- Boolean
Returns true.