Search Results for

    Show / Hide Table of Contents

    Class RelationIdentifiers

    Implements a list of relation identifiers

    Inheritance
    System.Object
    DynamicObject
    RelationIdentifiers
    Implements
    System.Dynamic.IDynamicMetaObjectProvider
    Inherited Members
    DynamicObject.GetMetaObject(Expression)
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: TimeCockpit.Data
    Assembly: TimeCockpit.Data.dll
    Syntax
    public sealed class RelationIdentifiers : DynamicObject, IDynamicMetaObjectProvider
    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.

    Declaration
    public Guid? this[string name] { get; set; }
    Parameters
    Type Name Description
    System.String name

    Name of the relation.

    Property Value
    Type Description
    System.Nullable<System.Guid>

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

    Methods

    GetMember(String)

    Gets the UUID of the specified relation.

    Declaration
    public override object GetMember(string name)
    Parameters
    Type Name Description
    System.String name

    Name of the relation.

    Returns
    Type Description
    System.Object

    Returns the UUID of the specified relation.

    Overrides
    DynamicObject.GetMember(String)
    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.

    Declaration
    public object GetMember(string name, bool ignorePermissions = false)
    Parameters
    Type Name Description
    System.String name

    Name of the relation.

    System.Boolean ignorePermissions

    Indicates that permissions should not be checked.

    Returns
    Type Description
    System.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.

    Declaration
    public override void SetMember(string name, object value)
    Parameters
    Type Name Description
    System.String name

    Name of the relation.

    System.Object value

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

    Overrides
    DynamicObject.SetMember(String, 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)

    Sets the UUID of the specified relation.

    Declaration
    public void SetMember(string name, object value, bool initialization)
    Parameters
    Type Name Description
    System.String name

    Name of the relation.

    System.Object value

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

    System.Boolean initialization

    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.

    Declaration
    public void SetMember(string name, object value, bool initialization, bool ignoreDefaultValues)
    Parameters
    Type Name Description
    System.String name

    Name of the relation.

    System.Object value

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

    System.Boolean initialization

    Inidicates if SetMember is called during initialization of the object.

    System.Boolean ignoreDefaultValues

    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.

    Declaration
    public event EventHandler<RelationIdentifierChangedEventArgs> Changed
    Event Type
    Type Description
    System.EventHandler<RelationIdentifierChangedEventArgs>
    In This Article
    Back to top Copyright © 2020 software architects gmbh