Class RelationIdentifiers
- Namespace
- TimeCockpit.Data
- Assembly
- TimeCockpit.Data.dll
Implements a list of relation identifiers
public sealed class RelationIdentifiers : DynamicObject, IDynamicMetaObjectProvider
- Inheritance
-
ObjectRelationIdentifiers
- 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
nameStringName 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
nameStringName 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
nameStringName of the relation.
ignorePermissionsBooleanIndicates 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
nameStringName of the relation.
valueObjectUUID 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
nameStringName of the relation.
valueObjectUUID of the relation; has to be a System.Guid.
initializationBooleanInidicates 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
nameStringName of the relation.
valueObjectUUID of the relation; has to be a System.Guid.
initializationBooleanInidicates if SetMember is called during initialization of the object.
ignoreDefaultValuesBooleanIndicates 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>