Table of Contents

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
Object
EntityObjectCollectionProperty
Implements
IDynamicMetaObjectProvider
INotifyPropertyChanged
IDataErrorInfo
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

properties IEnumerable<KeyValuePair<Object, Object>>

Collection of properties

EntityObjectCollectionProperty(EntityObjectCollectionProperty)

Initializes a new instance of the EntityObjectCollectionProperty class.

public EntityObjectCollectionProperty(EntityObjectCollectionProperty element)

Parameters

element EntityObjectCollectionProperty

The 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

content Object

List of entity objects (IEnumerable<EntityObject>)

blobEncryptionKey Byte[]

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

content Byte[]

Binary content

blobEncryptionKey Byte[]

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

value Object

The value to validate.

errorMessage String

The error message.

Returns

Boolean

Returns true.