Table of Contents

Class RelationIdentifiers

Namespace
TimeCockpit.Data
Assembly
TimeCockpit.Data.dll

Implements a list of relation identifiers

public sealed class RelationIdentifiers : DynamicObject, IDynamicMetaObjectProvider
Inheritance
Object
RelationIdentifiers
Implements
IDynamicMetaObjectProvider
Inherited Members
Object.ToString()
Object.Equals(Object)
Object.Equals(Object, Object)
Object.ReferenceEquals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()

Remarks

A relation can be set on an EntityObject by assigning the referenced EntityObject to the corresponding property. However, there are cases in which you might only have the UUID of the referenced objects. This class implements a list of UUID values that can be used for storing referenced EntityObject instances based on their UUID.

An instance of RelationIdentifiers is closely coupled with EntityObject. It works hand in hand with it.

Properties

Item[String]

Gets or sets the UUID for the specified relation.

public Guid? this[string name] { get; set; }

Parameters

name String

Name of the relation.

Property Value

Nullable<Guid>

UUID of the relation; null if the relation is empty.

Methods

GetMember(String)

Gets the UUID of the specified relation.

public override object GetMember(string name)

Parameters

name String

Name of the relation.

Returns

Object

Returns the UUID of the specified relation.

Remarks

GetMember returns the UUID of the object referenced by the relation with the name name. If an EntityObject instance has been assigned to the relation its ObjectUuid is returned. It the relation is empty (i.e. null) the function returns null.

GetMember(String, Boolean)

Gets the UUID of the specified relation.

public object GetMember(string name, bool ignorePermissions = false)

Parameters

name String

Name of the relation.

ignorePermissions Boolean

Indicates that permissions should not be checked.

Returns

Object

Returns the UUID of the specified relation.

Remarks

GetMember returns the UUID of the object referenced by the relation with the name name. If an EntityObject instance has been assigned to the relation its ObjectUuid is returned. It the relation is empty (i.e. null) the function returns null.

SetMember(String, Object)

Sets the UUID of the specified relation.

public override void SetMember(string name, object value)

Parameters

name String

Name of the relation.

value Object

UUID of the relation; has to be a System.Guid.

Remarks

If an EntityObject has been assigned to the relation previously the reference to this object is deleted. Instead the specified UUID is stored for the relation.

SetMember(String, Object, Boolean)

Sets the UUID of the specified relation.

public void SetMember(string name, object value, bool initialization)

Parameters

name String

Name of the relation.

value Object

UUID of the relation; has to be a System.Guid.

initialization Boolean

Inidicates if SetMember is called during initialization of the object.

Remarks

If an EntityObject has been assigned to the relation previously the reference to this object is deleted. Instead the specified UUID is stored for the relation.

SetMember(String, Object, Boolean, Boolean)

Sets the UUID of the specified relation.

public void SetMember(string name, object value, bool initialization, bool ignoreDefaultValues)

Parameters

name String

Name of the relation.

value Object

UUID of the relation; has to be a System.Guid.

initialization Boolean

Inidicates if SetMember is called during initialization of the object.

ignoreDefaultValues Boolean

Indicates that no default values are set if this flag is set to true. Default is false

Remarks

If an EntityObject has been assigned to the relation previously the reference to this object is deleted. Instead the specified UUID is stored for the relation.

Events

Changed

Occurs when a relation identifier changes.

public event EventHandler<RelationIdentifierChangedEventArgs> Changed

Event Type

EventHandler<RelationIdentifierChangedEventArgs>