Skip to content

DiGi.Core.Relation.Classes

github-actions[bot] edited this page Jul 15, 2026 · 2 revisions

DiGi.Core.Relation.Classes Namespace

Classes

ManyToManyRelation Class

Represents an abstract many-to-many relationship between unique objects.

public abstract class ManyToManyRelation : DiGi.Core.Relation.Classes.ManyToManyRelation<DiGi.Core.Interfaces.IUniqueObject, DiGi.Core.Interfaces.IUniqueObject>

Inheritance System.ObjectDiGi.Core.Classes.ObjectDiGi.Core.Classes.SerializableObjectRelationDiGi.Core.Relation.Classes.Relation<DiGi.Core.Interfaces.IUniqueObject,DiGi.Core.Interfaces.IUniqueObject>DiGi.Core.Relation.Classes.ManyToManyRelation<DiGi.Core.Interfaces.IUniqueObject,DiGi.Core.Interfaces.IUniqueObject> → ManyToManyRelation

Constructors

ManyToManyRelation(ManyToManyRelation) Constructor

Creates a new instance of the ManyToManyRelation class by copying another instance.

public ManyToManyRelation(DiGi.Core.Relation.Classes.ManyToManyRelation? manyToManyRelation);

Parameters

manyToManyRelation ManyToManyRelation

The existing ManyToManyRelation instance to copy from.

ManyToManyRelation(IEnumerable<IUniqueObject>, IEnumerable<IUniqueObject>) Constructor

Creates a new instance of the ManyToManyRelation class from unique objects.

public ManyToManyRelation(System.Collections.Generic.IEnumerable<DiGi.Core.Interfaces.IUniqueObject>? uniqueObjects_From, System.Collections.Generic.IEnumerable<DiGi.Core.Interfaces.IUniqueObject>? uniqueObjects_To);

Parameters

uniqueObjects_From System.Collections.Generic.IEnumerable<DiGi.Core.Interfaces.IUniqueObject>

The collection of unique objects representing the source side of the relation.

uniqueObjects_To System.Collections.Generic.IEnumerable<DiGi.Core.Interfaces.IUniqueObject>

The collection of unique objects representing the target side of the relation.

ManyToManyRelation(IEnumerable<IUniqueReference>, IEnumerable<IUniqueReference>) Constructor

Creates a new instance of the ManyToManyRelation class from unique references.

public ManyToManyRelation(System.Collections.Generic.IEnumerable<DiGi.Core.Interfaces.IUniqueReference>? uniqueReferences_From, System.Collections.Generic.IEnumerable<DiGi.Core.Interfaces.IUniqueReference>? uniqueReferences_To);

Parameters

uniqueReferences_From System.Collections.Generic.IEnumerable<DiGi.Core.Interfaces.IUniqueReference>

The collection of unique references representing the source side of the relation.

uniqueReferences_To System.Collections.Generic.IEnumerable<DiGi.Core.Interfaces.IUniqueReference>

The collection of unique references representing the target side of the relation.

ManyToManyRelation(JsonObject) Constructor

Creates a new instance of the ManyToManyRelation class from a JSON object.

public ManyToManyRelation(System.Text.Json.Nodes.JsonObject? jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The JSON object to create the relation from.

ManyToManyRelation<From,To> Class

Represents an abstract many-to-many relationship between two types of unique objects.

public abstract class ManyToManyRelation<From,To> : DiGi.Core.Relation.Classes.Relation<From, To>, DiGi.Core.Relation.Interfaces.IManyToManyRelation<From, To>, DiGi.Core.Relation.Interfaces.IManyToManyRelation, DiGi.Core.Relation.Interfaces.IRelation, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObject, DiGi.Core.Relation.Interfaces.IRelation<From, To>
    where From : DiGi.Core.Interfaces.IUniqueObject
    where To : DiGi.Core.Interfaces.IUniqueObject

Type parameters

From

The type of the source objects in the relation.

To

The type of the destination objects in the relation.

Inheritance System.ObjectDiGi.Core.Classes.ObjectDiGi.Core.Classes.SerializableObjectRelationDiGi.Core.Relation.Classes.Relation<From,To> → ManyToManyRelation<From,To>

Derived
ManyToManyRelation

Implements DiGi.Core.Relation.Interfaces.IManyToManyRelation<From,To>, IManyToManyRelation, IRelation, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObject, DiGi.Core.Relation.Interfaces.IRelation<From,To>

Constructors

ManyToManyRelation(ManyToManyRelation<From,To>) Constructor

Creates a new instance of the ManyToManyRelation class by copying another instance.

public ManyToManyRelation(DiGi.Core.Relation.Classes.ManyToManyRelation<From,To>? manyToManyRelation);

Parameters

manyToManyRelation DiGi.Core.Relation.Classes.ManyToManyRelation<From,To>

The existing relation instance to copy from.

ManyToManyRelation(IEnumerable<IUniqueReference>, IEnumerable<IUniqueReference>) Constructor

Creates a new instance of the ManyToManyRelation class from unique references.

public ManyToManyRelation(System.Collections.Generic.IEnumerable<DiGi.Core.Interfaces.IUniqueReference>? uniqueReferences_From, System.Collections.Generic.IEnumerable<DiGi.Core.Interfaces.IUniqueReference>? uniqueReferences_To);

Parameters

uniqueReferences_From System.Collections.Generic.IEnumerable<DiGi.Core.Interfaces.IUniqueReference>

The collection of unique references from the source side.

uniqueReferences_To System.Collections.Generic.IEnumerable<DiGi.Core.Interfaces.IUniqueReference>

The collection of unique references from the destination side.

ManyToManyRelation(IEnumerable<From>, IEnumerable<To>) Constructor

Creates a new instance of the ManyToManyRelation class from unique objects.

public ManyToManyRelation(System.Collections.Generic.IEnumerable<From>? uniqueObjects_From, System.Collections.Generic.IEnumerable<To>? uniqueObjects_To);

Parameters

uniqueObjects_From System.Collections.Generic.IEnumerable<From>

The collection of unique objects from the source side.

uniqueObjects_To System.Collections.Generic.IEnumerable<To>

The collection of unique objects from the destination side.

ManyToManyRelation(JsonObject) Constructor

Creates a new instance of the ManyToManyRelation class from a JSON object.

public ManyToManyRelation(System.Text.Json.Nodes.JsonObject? jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The JSON object to create the relation from.

Properties

ManyToManyRelation<From,To>.UniqueReferences Property

Gets a list containing all unique references in this relation.

public override System.Collections.Generic.List<DiGi.Core.Interfaces.IUniqueReference>? UniqueReferences { get; }

Implements UniqueReferences

Property Value

System.Collections.Generic.List<DiGi.Core.Interfaces.IUniqueReference>

ManyToManyRelation<From,To>.UniqueReferences_From Property

Gets a list of unique references on the "from" side of the relation.

public System.Collections.Generic.List<DiGi.Core.Interfaces.IUniqueReference>? UniqueReferences_From { get; }

Implements UniqueReferences_From

Property Value

System.Collections.Generic.List<DiGi.Core.Interfaces.IUniqueReference>

ManyToManyRelation<From,To>.UniqueReferences_To Property

Gets a list of unique references on the "to" side of the relation.

public System.Collections.Generic.List<DiGi.Core.Interfaces.IUniqueReference>? UniqueReferences_To { get; }

Implements UniqueReferences_To

Property Value

System.Collections.Generic.List<DiGi.Core.Interfaces.IUniqueReference>

Methods

ManyToManyRelation<From,To>.Add(RelationSide, IUniqueReference) Method

Adds a unique reference to the specified side of the relation.

public override bool Add(DiGi.Core.Relation.Enums.RelationSide relationSide, DiGi.Core.Interfaces.IUniqueReference? uniqueReference);

Parameters

relationSide RelationSide

The side of the relation where the reference should be added.

uniqueReference DiGi.Core.Interfaces.IUniqueReference

The unique reference to add.

Returns

System.Boolean
True if the reference was successfully added; otherwise, false.

ManyToManyRelation<From,To>.Contains(RelationSide, IUniqueReference) Method

Determines whether the relation contains the specified unique reference on the given side.

public override bool Contains(DiGi.Core.Relation.Enums.RelationSide relationSide, DiGi.Core.Interfaces.IUniqueReference? uniqueReference);

Parameters

relationSide RelationSide

The side of the relation to check.

uniqueReference DiGi.Core.Interfaces.IUniqueReference

The unique reference to locate in the relation.

Implements Contains(RelationSide, IUniqueReference)

Returns

System.Boolean
True if the relation contains the specified unique reference on the given side; otherwise, false.

ManyToManyRelation<From,To>.Has(RelationSide) Method

Determines whether the relation has a reference on the specified side.

public override bool Has(DiGi.Core.Relation.Enums.RelationSide relationSide);

Parameters

relationSide RelationSide

The side of the relation to check.

Implements Has(RelationSide)

Returns

System.Boolean
True if the relation has a reference on the specified side; otherwise, false.

ManyToManyRelation<From,To>.Remove(RelationSide, IUniqueReference) Method

Removes a unique reference from the specified side of the relation.

public override bool Remove(DiGi.Core.Relation.Enums.RelationSide relationSide, DiGi.Core.Interfaces.IUniqueReference? uniqueReference);

Parameters

relationSide RelationSide

The side of the relation to remove the reference from.

uniqueReference DiGi.Core.Interfaces.IUniqueReference

The unique reference to remove.

Implements Remove(RelationSide, IUniqueReference)

Returns

System.Boolean
True if the reference was successfully removed; otherwise, false.

ManyToManyRelation<From,To>.Remove<TUniqueReference>(RelationSide, IEnumerable<TUniqueReference>) Method

Removes multiple unique references from the specified side of the relation.

public override System.Collections.Generic.List<TUniqueReference>? Remove<TUniqueReference>(DiGi.Core.Relation.Enums.RelationSide relationSide, System.Collections.Generic.IEnumerable<TUniqueReference>? uniqueReferences)
    where TUniqueReference : DiGi.Core.Interfaces.IUniqueReference;

Type parameters

TUniqueReference

The type of the unique reference.

Parameters

relationSide RelationSide

The side of the relation to remove references from.

uniqueReferences System.Collections.Generic.IEnumerable<TUniqueReference>

The collection of unique references to remove.

Implements Remove<TUniqueReference>(RelationSide, IEnumerable<TUniqueReference>)

Returns

System.Collections.Generic.List<TUniqueReference>
A list of removed unique references, or null if none were removed.

ManyToOneRelation Class

Represents an abstract many-to-one relationship between unique objects.

public abstract class ManyToOneRelation : DiGi.Core.Relation.Classes.ManyToOneRelation<DiGi.Core.Interfaces.IUniqueObject, DiGi.Core.Interfaces.IUniqueObject>

Inheritance System.ObjectDiGi.Core.Classes.ObjectDiGi.Core.Classes.SerializableObjectRelationDiGi.Core.Relation.Classes.Relation<DiGi.Core.Interfaces.IUniqueObject,DiGi.Core.Interfaces.IUniqueObject>DiGi.Core.Relation.Classes.ManyToOneRelation<DiGi.Core.Interfaces.IUniqueObject,DiGi.Core.Interfaces.IUniqueObject> → ManyToOneRelation

Constructors

ManyToOneRelation(ManyToOneRelation) Constructor

Creates a new instance of the ManyToOneRelation class by copying another instance.

public ManyToOneRelation(DiGi.Core.Relation.Classes.ManyToOneRelation? manyToOneRelation);

Parameters

manyToOneRelation ManyToOneRelation

The existing relation instance to copy from.

ManyToOneRelation(IEnumerable<IUniqueObject>, IUniqueObject) Constructor

Creates a new instance of the ManyToOneRelation class from unique objects.

public ManyToOneRelation(System.Collections.Generic.IEnumerable<DiGi.Core.Interfaces.IUniqueObject>? uniqueObjects_From, DiGi.Core.Interfaces.IUniqueObject? uniqueObject_To);

Parameters

uniqueObjects_From System.Collections.Generic.IEnumerable<DiGi.Core.Interfaces.IUniqueObject>

The collection of unique objects representing the 'many' side of the relation.

uniqueObject_To DiGi.Core.Interfaces.IUniqueObject

The unique object representing the 'one' side of the relation.

ManyToOneRelation(IEnumerable<IUniqueReference>, IUniqueReference) Constructor

Creates a new instance of the ManyToOneRelation class from unique references.

public ManyToOneRelation(System.Collections.Generic.IEnumerable<DiGi.Core.Interfaces.IUniqueReference>? uniqueReferences_From, DiGi.Core.Interfaces.IUniqueReference? uniqueReference_To);

Parameters

uniqueReferences_From System.Collections.Generic.IEnumerable<DiGi.Core.Interfaces.IUniqueReference>

The collection of unique references representing the 'many' side of the relation.

uniqueReference_To DiGi.Core.Interfaces.IUniqueReference

The unique reference representing the 'one' side of the relation.

ManyToOneRelation(JsonObject) Constructor

Creates a new instance of the ManyToOneRelation class from a JSON object.

public ManyToOneRelation(System.Text.Json.Nodes.JsonObject? jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The JSON object to create the relation from.

ManyToOneRelation<From,To> Class

Represents an abstract many-to-one relationship between two types of unique objects.

public abstract class ManyToOneRelation<From,To> : DiGi.Core.Relation.Classes.Relation<From, To>, DiGi.Core.Relation.Interfaces.IManyToOneRelation<From, To>, DiGi.Core.Relation.Interfaces.IManyToOneRelation, DiGi.Core.Relation.Interfaces.IRelation, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObject, DiGi.Core.Relation.Interfaces.IRelation<From, To>
    where From : DiGi.Core.Interfaces.IUniqueObject
    where To : DiGi.Core.Interfaces.IUniqueObject

Type parameters

From

The type of the unique objects on the 'many' side.

To

The type of the unique object on the 'one' side.

Inheritance System.ObjectDiGi.Core.Classes.ObjectDiGi.Core.Classes.SerializableObjectRelationDiGi.Core.Relation.Classes.Relation<From,To> → ManyToOneRelation<From,To>

Derived
ManyToOneRelation

Implements DiGi.Core.Relation.Interfaces.IManyToOneRelation<From,To>, IManyToOneRelation, IRelation, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObject, DiGi.Core.Relation.Interfaces.IRelation<From,To>

Constructors

ManyToOneRelation(ManyToOneRelation<From,To>) Constructor

Creates a new instance of the ManyToOneRelation class by copying another instance.

public ManyToOneRelation(DiGi.Core.Relation.Classes.ManyToOneRelation<From,To>? manyToOneRelation);

Parameters

manyToOneRelation DiGi.Core.Relation.Classes.ManyToOneRelation<From,To>

The existing relation to copy from.

ManyToOneRelation(IEnumerable<IUniqueReference>, IUniqueReference) Constructor

Creates a new instance of the ManyToOneRelation class from unique references.

public ManyToOneRelation(System.Collections.Generic.IEnumerable<DiGi.Core.Interfaces.IUniqueReference>? uniqueReferences_From, DiGi.Core.Interfaces.IUniqueReference? uniqueReference_To);

Parameters

uniqueReferences_From System.Collections.Generic.IEnumerable<DiGi.Core.Interfaces.IUniqueReference>

The collection of unique references on the 'many' side.

uniqueReference_To DiGi.Core.Interfaces.IUniqueReference

The unique reference on the 'one' side.

ManyToOneRelation(IEnumerable<From>, To) Constructor

Creates a new instance of the ManyToOneRelation class from unique objects.

public ManyToOneRelation(System.Collections.Generic.IEnumerable<From>? uniqueObjects_From, To? uniqueObject_To);

Parameters

uniqueObjects_From System.Collections.Generic.IEnumerable<From>

The collection of unique objects on the 'many' side.

uniqueObject_To To

The unique object on the 'one' side.

ManyToOneRelation(JsonObject) Constructor

Creates a new instance of the ManyToOneRelation class from a JSON object.

public ManyToOneRelation(System.Text.Json.Nodes.JsonObject? jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The JSON object to create the relation from.

Properties

ManyToOneRelation<From,To>.UniqueReferences Property

Gets a list containing all unique references in this relation.

public override System.Collections.Generic.List<DiGi.Core.Interfaces.IUniqueReference>? UniqueReferences { get; }

Implements UniqueReferences

Property Value

System.Collections.Generic.List<DiGi.Core.Interfaces.IUniqueReference>

ManyToOneRelation<From,To>.UniqueReferences_From Property

Gets a list of unique references on the "from" side of the relation.

public System.Collections.Generic.List<DiGi.Core.Interfaces.IUniqueReference>? UniqueReferences_From { get; }

Implements UniqueReferences_From

Property Value

System.Collections.Generic.List<DiGi.Core.Interfaces.IUniqueReference>

ManyToOneRelation<From,To>.UniqueReference_To Property

Gets the unique reference to the target object.

public DiGi.Core.Interfaces.IUniqueReference? UniqueReference_To { get; }

Implements UniqueReference_To

Property Value

DiGi.Core.Interfaces.IUniqueReference

Methods

ManyToOneRelation<From,To>.Add(RelationSide, IUniqueReference) Method

Adds a unique reference to the specified side of the relation.

public override bool Add(DiGi.Core.Relation.Enums.RelationSide relationSide, DiGi.Core.Interfaces.IUniqueReference? uniqueReference);

Parameters

relationSide RelationSide

The side of the relation to add the reference to.

uniqueReference DiGi.Core.Interfaces.IUniqueReference

The unique reference to add.

Returns

System.Boolean
True if the reference was successfully added; otherwise, false.

ManyToOneRelation<From,To>.Contains(RelationSide, IUniqueReference) Method

Determines whether the relation contains the specified unique reference on the given side.

public override bool Contains(DiGi.Core.Relation.Enums.RelationSide relationSide, DiGi.Core.Interfaces.IUniqueReference? uniqueReference);

Parameters

relationSide RelationSide

The side of the relation to check.

uniqueReference DiGi.Core.Interfaces.IUniqueReference

The unique reference to locate.

Implements Contains(RelationSide, IUniqueReference)

Returns

System.Boolean
True if the relation contains the specified unique reference on the given side; otherwise, false.

ManyToOneRelation<From,To>.Has(RelationSide) Method

Determines whether the relation has a reference on the specified side.

public override bool Has(DiGi.Core.Relation.Enums.RelationSide relationSide);

Parameters

relationSide RelationSide

The side of the relation to check.

Implements Has(RelationSide)

Returns

System.Boolean
True if the relation has a reference on the specified side; otherwise, false.

ManyToOneRelation<From,To>.Remove(RelationSide, IUniqueReference) Method

Removes a unique reference from the specified side of the relation.

public override bool Remove(DiGi.Core.Relation.Enums.RelationSide relationSide, DiGi.Core.Interfaces.IUniqueReference? uniqueReference);

Parameters

relationSide RelationSide

The side of the relation to remove the reference from.

uniqueReference DiGi.Core.Interfaces.IUniqueReference

The unique reference to remove.

Implements Remove(RelationSide, IUniqueReference)

Returns

System.Boolean
True if the reference was successfully removed; otherwise, false.

ManyToOneRelation<From,To>.Remove<TUniqueReference>(RelationSide, IEnumerable<TUniqueReference>) Method

Removes multiple unique references from the specified side of the relation.

public override System.Collections.Generic.List<TUniqueReference>? Remove<TUniqueReference>(DiGi.Core.Relation.Enums.RelationSide relationSide, System.Collections.Generic.IEnumerable<TUniqueReference>? uniqueReferences)
    where TUniqueReference : DiGi.Core.Interfaces.IUniqueReference;

Type parameters

TUniqueReference

The type of the unique reference.

Parameters

relationSide RelationSide

The side of the relation to remove references from.

uniqueReferences System.Collections.Generic.IEnumerable<TUniqueReference>

The collection of unique references to remove.

Implements Remove<TUniqueReference>(RelationSide, IEnumerable<TUniqueReference>)

Returns

System.Collections.Generic.List<TUniqueReference>
A list of removed unique references, or null if none were removed.

OneToManyBidirectionalRelation Class

Represents a bidirectional one-to-many relationship between unique objects.

public class OneToManyBidirectionalRelation : DiGi.Core.Relation.Classes.OneToManyBidirectionalRelation<DiGi.Core.Interfaces.IUniqueObject, DiGi.Core.Interfaces.IUniqueObject>

Inheritance System.ObjectDiGi.Core.Classes.ObjectDiGi.Core.Classes.SerializableObjectRelationDiGi.Core.Relation.Classes.Relation<DiGi.Core.Interfaces.IUniqueObject,DiGi.Core.Interfaces.IUniqueObject>DiGi.Core.Relation.Classes.OneToManyRelation<DiGi.Core.Interfaces.IUniqueObject,DiGi.Core.Interfaces.IUniqueObject>DiGi.Core.Relation.Classes.OneToManyBidirectionalRelation<DiGi.Core.Interfaces.IUniqueObject,DiGi.Core.Interfaces.IUniqueObject> → OneToManyBidirectionalRelation

Constructors

OneToManyBidirectionalRelation(UniqueReference, IEnumerable<UniqueReference>) Constructor

Creates a new instance of the OneToManyBidirectionalRelation class from unique references.

public OneToManyBidirectionalRelation(DiGi.Core.Classes.UniqueReference? uniqueReference_From, System.Collections.Generic.IEnumerable<DiGi.Core.Classes.UniqueReference>? uniqueReferences_To);

Parameters

uniqueReference_From DiGi.Core.Classes.UniqueReference

The unique reference for the 'from' side of the relation.

uniqueReferences_To System.Collections.Generic.IEnumerable<DiGi.Core.Classes.UniqueReference>

The collection of unique references for the 'to' side of the relation.

OneToManyBidirectionalRelation(IUniqueObject, IEnumerable<IUniqueObject>) Constructor

Creates a new instance of the OneToManyBidirectionalRelation class from unique objects.

public OneToManyBidirectionalRelation(DiGi.Core.Interfaces.IUniqueObject? uniqueObject_From, System.Collections.Generic.IEnumerable<DiGi.Core.Interfaces.IUniqueObject>? uniqueObjects_To);

Parameters

uniqueObject_From DiGi.Core.Interfaces.IUniqueObject

The unique object for the 'from' side of the relation.

uniqueObjects_To System.Collections.Generic.IEnumerable<DiGi.Core.Interfaces.IUniqueObject>

The collection of unique objects for the 'to' side of the relation.

OneToManyBidirectionalRelation(OneToManyBidirectionalRelation) Constructor

Creates a new instance of the OneToManyBidirectionalRelation class by copying another instance.

public OneToManyBidirectionalRelation(DiGi.Core.Relation.Classes.OneToManyBidirectionalRelation? oneToManyBidirectionalRelation);

Parameters

oneToManyBidirectionalRelation OneToManyBidirectionalRelation

The existing relation instance to copy from.

OneToManyBidirectionalRelation(JsonObject) Constructor

Creates a new instance of the OneToManyBidirectionalRelation class from a JSON object.

public OneToManyBidirectionalRelation(System.Text.Json.Nodes.JsonObject? jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The JSON object to create the relation from.

OneToManyBidirectionalRelation<From,To> Class

Represents a bidirectional one-to-many relationship between two types of unique objects.

public class OneToManyBidirectionalRelation<From,To> : DiGi.Core.Relation.Classes.OneToManyRelation<From, To>, DiGi.Core.Relation.Interfaces.IBidirectionalRelation<From, To>, DiGi.Core.Relation.Interfaces.IBidirectionalRelation, DiGi.Core.Relation.Interfaces.IRelation, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObject, DiGi.Core.Relation.Interfaces.IRelation<From, To>
    where From : DiGi.Core.Interfaces.IUniqueObject
    where To : DiGi.Core.Interfaces.IUniqueObject

Type parameters

From

The type of the object on the 'one' side of the relation.

To

The type of the objects on the 'many' side of the relation.

Inheritance System.ObjectDiGi.Core.Classes.ObjectDiGi.Core.Classes.SerializableObjectRelationDiGi.Core.Relation.Classes.Relation<From,To>DiGi.Core.Relation.Classes.OneToManyRelation<From,To> → OneToManyBidirectionalRelation<From,To>

Derived
OneToManyBidirectionalRelation

Implements DiGi.Core.Relation.Interfaces.IBidirectionalRelation<From,To>, IBidirectionalRelation, IRelation, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObject, DiGi.Core.Relation.Interfaces.IRelation<From,To>

Constructors

OneToManyBidirectionalRelation(UniqueReference, IEnumerable<UniqueReference>) Constructor

Creates a new instance of the OneToManyBidirectionalRelation class from unique references.

public OneToManyBidirectionalRelation(DiGi.Core.Classes.UniqueReference? uniqueReference_From, System.Collections.Generic.IEnumerable<DiGi.Core.Classes.UniqueReference>? uniqueReferences_To);

Parameters

uniqueReference_From DiGi.Core.Classes.UniqueReference

The unique reference for the 'from' side of the relation.

uniqueReferences_To System.Collections.Generic.IEnumerable<DiGi.Core.Classes.UniqueReference>

The collection of unique references for the 'to' side of the relation.

OneToManyBidirectionalRelation(OneToManyBidirectionalRelation<From,To>) Constructor

Creates a new instance of the OneToManyBidirectionalRelation class by copying another instance.

public OneToManyBidirectionalRelation(DiGi.Core.Relation.Classes.OneToManyBidirectionalRelation<From,To>? oneToManyBidirectionalRelation);

Parameters

oneToManyBidirectionalRelation DiGi.Core.Relation.Classes.OneToManyBidirectionalRelation<From,To>

The existing relation instance to copy from.

OneToManyBidirectionalRelation(From, IEnumerable<To>) Constructor

Creates a new instance of the OneToManyBidirectionalRelation class from unique objects.

public OneToManyBidirectionalRelation(From? uniqueObject_From, System.Collections.Generic.IEnumerable<To>? uniqueObjects_To);

Parameters

uniqueObject_From From

The unique object for the 'from' side of the relation.

uniqueObjects_To System.Collections.Generic.IEnumerable<To>

The collection of unique objects for the 'to' side of the relation.

OneToManyBidirectionalRelation(JsonObject) Constructor

Creates a new instance of the OneToManyBidirectionalRelation class from a JSON object.

public OneToManyBidirectionalRelation(System.Text.Json.Nodes.JsonObject? jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The JSON object to create the relation from.

OneToManyDirectionalRelation Class

Represents a one-to-many directional relationship between IUniqueObject instances.

public class OneToManyDirectionalRelation : DiGi.Core.Relation.Classes.OneToManyRelation<DiGi.Core.Interfaces.IUniqueObject, DiGi.Core.Interfaces.IUniqueObject>

Inheritance System.ObjectDiGi.Core.Classes.ObjectDiGi.Core.Classes.SerializableObjectRelationDiGi.Core.Relation.Classes.Relation<DiGi.Core.Interfaces.IUniqueObject,DiGi.Core.Interfaces.IUniqueObject>DiGi.Core.Relation.Classes.OneToManyRelation<DiGi.Core.Interfaces.IUniqueObject,DiGi.Core.Interfaces.IUniqueObject> → OneToManyDirectionalRelation

Constructors

OneToManyDirectionalRelation(UniqueReference, IEnumerable<UniqueReference>) Constructor

Creates a new instance from unique references.

public OneToManyDirectionalRelation(DiGi.Core.Classes.UniqueReference? uniqueReference_From, System.Collections.Generic.IEnumerable<DiGi.Core.Classes.UniqueReference>? uniqueReferences_To);

Parameters

uniqueReference_From DiGi.Core.Classes.UniqueReference

The source unique reference.

uniqueReferences_To System.Collections.Generic.IEnumerable<DiGi.Core.Classes.UniqueReference>

The collection of destination unique references.

OneToManyDirectionalRelation(IUniqueObject, IEnumerable<IUniqueObject>) Constructor

Creates a new instance from unique objects.

public OneToManyDirectionalRelation(DiGi.Core.Interfaces.IUniqueObject? uniqueObject_From, System.Collections.Generic.IEnumerable<DiGi.Core.Interfaces.IUniqueObject>? uniqueObjects_To);

Parameters

uniqueObject_From DiGi.Core.Interfaces.IUniqueObject

The source unique object.

uniqueObjects_To System.Collections.Generic.IEnumerable<DiGi.Core.Interfaces.IUniqueObject>

The collection of destination unique objects.

OneToManyDirectionalRelation(OneToManyDirectionalRelation) Constructor

Creates a new instance by copying another instance.

public OneToManyDirectionalRelation(DiGi.Core.Relation.Classes.OneToManyDirectionalRelation? oneToManyDirectionalRelation);

Parameters

oneToManyDirectionalRelation OneToManyDirectionalRelation

The existing relation to copy from.

OneToManyDirectionalRelation(JsonObject) Constructor

Creates a new instance from a JSON object.

public OneToManyDirectionalRelation(System.Text.Json.Nodes.JsonObject? jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The JSON object to create the instance from.

OneToManyDirectionalRelation<XUniqueObject,YUniqueObject> Class

One To One Directional Relation

public class OneToManyDirectionalRelation<XUniqueObject,YUniqueObject> : DiGi.Core.Relation.Classes.OneToManyRelation<XUniqueObject, YUniqueObject>, DiGi.Core.Relation.Interfaces.IDirectionalRelation<XUniqueObject, YUniqueObject>, DiGi.Core.Relation.Interfaces.IDirectionalRelation, DiGi.Core.Relation.Interfaces.IRelation, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObject, DiGi.Core.Relation.Interfaces.IRelation<XUniqueObject, YUniqueObject>
    where XUniqueObject : DiGi.Core.Interfaces.IUniqueObject
    where YUniqueObject : DiGi.Core.Interfaces.IUniqueObject

Type parameters

XUniqueObject

Parent Unique Object

YUniqueObject

Related Unique Object

Inheritance System.ObjectDiGi.Core.Classes.ObjectDiGi.Core.Classes.SerializableObjectRelationDiGi.Core.Relation.Classes.Relation<XUniqueObject,YUniqueObject>DiGi.Core.Relation.Classes.OneToManyRelation<XUniqueObject,YUniqueObject> → OneToManyDirectionalRelation<XUniqueObject,YUniqueObject>

Implements DiGi.Core.Relation.Interfaces.IDirectionalRelation<XUniqueObject,YUniqueObject>, IDirectionalRelation, IRelation, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObject, DiGi.Core.Relation.Interfaces.IRelation<XUniqueObject,YUniqueObject>

Constructors

OneToManyDirectionalRelation(UniqueReference, IEnumerable<UniqueReference>) Constructor

Creates a new instance from unique references.

public OneToManyDirectionalRelation(DiGi.Core.Classes.UniqueReference? uniqueReference_From, System.Collections.Generic.IEnumerable<DiGi.Core.Classes.UniqueReference>? uniqueReferences_To);

Parameters

uniqueReference_From DiGi.Core.Classes.UniqueReference

The source unique reference.

uniqueReferences_To System.Collections.Generic.IEnumerable<DiGi.Core.Classes.UniqueReference>

The collection of destination unique references.

OneToManyDirectionalRelation(OneToManyDirectionalRelation<XUniqueObject,YUniqueObject>) Constructor

Creates a new instance by copying another instance.

public OneToManyDirectionalRelation(DiGi.Core.Relation.Classes.OneToManyDirectionalRelation<XUniqueObject,YUniqueObject>? oneToManyDirectionalRelation);

Parameters

oneToManyDirectionalRelation DiGi.Core.Relation.Classes.OneToManyDirectionalRelation<XUniqueObject,YUniqueObject>

The existing relation to copy from.

OneToManyDirectionalRelation(JsonObject) Constructor

Creates a new instance from a JSON object.

public OneToManyDirectionalRelation(System.Text.Json.Nodes.JsonObject? jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The JSON object to create the instance from.

OneToManyDirectionalRelation(XUniqueObject, IEnumerable<YUniqueObject>) Constructor

Creates a new instance from unique objects.

public OneToManyDirectionalRelation(XUniqueObject? uniqueObject_From, System.Collections.Generic.IEnumerable<YUniqueObject>? uniqueObjects_To);

Parameters

uniqueObject_From XUniqueObject

The source unique object.

uniqueObjects_To System.Collections.Generic.IEnumerable<YUniqueObject>

The collection of destination unique objects.

OneToManyRelation Class

Represents an abstract one-to-many relationship between unique objects.

public abstract class OneToManyRelation : DiGi.Core.Relation.Classes.OneToManyRelation<DiGi.Core.Interfaces.IUniqueObject, DiGi.Core.Interfaces.IUniqueObject>

Inheritance System.ObjectDiGi.Core.Classes.ObjectDiGi.Core.Classes.SerializableObjectRelationDiGi.Core.Relation.Classes.Relation<DiGi.Core.Interfaces.IUniqueObject,DiGi.Core.Interfaces.IUniqueObject>DiGi.Core.Relation.Classes.OneToManyRelation<DiGi.Core.Interfaces.IUniqueObject,DiGi.Core.Interfaces.IUniqueObject> → OneToManyRelation

Constructors

OneToManyRelation(IUniqueObject, IEnumerable<IUniqueObject>) Constructor

Creates a new instance of the OneToManyRelation class from unique objects.

public OneToManyRelation(DiGi.Core.Interfaces.IUniqueObject? uniqueObject_From, System.Collections.Generic.IEnumerable<DiGi.Core.Interfaces.IUniqueObject>? uniqueObjects_To);

Parameters

uniqueObject_From DiGi.Core.Interfaces.IUniqueObject

The source unique object.

uniqueObjects_To System.Collections.Generic.IEnumerable<DiGi.Core.Interfaces.IUniqueObject>

The collection of destination unique objects.

OneToManyRelation(IUniqueReference, IEnumerable<IUniqueReference>) Constructor

Creates a new instance of the OneToManyRelation class from unique references.

public OneToManyRelation(DiGi.Core.Interfaces.IUniqueReference? uniqueReference_From, System.Collections.Generic.IEnumerable<DiGi.Core.Interfaces.IUniqueReference>? uniqueReferences_To);

Parameters

uniqueReference_From DiGi.Core.Interfaces.IUniqueReference

The source unique reference.

uniqueReferences_To System.Collections.Generic.IEnumerable<DiGi.Core.Interfaces.IUniqueReference>

The collection of destination unique references.

OneToManyRelation(OneToManyRelation) Constructor

Creates a new instance of the OneToManyRelation class by copying another instance.

public OneToManyRelation(DiGi.Core.Relation.Classes.OneToManyRelation? oneToManyRelation);

Parameters

oneToManyRelation OneToManyRelation

The existing relation to copy from.

OneToManyRelation(JsonObject) Constructor

Creates a new instance of the OneToManyRelation class from a JSON object.

public OneToManyRelation(System.Text.Json.Nodes.JsonObject? jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The JSON object to create the relation from.

OneToManyRelation<From,To> Class

Represents an abstract one-to-many relationship between two types of unique objects.

public abstract class OneToManyRelation<From,To> : DiGi.Core.Relation.Classes.Relation<From, To>, DiGi.Core.Relation.Interfaces.IOneToManyRelation<From, To>, DiGi.Core.Relation.Interfaces.IOneToManyRelation, DiGi.Core.Relation.Interfaces.IRelation, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObject, DiGi.Core.Relation.Interfaces.IRelation<From, To>
    where From : DiGi.Core.Interfaces.IUniqueObject
    where To : DiGi.Core.Interfaces.IUniqueObject

Type parameters

From

The type of the object on the 'one' side of the relation.

To

The type of the objects on the 'many' side of the relation.

Inheritance System.ObjectDiGi.Core.Classes.ObjectDiGi.Core.Classes.SerializableObjectRelationDiGi.Core.Relation.Classes.Relation<From,To> → OneToManyRelation<From,To>

Derived
OneToManyBidirectionalRelation<From,To>
OneToManyDirectionalRelation
OneToManyDirectionalRelation<XUniqueObject,YUniqueObject>
OneToManyRelation

Implements DiGi.Core.Relation.Interfaces.IOneToManyRelation<From,To>, IOneToManyRelation, IRelation, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObject, DiGi.Core.Relation.Interfaces.IRelation<From,To>

Constructors

OneToManyRelation(IUniqueReference, IEnumerable<IUniqueReference>) Constructor

Creates a new instance of the OneToManyRelation class from unique references.

public OneToManyRelation(DiGi.Core.Interfaces.IUniqueReference? uniqueReference_From, System.Collections.Generic.IEnumerable<DiGi.Core.Interfaces.IUniqueReference>? uniqueReferences_To);

Parameters

uniqueReference_From DiGi.Core.Interfaces.IUniqueReference

The unique reference for the single side of the relationship.

uniqueReferences_To System.Collections.Generic.IEnumerable<DiGi.Core.Interfaces.IUniqueReference>

The collection of unique references for the many side of the relationship.

OneToManyRelation(OneToManyRelation<From,To>) Constructor

Creates a new instance of the OneToManyRelation class by copying another instance.

public OneToManyRelation(DiGi.Core.Relation.Classes.OneToManyRelation<From,To>? oneToManyRelation);

Parameters

oneToManyRelation DiGi.Core.Relation.Classes.OneToManyRelation<From,To>

The source relation instance to copy.

OneToManyRelation(From, IEnumerable<To>) Constructor

Creates a new instance of the OneToManyRelation class from unique objects.

public OneToManyRelation(From? uniqueObject_From, System.Collections.Generic.IEnumerable<To>? uniqueObjects_To);

Parameters

uniqueObject_From From

The unique object for the single side of the relationship.

uniqueObjects_To System.Collections.Generic.IEnumerable<To>

The collection of unique objects for the many side of the relationship.

OneToManyRelation(JsonObject) Constructor

Creates a new instance of the OneToManyRelation class from a JSON object.

public OneToManyRelation(System.Text.Json.Nodes.JsonObject? jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The JSON object to initialize the relation from.

Properties

OneToManyRelation<From,To>.UniqueReferences Property

Gets a list containing all unique references in this relation.

public override System.Collections.Generic.List<DiGi.Core.Interfaces.IUniqueReference>? UniqueReferences { get; }

Implements UniqueReferences

Property Value

System.Collections.Generic.List<DiGi.Core.Interfaces.IUniqueReference>

OneToManyRelation<From,To>.UniqueReferences_To Property

Gets a list of unique references on the "to" side of the relation.

public System.Collections.Generic.List<DiGi.Core.Interfaces.IUniqueReference>? UniqueReferences_To { get; }

Implements UniqueReferences_To

Property Value

System.Collections.Generic.List<DiGi.Core.Interfaces.IUniqueReference>

OneToManyRelation<From,To>.UniqueReference_From Property

Gets the unique reference from the source object.

public DiGi.Core.Interfaces.IUniqueReference? UniqueReference_From { get; }

Implements UniqueReference_From

Property Value

DiGi.Core.Interfaces.IUniqueReference

Methods

OneToManyRelation<From,To>.Add(RelationSide, IUniqueReference) Method

Adds a unique reference to the specified side of the relation.

public override bool Add(DiGi.Core.Relation.Enums.RelationSide relationSide, DiGi.Core.Interfaces.IUniqueReference? uniqueReference);

Parameters

relationSide RelationSide

The side of the relation to add the reference to.

uniqueReference DiGi.Core.Interfaces.IUniqueReference

The unique reference to add.

Returns

System.Boolean
True if the reference was successfully added; otherwise, false.

OneToManyRelation<From,To>.Contains(RelationSide, IUniqueReference) Method

Determines whether the relation contains the specified unique reference on the given side.

public override bool Contains(DiGi.Core.Relation.Enums.RelationSide relationSide, DiGi.Core.Interfaces.IUniqueReference? uniqueReference);

Parameters

relationSide RelationSide

The side of the relation to check.

uniqueReference DiGi.Core.Interfaces.IUniqueReference

The unique reference to locate in the relation.

Implements Contains(RelationSide, IUniqueReference)

Returns

System.Boolean
True if the relation contains the specified unique reference on the given side; otherwise, false.

OneToManyRelation<From,To>.Has(RelationSide) Method

Determines whether the relation has a reference on the specified side.

public override bool Has(DiGi.Core.Relation.Enums.RelationSide relationSide);

Parameters

relationSide RelationSide

The side of the relation to check.

Implements Has(RelationSide)

Returns

System.Boolean
True if the relation has a reference on the specified side; otherwise, false.

OneToManyRelation<From,To>.Remove(RelationSide, IUniqueReference) Method

Removes a unique reference from the specified side of the relation.

public override bool Remove(DiGi.Core.Relation.Enums.RelationSide relationSide, DiGi.Core.Interfaces.IUniqueReference? uniqueReference);

Parameters

relationSide RelationSide

The side of the relation to remove the reference from.

uniqueReference DiGi.Core.Interfaces.IUniqueReference

The unique reference to remove.

Implements Remove(RelationSide, IUniqueReference)

Returns

System.Boolean
True if the reference was successfully removed; otherwise, false.

OneToManyRelation<From,To>.Remove<TUniqueReference>(RelationSide, IEnumerable<TUniqueReference>) Method

Removes multiple unique references from the specified side of the relation.

public override System.Collections.Generic.List<TUniqueReference>? Remove<TUniqueReference>(DiGi.Core.Relation.Enums.RelationSide relationSide, System.Collections.Generic.IEnumerable<TUniqueReference>? uniqueReferences)
    where TUniqueReference : DiGi.Core.Interfaces.IUniqueReference;

Type parameters

TUniqueReference

The type of the unique reference.

Parameters

relationSide RelationSide

The side of the relation to remove references from.

uniqueReferences System.Collections.Generic.IEnumerable<TUniqueReference>

The collection of unique references to remove.

Implements Remove<TUniqueReference>(RelationSide, IEnumerable<TUniqueReference>)

Returns

System.Collections.Generic.List<TUniqueReference>
A list of removed unique references, or null if no references were removed.

OneToOneBidirectionalRelation Class

Represents a bidirectional one-to-one relationship between two IUniqueObject instances.

public class OneToOneBidirectionalRelation : DiGi.Core.Relation.Classes.OneToOneBidirectionalRelation<DiGi.Core.Interfaces.IUniqueObject, DiGi.Core.Interfaces.IUniqueObject>

Inheritance System.ObjectDiGi.Core.Classes.ObjectDiGi.Core.Classes.SerializableObjectRelationDiGi.Core.Relation.Classes.Relation<DiGi.Core.Interfaces.IUniqueObject,DiGi.Core.Interfaces.IUniqueObject>DiGi.Core.Relation.Classes.OneToOneRelation<DiGi.Core.Interfaces.IUniqueObject,DiGi.Core.Interfaces.IUniqueObject>DiGi.Core.Relation.Classes.OneToOneBidirectionalRelation<DiGi.Core.Interfaces.IUniqueObject,DiGi.Core.Interfaces.IUniqueObject> → OneToOneBidirectionalRelation

Constructors

OneToOneBidirectionalRelation(IUniqueObject, IUniqueObject) Constructor

Creates a new instance of the OneToOneBidirectionalRelation class from unique objects.

public OneToOneBidirectionalRelation(DiGi.Core.Interfaces.IUniqueObject? uniqueObject_From, DiGi.Core.Interfaces.IUniqueObject? uniqueObject_To);

Parameters

uniqueObject_From DiGi.Core.Interfaces.IUniqueObject

The source unique object.

uniqueObject_To DiGi.Core.Interfaces.IUniqueObject

The destination unique object.

OneToOneBidirectionalRelation(IUniqueReference, IUniqueReference) Constructor

Creates a new instance of the OneToOneBidirectionalRelation class from unique references.

public OneToOneBidirectionalRelation(DiGi.Core.Interfaces.IUniqueReference? uniqueReference_From, DiGi.Core.Interfaces.IUniqueReference? uniqueReference_To);

Parameters

uniqueReference_From DiGi.Core.Interfaces.IUniqueReference

The source unique reference.

uniqueReference_To DiGi.Core.Interfaces.IUniqueReference

The destination unique reference.

OneToOneBidirectionalRelation(OneToOneBidirectionalRelation) Constructor

Creates a new instance of the OneToOneBidirectionalRelation class by copying another instance.

public OneToOneBidirectionalRelation(DiGi.Core.Relation.Classes.OneToOneBidirectionalRelation? oneToOneBidirectionalRelation);

Parameters

oneToOneBidirectionalRelation OneToOneBidirectionalRelation

The existing relation to copy from.

OneToOneBidirectionalRelation(JsonObject) Constructor

Creates a new instance of the OneToOneBidirectionalRelation class from a JSON object.

public OneToOneBidirectionalRelation(System.Text.Json.Nodes.JsonObject? jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The JSON object to create the relation from.

OneToOneBidirectionalRelation<From,To> Class

Represents a bidirectional one-to-one relationship between two unique object instances.

public class OneToOneBidirectionalRelation<From,To> : DiGi.Core.Relation.Classes.OneToOneRelation<From, To>, DiGi.Core.Relation.Interfaces.IBidirectionalRelation<From, To>, DiGi.Core.Relation.Interfaces.IBidirectionalRelation, DiGi.Core.Relation.Interfaces.IRelation, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObject, DiGi.Core.Relation.Interfaces.IRelation<From, To>
    where From : DiGi.Core.Interfaces.IUniqueObject
    where To : DiGi.Core.Interfaces.IUniqueObject

Type parameters

From

The type of the source object.

To

The type of the destination object.

Inheritance System.ObjectDiGi.Core.Classes.ObjectDiGi.Core.Classes.SerializableObjectRelationDiGi.Core.Relation.Classes.Relation<From,To>DiGi.Core.Relation.Classes.OneToOneRelation<From,To> → OneToOneBidirectionalRelation<From,To>

Derived
OneToOneBidirectionalRelation

Implements DiGi.Core.Relation.Interfaces.IBidirectionalRelation<From,To>, IBidirectionalRelation, IRelation, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObject, DiGi.Core.Relation.Interfaces.IRelation<From,To>

Constructors

OneToOneBidirectionalRelation(IUniqueReference, IUniqueReference) Constructor

Creates a new instance of the OneToOneBidirectionalRelation class from unique references.

public OneToOneBidirectionalRelation(DiGi.Core.Interfaces.IUniqueReference? uniqueReference_From, DiGi.Core.Interfaces.IUniqueReference? uniqueReference_To);

Parameters

uniqueReference_From DiGi.Core.Interfaces.IUniqueReference

The source unique reference.

uniqueReference_To DiGi.Core.Interfaces.IUniqueReference

The destination unique reference.

OneToOneBidirectionalRelation(OneToOneBidirectionalRelation<From,To>) Constructor

Creates a new instance of the OneToOneBidirectionalRelation class by copying another instance.

public OneToOneBidirectionalRelation(DiGi.Core.Relation.Classes.OneToOneBidirectionalRelation<From,To>? oneToOneBidirectionalRelation);

Parameters

oneToOneBidirectionalRelation DiGi.Core.Relation.Classes.OneToOneBidirectionalRelation<From,To>

The existing relation to copy from.

OneToOneBidirectionalRelation(From, To) Constructor

Creates a new instance of the OneToOneBidirectionalRelation class from unique objects.

public OneToOneBidirectionalRelation(From? uniqueObject_From, To? uniqueObject_To);

Parameters

uniqueObject_From From

The source unique object.

uniqueObject_To To

The destination unique object.

OneToOneBidirectionalRelation(JsonObject) Constructor

Creates a new instance of the OneToOneBidirectionalRelation class from a JSON object.

public OneToOneBidirectionalRelation(System.Text.Json.Nodes.JsonObject? jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The JSON object to create the relation from.

OneToOneDirectionalRelation Class

Represents a one-to-one directional relationship between IUniqueObject instances.

public class OneToOneDirectionalRelation : DiGi.Core.Relation.Classes.OneToOneRelation<DiGi.Core.Interfaces.IUniqueObject, DiGi.Core.Interfaces.IUniqueObject>

Inheritance System.ObjectDiGi.Core.Classes.ObjectDiGi.Core.Classes.SerializableObjectRelationDiGi.Core.Relation.Classes.Relation<DiGi.Core.Interfaces.IUniqueObject,DiGi.Core.Interfaces.IUniqueObject>DiGi.Core.Relation.Classes.OneToOneRelation<DiGi.Core.Interfaces.IUniqueObject,DiGi.Core.Interfaces.IUniqueObject> → OneToOneDirectionalRelation

Constructors

OneToOneDirectionalRelation(UniqueReference, UniqueReference) Constructor

Creates a new instance from unique references.

public OneToOneDirectionalRelation(DiGi.Core.Classes.UniqueReference? uniqueReference_From, DiGi.Core.Classes.UniqueReference? uniqueReference_To);

Parameters

uniqueReference_From DiGi.Core.Classes.UniqueReference

The source unique reference.

uniqueReference_To DiGi.Core.Classes.UniqueReference

The destination unique reference.

OneToOneDirectionalRelation(IUniqueObject, IUniqueObject) Constructor

Creates a new instance from unique objects.

public OneToOneDirectionalRelation(DiGi.Core.Interfaces.IUniqueObject? uniqueObject_From, DiGi.Core.Interfaces.IUniqueObject? uniqueObject_To);

Parameters

uniqueObject_From DiGi.Core.Interfaces.IUniqueObject

The source unique object.

uniqueObject_To DiGi.Core.Interfaces.IUniqueObject

The destination unique object.

OneToOneDirectionalRelation(OneToOneDirectionalRelation) Constructor

Creates a new instance by copying another instance.

public OneToOneDirectionalRelation(DiGi.Core.Relation.Classes.OneToOneDirectionalRelation? oneToOneDirectionalRelation);

Parameters

oneToOneDirectionalRelation OneToOneDirectionalRelation

The relation instance to copy from.

OneToOneDirectionalRelation(JsonObject) Constructor

Creates a new instance from a JSON object.

public OneToOneDirectionalRelation(System.Text.Json.Nodes.JsonObject? jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The JSON object to create the instance from.

Methods

OneToOneDirectionalRelation.Clone() Method

Creates a shallow copy of this relation.

public override DiGi.Core.Interfaces.ISerializableObject Clone();

Implements Clone()

Returns

DiGi.Core.Interfaces.ISerializableObject
A shallow copy of the current relation as an DiGi.Core.Interfaces.ISerializableObject.

OneToOneDirectionalRelation<XUniqueObject,YUniqueObject> Class

One To One Directional Relation

public class OneToOneDirectionalRelation<XUniqueObject,YUniqueObject> : DiGi.Core.Relation.Classes.OneToOneRelation<XUniqueObject, YUniqueObject>, DiGi.Core.Relation.Interfaces.IDirectionalRelation<XUniqueObject, YUniqueObject>, DiGi.Core.Relation.Interfaces.IDirectionalRelation, DiGi.Core.Relation.Interfaces.IRelation, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObject, DiGi.Core.Relation.Interfaces.IRelation<XUniqueObject, YUniqueObject>
    where XUniqueObject : DiGi.Core.Interfaces.IUniqueObject
    where YUniqueObject : DiGi.Core.Interfaces.IUniqueObject

Type parameters

XUniqueObject

Parent Unique Object

YUniqueObject

Related Unique Object

Inheritance System.ObjectDiGi.Core.Classes.ObjectDiGi.Core.Classes.SerializableObjectRelationDiGi.Core.Relation.Classes.Relation<XUniqueObject,YUniqueObject>DiGi.Core.Relation.Classes.OneToOneRelation<XUniqueObject,YUniqueObject> → OneToOneDirectionalRelation<XUniqueObject,YUniqueObject>

Implements DiGi.Core.Relation.Interfaces.IDirectionalRelation<XUniqueObject,YUniqueObject>, IDirectionalRelation, IRelation, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObject, DiGi.Core.Relation.Interfaces.IRelation<XUniqueObject,YUniqueObject>

Constructors

OneToOneDirectionalRelation(UniqueReference, UniqueReference) Constructor

Creates a new instance from unique references.

public OneToOneDirectionalRelation(DiGi.Core.Classes.UniqueReference? uniqueReference_From, DiGi.Core.Classes.UniqueReference? uniqueReference_To);

Parameters

uniqueReference_From DiGi.Core.Classes.UniqueReference

The source unique reference.

uniqueReference_To DiGi.Core.Classes.UniqueReference

The destination unique reference.

OneToOneDirectionalRelation(OneToOneDirectionalRelation<XUniqueObject,YUniqueObject>) Constructor

Creates a new instance by copying another instance.

public OneToOneDirectionalRelation(DiGi.Core.Relation.Classes.OneToOneDirectionalRelation<XUniqueObject,YUniqueObject>? oneToOneDirectionalRelation);

Parameters

oneToOneDirectionalRelation DiGi.Core.Relation.Classes.OneToOneDirectionalRelation<XUniqueObject,YUniqueObject>

The relation instance to copy from.

OneToOneDirectionalRelation(JsonObject) Constructor

Creates a new instance from a JSON object.

public OneToOneDirectionalRelation(System.Text.Json.Nodes.JsonObject? jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The JSON object to create the instance from.

OneToOneDirectionalRelation(XUniqueObject, YUniqueObject) Constructor

Creates a new instance from unique objects.

public OneToOneDirectionalRelation(XUniqueObject? uniqueObject_From, YUniqueObject? uniqueObject_To);

Parameters

uniqueObject_From XUniqueObject

The source unique object.

uniqueObject_To YUniqueObject

The destination unique object.

OneToOneRelation Class

Represents a one-to-one relationship between two IUniqueObject instances.

public abstract class OneToOneRelation : DiGi.Core.Relation.Classes.OneToOneRelation<DiGi.Core.Interfaces.IUniqueObject, DiGi.Core.Interfaces.IUniqueObject>

Inheritance System.ObjectDiGi.Core.Classes.ObjectDiGi.Core.Classes.SerializableObjectRelationDiGi.Core.Relation.Classes.Relation<DiGi.Core.Interfaces.IUniqueObject,DiGi.Core.Interfaces.IUniqueObject>DiGi.Core.Relation.Classes.OneToOneRelation<DiGi.Core.Interfaces.IUniqueObject,DiGi.Core.Interfaces.IUniqueObject> → OneToOneRelation

Constructors

OneToOneRelation(UniqueReference, UniqueReference) Constructor

Creates a new instance of the OneToOneRelation class from unique references.

public OneToOneRelation(DiGi.Core.Classes.UniqueReference? uniqueReference_From, DiGi.Core.Classes.UniqueReference? uniqueReference_To);

Parameters

uniqueReference_From DiGi.Core.Classes.UniqueReference

The source unique reference for the relation.

uniqueReference_To DiGi.Core.Classes.UniqueReference

The destination unique reference for the relation.

OneToOneRelation(IUniqueObject, IUniqueObject) Constructor

Creates a new instance of the OneToOneRelation class from unique objects.

public OneToOneRelation(DiGi.Core.Interfaces.IUniqueObject? uniqueObject_From, DiGi.Core.Interfaces.IUniqueObject? uniqueObject_To);

Parameters

uniqueObject_From DiGi.Core.Interfaces.IUniqueObject

The source unique object for the relation.

uniqueObject_To DiGi.Core.Interfaces.IUniqueObject

The destination unique object for the relation.

OneToOneRelation(OneToOneRelation) Constructor

Creates a new instance of the OneToOneRelation class by copying another instance.

public OneToOneRelation(DiGi.Core.Relation.Classes.OneToOneRelation? oneToOneRelation);

Parameters

oneToOneRelation OneToOneRelation

The existing OneToOneRelation instance to copy from.

OneToOneRelation(JsonObject) Constructor

Creates a new instance of the OneToOneRelation class from a JSON object.

public OneToOneRelation(System.Text.Json.Nodes.JsonObject? jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The JSON object used to initialize the relation.

OneToOneRelation<From,To> Class

Represents a one-to-one relationship between two unique object instances.

public abstract class OneToOneRelation<From,To> : DiGi.Core.Relation.Classes.Relation<From, To>, DiGi.Core.Relation.Interfaces.IOneToOneRelation<From, To>, DiGi.Core.Relation.Interfaces.IOneToOneRelation, DiGi.Core.Relation.Interfaces.IRelation, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObject, DiGi.Core.Relation.Interfaces.IRelation<From, To>
    where From : DiGi.Core.Interfaces.IUniqueObject
    where To : DiGi.Core.Interfaces.IUniqueObject

Type parameters

From

The type of the source object.

To

The type of the target object.

Inheritance System.ObjectDiGi.Core.Classes.ObjectDiGi.Core.Classes.SerializableObjectRelationDiGi.Core.Relation.Classes.Relation<From,To> → OneToOneRelation<From,To>

Derived
OneToOneBidirectionalRelation<From,To>
OneToOneDirectionalRelation
OneToOneDirectionalRelation<XUniqueObject,YUniqueObject>
OneToOneRelation

Implements DiGi.Core.Relation.Interfaces.IOneToOneRelation<From,To>, IOneToOneRelation, IRelation, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObject, DiGi.Core.Relation.Interfaces.IRelation<From,To>

Constructors

OneToOneRelation(IUniqueReference, IUniqueReference) Constructor

Creates a new instance of the OneToOneRelation class from unique references.

public OneToOneRelation(DiGi.Core.Interfaces.IUniqueReference? uniqueReference_From, DiGi.Core.Interfaces.IUniqueReference? uniqueReference_To);

Parameters

uniqueReference_From DiGi.Core.Interfaces.IUniqueReference

The source unique reference.

uniqueReference_To DiGi.Core.Interfaces.IUniqueReference

The target unique reference.

OneToOneRelation(OneToOneRelation<From,To>) Constructor

Creates a new instance of the OneToOneRelation class by copying another instance.

public OneToOneRelation(DiGi.Core.Relation.Classes.OneToOneRelation<From,To>? oneToOneRelation);

Parameters

oneToOneRelation DiGi.Core.Relation.Classes.OneToOneRelation<From,To>

The existing relation to copy from.

OneToOneRelation(From, To) Constructor

Creates a new instance of the OneToOneRelation class from unique objects.

public OneToOneRelation(From? uniqueObject_From, To? uniqueObject_To);

Parameters

uniqueObject_From From

The source unique object.

uniqueObject_To To

The target unique object.

OneToOneRelation(JsonObject) Constructor

Creates a new instance of the OneToOneRelation class from a JSON object.

public OneToOneRelation(System.Text.Json.Nodes.JsonObject? jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The JSON object to create the relation from.

Properties

OneToOneRelation<From,To>.UniqueReferences Property

Gets a list containing all unique references in this relation.

public override System.Collections.Generic.List<DiGi.Core.Interfaces.IUniqueReference>? UniqueReferences { get; }

Implements UniqueReferences

Property Value

System.Collections.Generic.List<DiGi.Core.Interfaces.IUniqueReference>

OneToOneRelation<From,To>.UniqueReference_From Property

Gets the unique reference from the source object.

public DiGi.Core.Interfaces.IUniqueReference? UniqueReference_From { get; }

Implements UniqueReference_From

Property Value

DiGi.Core.Interfaces.IUniqueReference

OneToOneRelation<From,To>.UniqueReference_To Property

Gets the unique reference to the target object.

public DiGi.Core.Interfaces.IUniqueReference? UniqueReference_To { get; }

Implements UniqueReference_To

Property Value

DiGi.Core.Interfaces.IUniqueReference

Methods

OneToOneRelation<From,To>.Add(RelationSide, IUniqueReference) Method

Adds a unique reference to the specified side of the relation.

public override bool Add(DiGi.Core.Relation.Enums.RelationSide relationSide, DiGi.Core.Interfaces.IUniqueReference? uniqueReference);

Parameters

relationSide RelationSide

The side of the relation to add the reference to.

uniqueReference DiGi.Core.Interfaces.IUniqueReference

The unique reference to add.

Returns

System.Boolean
True if the reference was successfully added; otherwise, false.

OneToOneRelation<From,To>.Contains(RelationSide, IUniqueReference) Method

Determines whether the relation contains the specified unique reference on the given side.

public override bool Contains(DiGi.Core.Relation.Enums.RelationSide relationSide, DiGi.Core.Interfaces.IUniqueReference? uniqueReference);

Parameters

relationSide RelationSide

The side of the relation to check.

uniqueReference DiGi.Core.Interfaces.IUniqueReference

The unique reference to locate.

Implements Contains(RelationSide, IUniqueReference)

Returns

System.Boolean
True if the relation contains the specified unique reference on the given side; otherwise, false.

OneToOneRelation<From,To>.Has(RelationSide) Method

Determines whether the relation has a reference on the specified side.

public override bool Has(DiGi.Core.Relation.Enums.RelationSide relationSide);

Parameters

relationSide RelationSide

The side of the relation to check.

Implements Has(RelationSide)

Returns

System.Boolean
True if the relation has a reference on the specified side; otherwise, false.

OneToOneRelation<From,To>.Remove(RelationSide, IUniqueReference) Method

Removes a unique reference from the specified side of the relation.

public override bool Remove(DiGi.Core.Relation.Enums.RelationSide relationSide, DiGi.Core.Interfaces.IUniqueReference? uniqueReference);

Parameters

relationSide RelationSide

The side of the relation to remove the reference from.

uniqueReference DiGi.Core.Interfaces.IUniqueReference

The unique reference to remove.

Implements Remove(RelationSide, IUniqueReference)

Returns

System.Boolean
True if the reference was successfully removed; otherwise, false.

OneToOneRelation<From,To>.Remove<TUniqueReference>(RelationSide, IEnumerable<TUniqueReference>) Method

Removes multiple unique references from the specified side of the relation.

public override System.Collections.Generic.List<TUniqueReference>? Remove<TUniqueReference>(DiGi.Core.Relation.Enums.RelationSide relationSide, System.Collections.Generic.IEnumerable<TUniqueReference>? uniqueReferences)
    where TUniqueReference : DiGi.Core.Interfaces.IUniqueReference;

Type parameters

TUniqueReference

The type of the unique reference.

Parameters

relationSide RelationSide

The side of the relation to remove references from.

uniqueReferences System.Collections.Generic.IEnumerable<TUniqueReference>

The collection of unique references to remove.

Implements Remove<TUniqueReference>(RelationSide, IEnumerable<TUniqueReference>)

Returns

System.Collections.Generic.List<TUniqueReference>
A list of removed unique references, or null if none were removed.

Relation Class

Represents an abstract relationship between unique objects.

public abstract class Relation : DiGi.Core.Classes.SerializableObject, DiGi.Core.Relation.Interfaces.IRelation, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObject

Inheritance System.ObjectDiGi.Core.Classes.ObjectDiGi.Core.Classes.SerializableObject → Relation

Derived
Relation<From,To>

Implements IRelation, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObject

Constructors

Relation() Constructor

Creates a new instance of the Relation class.

public Relation();

Relation(Relation) Constructor

Creates a new instance of the Relation class by copying another instance.

public Relation(DiGi.Core.Relation.Classes.Relation? relation);

Parameters

relation Relation

The relation instance to copy from.

Relation(JsonObject) Constructor

Creates a new instance of the Relation class from a JSON object.

public Relation(System.Text.Json.Nodes.JsonObject? jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The JSON object to create the relation from.

Properties

Relation.UniqueReferences Property

Gets a list containing all unique references in this relation.

public abstract System.Collections.Generic.List<DiGi.Core.Interfaces.IUniqueReference>? UniqueReferences { get; }

Implements UniqueReferences

Property Value

System.Collections.Generic.List<DiGi.Core.Interfaces.IUniqueReference>

Methods

Relation.Add(RelationSide, IUniqueReference) Method

Adds a unique reference to the specified side of the relation.

public abstract bool Add(DiGi.Core.Relation.Enums.RelationSide relationSide, DiGi.Core.Interfaces.IUniqueReference? uniqueReference);

Parameters

relationSide RelationSide

The side of the relation where the reference should be added.

uniqueReference DiGi.Core.Interfaces.IUniqueReference

The unique reference to add.

Returns

System.Boolean
True if the reference was successfully added; otherwise, false.

Relation.Contains(RelationSide, IUniqueReference) Method

Determines whether the relation contains the specified unique reference on the given side.

public abstract bool Contains(DiGi.Core.Relation.Enums.RelationSide relationSide, DiGi.Core.Interfaces.IUniqueReference? uniqueReference);

Parameters

relationSide RelationSide

The side of the relation to search.

uniqueReference DiGi.Core.Interfaces.IUniqueReference

The unique reference to locate within the relation.

Implements Contains(RelationSide, IUniqueReference)

Returns

System.Boolean
True if the specified unique reference is found on the given side; otherwise, false.

Relation.GetType(RelationSide) Method

Gets the type of the object on the specified side of the relation.

public abstract System.Type? GetType(DiGi.Core.Relation.Enums.RelationSide relationSide);

Parameters

relationSide RelationSide

The side of the relation to retrieve the type for.

Implements GetType(RelationSide)

Returns

System.Type
The type of the object on the specified side, or null if no type is associated with that side.

Relation.Has(RelationSide) Method

Determines whether the relation has a reference on the specified side.

public abstract bool Has(DiGi.Core.Relation.Enums.RelationSide relationSide);

Parameters

relationSide RelationSide

The side of the relation to check for a reference.

Implements Has(RelationSide)

Returns

System.Boolean
True if the relation has a reference on the specified side; otherwise, false.

Relation.Remove(RelationSide, IUniqueReference) Method

Removes a unique reference from the specified side of the relation.

public abstract bool Remove(DiGi.Core.Relation.Enums.RelationSide relationSide, DiGi.Core.Interfaces.IUniqueReference? uniqueReference);

Parameters

relationSide RelationSide

The side of the relation to remove the reference from.

uniqueReference DiGi.Core.Interfaces.IUniqueReference

The unique reference to remove.

Implements Remove(RelationSide, IUniqueReference)

Returns

System.Boolean
True if the reference was successfully removed; otherwise, false.

Relation.Remove<TUniqueReference>(RelationSide, IEnumerable<TUniqueReference>) Method

Removes multiple unique references from the specified side of the relation.

public abstract System.Collections.Generic.List<TUniqueReference>? Remove<TUniqueReference>(DiGi.Core.Relation.Enums.RelationSide relationSide, System.Collections.Generic.IEnumerable<TUniqueReference>? uniqueReferences)
    where TUniqueReference : DiGi.Core.Interfaces.IUniqueReference;

Type parameters

TUniqueReference

The type of the unique reference being removed.

Parameters

relationSide RelationSide

The side of the relation from which to remove references.

uniqueReferences System.Collections.Generic.IEnumerable<TUniqueReference>

The collection of unique references to be removed.

Implements Remove<TUniqueReference>(RelationSide, IEnumerable<TUniqueReference>)

Returns

System.Collections.Generic.List<TUniqueReference>
A list of the removed unique references, or null if no references were removed.

Relation<From,To> Class

Represents an abstract relationship between two types of unique objects.

public abstract class Relation<From,To> : DiGi.Core.Relation.Classes.Relation, DiGi.Core.Relation.Interfaces.IRelation<From, To>, DiGi.Core.Relation.Interfaces.IRelation, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObject
    where From : DiGi.Core.Interfaces.IUniqueObject
    where To : DiGi.Core.Interfaces.IUniqueObject

Type parameters

From

The type of the source object in the relation.

To

The type of the destination object in the relation.

Inheritance System.ObjectDiGi.Core.Classes.ObjectDiGi.Core.Classes.SerializableObjectRelation → Relation<From,To>

Derived
ManyToManyRelation<From,To>
ManyToOneRelation<From,To>
OneToManyRelation<From,To>
OneToOneRelation<From,To>

Implements DiGi.Core.Relation.Interfaces.IRelation<From,To>, IRelation, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObject

Constructors

Relation() Constructor

Creates a new instance of the Relation class.

public Relation();

Relation(Relation<From,To>) Constructor

Creates a new instance of the Relation class by copying another instance.

public Relation(DiGi.Core.Relation.Classes.Relation<From,To>? relation);

Parameters

relation DiGi.Core.Relation.Classes.Relation<From,To>

The relation instance to copy from.

Relation(JsonObject) Constructor

Creates a new instance of the Relation class from a JSON object.

public Relation(System.Text.Json.Nodes.JsonObject? jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The JSON object to initialize the relation from.

Methods

Relation<From,To>.GetType(RelationSide) Method

Gets the type associated with the specified relation side.

public override System.Type? GetType(DiGi.Core.Relation.Enums.RelationSide relationSide);

Parameters

relationSide RelationSide

The side of the relation to retrieve the type for.

Implements GetType(RelationSide)

Returns

System.Type
The type associated with the specified relation side, or null if not found.

RelationCollection<TRelation> Class

Represents a collection of relations.

public class RelationCollection<TRelation> : DiGi.Core.Classes.SerializableObjectCollection<TRelation>
    where TRelation : DiGi.Core.Relation.Interfaces.IRelation

Type parameters

TRelation

The type of relation elements in the collection.

Inheritance System.ObjectDiGi.Core.Classes.ObjectDiGi.Core.Classes.SerializableObjectDiGi.Core.Classes.SerializableObjectCollection<TRelation> → RelationCollection<TRelation>

Constructors

RelationCollection() Constructor

Initializes a new instance of the RelationCollection class.

public RelationCollection();

RelationCollection(RelationCollection<TRelation>) Constructor

Initializes a new instance of the RelationCollection class by copying another RelationCollection.

public RelationCollection(DiGi.Core.Relation.Classes.RelationCollection<TRelation>? relationCollection);

Parameters

relationCollection DiGi.Core.Relation.Classes.RelationCollection<TRelation>

The source collection to copy from.

RelationCollection(IEnumerable<TRelation>) Constructor

Initializes a new instance of the RelationCollection class with the specified relations.

public RelationCollection(System.Collections.Generic.IEnumerable<TRelation>? relations);

Parameters

relations System.Collections.Generic.IEnumerable<TRelation>

The collection of relations to initialize with.

RelationCollection(JsonObject) Constructor

Initializes a new instance of the RelationCollection class from a JSON object.

public RelationCollection(System.Text.Json.Nodes.JsonObject? jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The JSON object to initialize the collection from.

Methods

RelationCollection<TRelation>.Find<XRelation>(IUniqueReference, Func<XRelation,bool>) Method

Finds the first relation that contains the specified unique reference and optionally matches the predicate.

public XRelation? Find<XRelation>(DiGi.Core.Interfaces.IUniqueReference? uniqueReference, System.Func<XRelation?,bool>? func=null)
    where XRelation : TRelation;

Type parameters

XRelation

The type of relation being searched for.

Parameters

uniqueReference DiGi.Core.Interfaces.IUniqueReference

The unique reference to filter by.

func System.Func<XRelation,System.Boolean>

The predicate used to further filter the relations.

Returns

XRelation
The first relation that matches both the unique reference and the predicate, or null if no match is found.

RelationCollection<TRelation>.Find<XRelation>(Func<XRelation,bool>) Method

Finds the first relation that optionally matches the predicate.

public XRelation? Find<XRelation>(System.Func<XRelation?,bool>? func=null)
    where XRelation : TRelation;

Type parameters

XRelation

The type of relation being searched for.

Parameters

func System.Func<XRelation,System.Boolean>

The predicate used to filter the relations.

Returns

XRelation
The first relation that matches the predicate, or null if no match is found.

RelationCollection<TRelation>.FindAll<XRelation>(IUniqueReference, Func<XRelation,bool>) Method

Finds all relations that contain the specified unique reference and optionally match the predicate.

public System.Collections.Generic.List<XRelation>? FindAll<XRelation>(DiGi.Core.Interfaces.IUniqueReference? uniqueReference, System.Func<XRelation?,bool>? func=null)
    where XRelation : TRelation;

Type parameters

XRelation

The type of relation being searched for.

Parameters

uniqueReference DiGi.Core.Interfaces.IUniqueReference

The unique reference to filter by.

func System.Func<XRelation,System.Boolean>

The predicate used to further filter the relations.

Returns

System.Collections.Generic.List<XRelation>
A list of relations that match both the unique reference and the predicate, or null if no matches are found.

RelationCollection<TRelation>.FindAll<XRelation>(Func<XRelation,bool>) Method

Finds all relations that optionally match the predicate.

public System.Collections.Generic.List<XRelation>? FindAll<XRelation>(System.Func<XRelation?,bool>? func=null)
    where XRelation : TRelation;

Type parameters

XRelation

The type of relation being searched for.

Parameters

func System.Func<XRelation,System.Boolean>

The predicate used to filter the relations.

Returns

System.Collections.Generic.List<XRelation>
A list of relations that match the predicate, or null if no matches are found.

RelationCollection<TRelation>.Remove(IUniqueReference) Method

Removes all relations that contain the specified unique reference.

public bool Remove(DiGi.Core.Interfaces.IUniqueReference? uniqueReference);

Parameters

uniqueReference DiGi.Core.Interfaces.IUniqueReference

The unique reference of the relations to remove.

Returns

System.Boolean
True if one or more relations were removed; otherwise, false.

RelationListCluster Class

Represents a cluster that organizes all relations by their source type references.

public class RelationListCluster : DiGi.Core.Relation.Classes.RelationListCluster<DiGi.Core.Relation.Interfaces.IRelation>

Inheritance System.ObjectDiGi.Core.Classes.Cluster<DiGi.Core.Classes.TypeReference,DiGi.Core.Classes.TypeReference,IRelation>DiGi.Core.Classes.List<DiGi.Core.Classes.TypeReference,DiGi.Core.Classes.TypeReference,IRelation>DiGi.Core.Classes.SerializableObjectListCluster<DiGi.Core.Classes.TypeReference,DiGi.Core.Classes.TypeReference,IRelation>DiGi.Core.Relation.Classes.RelationListCluster<IRelation> → RelationListCluster

Constructors

RelationListCluster() Constructor

Initializes a new instance of the RelationListCluster class.

public RelationListCluster();

RelationListCluster(RelationListCluster) Constructor

Initializes a new instance of the RelationListCluster class by copying another RelationListCluster.

public RelationListCluster(DiGi.Core.Relation.Classes.RelationListCluster? relationCluster);

Parameters

relationCluster RelationListCluster

The RelationListCluster to copy from.

RelationListCluster(IEnumerable<IRelation>) Constructor

Initializes a new instance of the RelationListCluster class with the specified relations.

public RelationListCluster(System.Collections.Generic.IEnumerable<DiGi.Core.Relation.Interfaces.IRelation>? relations);

Parameters

relations System.Collections.Generic.IEnumerable<IRelation>

The collection of relations to initialize with.

RelationListCluster(JsonObject) Constructor

Initializes a new instance of the RelationListCluster class from a JSON object.

public RelationListCluster(System.Text.Json.Nodes.JsonObject? jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The JSON object to initialize from.

RelationListCluster<XRelation> Class

Represents a cluster that organizes relations by their source type references.

public class RelationListCluster<XRelation> : DiGi.Core.Classes.SerializableObjectListCluster<DiGi.Core.Classes.TypeReference, DiGi.Core.Classes.TypeReference, XRelation>
    where XRelation : DiGi.Core.Relation.Interfaces.IRelation

Type parameters

XRelation

The type of relation used in the cluster.

Inheritance System.ObjectDiGi.Core.Classes.Cluster<DiGi.Core.Classes.TypeReference,DiGi.Core.Classes.TypeReference,XRelation>DiGi.Core.Classes.List<DiGi.Core.Classes.TypeReference,DiGi.Core.Classes.TypeReference,XRelation>DiGi.Core.Classes.SerializableObjectListCluster<DiGi.Core.Classes.TypeReference,DiGi.Core.Classes.TypeReference,XRelation> → RelationListCluster<XRelation>

Derived
RelationListCluster

Constructors

RelationListCluster() Constructor

Initializes a new instance of the RelationListCluster class.

public RelationListCluster();

RelationListCluster(RelationListCluster<XRelation>) Constructor

Initializes a new instance of the RelationListCluster class by copying another RelationListCluster.

public RelationListCluster(DiGi.Core.Relation.Classes.RelationListCluster<XRelation>? relationListCluster);

Parameters

relationListCluster DiGi.Core.Relation.Classes.RelationListCluster<XRelation>

The source cluster to copy from.

RelationListCluster(IEnumerable<XRelation>) Constructor

Initializes a new instance of the RelationListCluster class with the specified relations.

public RelationListCluster(System.Collections.Generic.IEnumerable<XRelation>? relations);

Parameters

relations System.Collections.Generic.IEnumerable<XRelation>

The collection of relations to initialize the cluster with.

RelationListCluster(JsonObject) Constructor

Initializes a new instance of the RelationListCluster class from a JSON object.

public RelationListCluster(System.Text.Json.Nodes.JsonObject? jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The JSON object to initialize the cluster from.

Properties

RelationListCluster<XRelation>.TypeReferences_From Property

Gets the list of source type references.

public System.Collections.Generic.List<DiGi.Core.Classes.TypeReference>? TypeReferences_From { get; }

Property Value

System.Collections.Generic.List<DiGi.Core.Classes.TypeReference>

Methods

RelationListCluster<XRelation>.GetKey_1(XRelation) Method

Gets the source type reference from a relation.

protected override DiGi.Core.Classes.TypeReference? GetKey_1(XRelation? value);

Parameters

value XRelation

Returns

DiGi.Core.Classes.TypeReference

RelationListCluster<XRelation>.GetKey_2(XRelation) Method

Gets the target type reference from a relation.

protected override DiGi.Core.Classes.TypeReference? GetKey_2(XRelation? value);

Parameters

value XRelation

Returns

DiGi.Core.Classes.TypeReference

RelationListCluster<XRelation>.GetValues<URelation>(IUniqueReference, Func<URelation,bool>) Method

Gets all relations of the specified type that contain the given unique reference and optionally match the predicate.

public System.Collections.Generic.List<URelation>? GetValues<URelation>(DiGi.Core.Interfaces.IUniqueReference? uniqueReference, System.Func<URelation?,bool>? func=null)
    where URelation : XRelation;

Type parameters

URelation

The type of relation to retrieve.

Parameters

uniqueReference DiGi.Core.Interfaces.IUniqueReference

The unique reference to search for.

func System.Func<URelation,System.Boolean>

An optional predicate to filter the relations.

Returns

System.Collections.Generic.List<URelation>
A list of matching relations, or null if none are found.

RelationListCluster<XRelation>.GetValues<URelation>(IEnumerable<IUniqueReference>, Func<URelation,bool>) Method

Gets all relations of the specified type that contain any of the given unique references and optionally match the predicate.

public System.Collections.Generic.List<URelation>? GetValues<URelation>(System.Collections.Generic.IEnumerable<DiGi.Core.Interfaces.IUniqueReference>? uniqueReferences, System.Func<URelation?,bool>? func=null)
    where URelation : XRelation;

Type parameters

URelation

The type of relation to retrieve.

Parameters

uniqueReferences System.Collections.Generic.IEnumerable<DiGi.Core.Interfaces.IUniqueReference>

A collection of unique references to search for.

func System.Func<URelation,System.Boolean>

An optional predicate to filter the relations.

Returns

System.Collections.Generic.List<URelation>
A list of matching relations, or null if none are found.

RelationListCluster<XRelation>.Remove(IUniqueReference) Method

Removes the specified unique reference from the relations.

public bool Remove(DiGi.Core.Interfaces.IUniqueReference? uniqueReference);

Parameters

uniqueReference DiGi.Core.Interfaces.IUniqueReference

The unique reference to remove.

Returns

System.Boolean
True if the element is successfully removed; otherwise, false.

RelationListCluster<XRelation>.Remove<XUniqueReference>(IEnumerable<XUniqueReference>) Method

Removes the specified unique references from the relations and returns the affected relations.

public System.Collections.Generic.List<XRelation>? Remove<XUniqueReference>(System.Collections.Generic.IEnumerable<XUniqueReference>? uniqueReferences)
    where XUniqueReference : DiGi.Core.Interfaces.IUniqueReference;

Type parameters

XUniqueReference

The type of unique reference.

Parameters

uniqueReferences System.Collections.Generic.IEnumerable<XUniqueReference>

The collection of unique references to remove.

Returns

System.Collections.Generic.List<XRelation>
A list of the affected relations, or null if none were removed.

RelationListClusterReference Class

Represents a reference to a relation list cluster identified by two type references and an index.

public class RelationListClusterReference : DiGi.Core.Classes.ListClusterReference<DiGi.Core.Classes.TypeReference, DiGi.Core.Classes.TypeReference>

Inheritance System.ObjectDiGi.Core.Classes.ListClusterReference<DiGi.Core.Classes.TypeReference,DiGi.Core.Classes.TypeReference> → RelationListClusterReference

Constructors

RelationListClusterReference(TypeReference, TypeReference, int) Constructor

Represents a reference to a relation list cluster identified by two type references and an index.

public RelationListClusterReference(DiGi.Core.Classes.TypeReference? key_1, DiGi.Core.Classes.TypeReference? key_2, int index);

Parameters

key_1 DiGi.Core.Classes.TypeReference

key_2 DiGi.Core.Classes.TypeReference

index System.Int32

Methods

RelationListClusterReference.Equals(IReference) Method

Determines whether this instance equals the specified reference.

public override bool Equals(DiGi.Core.Interfaces.IReference? reference);

Parameters

reference DiGi.Core.Interfaces.IReference

The reference to compare with this instance.

Returns

System.Boolean
True if the instances are equal; otherwise, false.

RelationListClusterReference.GetHashCode() Method

Returns the hash code for this instance.

public override int GetHashCode();

Returns

System.Int32
The hash code for this instance.

UniqueObjectRelationCluster<TUniqueObject,XRelation> Class

Represents a cluster that associates unique objects with their related relations.

public class UniqueObjectRelationCluster<TUniqueObject,XRelation> : DiGi.Core.Classes.UniqueObjectValueCluster<TUniqueObject>
    where TUniqueObject : DiGi.Core.Interfaces.IUniqueObject
    where XRelation : DiGi.Core.Relation.Interfaces.IRelation

Type parameters

TUniqueObject

The type of the unique objects in the cluster.

XRelation

The type of the relations associated with the unique objects.

Inheritance System.ObjectDiGi.Core.Classes.Cluster<DiGi.Core.Classes.TypeReference,DiGi.Core.Interfaces.IUniqueReference,TUniqueObject>DiGi.Core.Classes.ValueCluster<DiGi.Core.Classes.TypeReference,DiGi.Core.Interfaces.IUniqueReference,TUniqueObject>DiGi.Core.Classes.SerializableObjectValueCluster<DiGi.Core.Classes.TypeReference,DiGi.Core.Interfaces.IUniqueReference,TUniqueObject>DiGi.Core.Classes.UniqueObjectValueCluster<TUniqueObject> → UniqueObjectRelationCluster<TUniqueObject,XRelation>

Constructors

UniqueObjectRelationCluster() Constructor

Initializes a new instance of the UniqueObjectRelationCluster class.

public UniqueObjectRelationCluster();

UniqueObjectRelationCluster(UniqueObjectRelationCluster<TUniqueObject,XRelation>) Constructor

Initializes a new instance of the UniqueObjectRelationCluster class by copying another UniqueObjectRelationCluster.

public UniqueObjectRelationCluster(DiGi.Core.Relation.Classes.UniqueObjectRelationCluster<TUniqueObject,XRelation>? uniqueObjectRelationCluster);

Parameters

uniqueObjectRelationCluster DiGi.Core.Relation.Classes.UniqueObjectRelationCluster<TUniqueObject,XRelation>

The existing cluster to copy from.

UniqueObjectRelationCluster(IEnumerable<TUniqueObject>) Constructor

Initializes a new instance of the UniqueObjectRelationCluster class with the specified unique objects.

public UniqueObjectRelationCluster(System.Collections.Generic.IEnumerable<TUniqueObject>? uniqueObjects);

Parameters

uniqueObjects System.Collections.Generic.IEnumerable<TUniqueObject>

The collection of unique objects to initialize the cluster with.

UniqueObjectRelationCluster(JsonObject) Constructor

Initializes a new instance of the UniqueObjectRelationCluster class from a JSON object.

public UniqueObjectRelationCluster(System.Text.Json.Nodes.JsonObject? jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The JSON object to deserialize into a cluster.

Methods

UniqueObjectRelationCluster<TUniqueObject,XRelation>.AddRelation<ZRelation>(ZRelation) Method

Adds a relation to the cluster and returns it if successfully added.

public ZRelation? AddRelation<ZRelation>(ZRelation? relation)
    where ZRelation : XRelation;

Type parameters

ZRelation

The type of the relation.

Parameters

relation ZRelation

The relation to add to the cluster.

Returns

ZRelation
The added relation if successful; otherwise, null.

UniqueObjectRelationCluster<TUniqueObject,XRelation>.GetRelatedValue<UUniqueObject,ZRelation>(TUniqueObject, Func<UUniqueObject,bool>) Method

Gets a related value of the specified relation type for the given unique object.

public UUniqueObject? GetRelatedValue<UUniqueObject,ZRelation>(TUniqueObject? value, System.Func<UUniqueObject?,bool>? func=null)
    where UUniqueObject : TUniqueObject
    where ZRelation : XRelation;

Type parameters

UUniqueObject

The type of the related unique object.

ZRelation

The type of the relation.

Parameters

value TUniqueObject

The unique object to get a related value for.

func System.Func<UUniqueObject,System.Boolean>

An optional filter function to apply to the related value.

Returns

UUniqueObject
The related value, or null if not found.

UniqueObjectRelationCluster<TUniqueObject,XRelation>.GetRelatedValue<UUniqueObject>(TUniqueObject, Func<UUniqueObject,bool>) Method

Gets a related value of the specified type for the given unique object.

public UUniqueObject? GetRelatedValue<UUniqueObject>(TUniqueObject? value, System.Func<UUniqueObject?,bool>? func=null)
    where UUniqueObject : TUniqueObject;

Type parameters

UUniqueObject

The type of the related unique object.

Parameters

value TUniqueObject

The unique object to get a related value for.

func System.Func<UUniqueObject,System.Boolean>

An optional filter function to apply to the related value.

Returns

UUniqueObject
The related value, or null if not found.

UniqueObjectRelationCluster<TUniqueObject,XRelation>.GetRelatedValueDictionary<UUniqueObject,ZRelation>(IEnumerable<TUniqueObject>, Func<UUniqueObject,bool>) Method

Gets a dictionary mapping unique references to their related values of the specified relation type.

public System.Collections.Generic.Dictionary<DiGi.Core.Interfaces.IUniqueReference,UUniqueObject>? GetRelatedValueDictionary<UUniqueObject,ZRelation>(System.Collections.Generic.IEnumerable<TUniqueObject>? values, System.Func<UUniqueObject?,bool>? func=null)
    where UUniqueObject : TUniqueObject
    where ZRelation : XRelation;

Type parameters

UUniqueObject

The type of the related unique objects.

ZRelation

The type of the relation.

Parameters

values System.Collections.Generic.IEnumerable<TUniqueObject>

The collection of unique objects to get related values for.

func System.Func<UUniqueObject,System.Boolean>

An optional filter function to apply to the related values.

Returns

System.Collections.Generic.Dictionary<DiGi.Core.Interfaces.IUniqueReference,UUniqueObject>
A dictionary mapping unique references to their related values, or null if none are found.

UniqueObjectRelationCluster<TUniqueObject,XRelation>.GetRelatedValues<UUniqueObject,ZRelation>(TUniqueObject, Func<UUniqueObject,bool>) Method

Gets all related values of the specified relation type for the given unique object.

public System.Collections.Generic.List<UUniqueObject>? GetRelatedValues<UUniqueObject,ZRelation>(TUniqueObject? value, System.Func<UUniqueObject?,bool>? func=null)
    where UUniqueObject : TUniqueObject
    where ZRelation : XRelation;

Type parameters

UUniqueObject

The type of the related unique objects.

ZRelation

The type of the relation.

Parameters

value TUniqueObject

The unique object to get related values for.

func System.Func<UUniqueObject,System.Boolean>

An optional filter function to apply to the related values.

Returns

System.Collections.Generic.List<UUniqueObject>
A list of related values, or null if none are found.

UniqueObjectRelationCluster<TUniqueObject,XRelation>.GetRelatedValues<UUniqueObject>(TUniqueObject, Func<UUniqueObject,bool>) Method

Gets all related values for the given unique object.

public System.Collections.Generic.List<UUniqueObject>? GetRelatedValues<UUniqueObject>(TUniqueObject? value, System.Func<UUniqueObject?,bool>? func=null)
    where UUniqueObject : TUniqueObject;

Type parameters

UUniqueObject

The type of the related unique objects.

Parameters

value TUniqueObject

The unique object to get related values for.

func System.Func<UUniqueObject,System.Boolean>

An optional filter function to apply to the related values.

Returns

System.Collections.Generic.List<UUniqueObject>
A list of related values, or null if none are found.

UniqueObjectRelationCluster<TUniqueObject,XRelation>.GetRelation<ZRelation>(IUniqueReference, Func<ZRelation,bool>) Method

Gets the first relation of the specified type that contains the given unique reference and optionally matches the predicate.

public ZRelation? GetRelation<ZRelation>(DiGi.Core.Interfaces.IUniqueReference? uniqueReference, System.Func<ZRelation?,bool>? func=null)
    where ZRelation : XRelation;

Type parameters

ZRelation

The type of relation to retrieve.

Parameters

uniqueReference DiGi.Core.Interfaces.IUniqueReference

The unique reference to search for.

func System.Func<ZRelation,System.Boolean>

An optional predicate to filter the relations.

Returns

ZRelation
The first relation containing the unique reference and matching the predicate, or null.

UniqueObjectRelationCluster<TUniqueObject,XRelation>.GetRelation<ZRelation>(TUniqueObject, Func<ZRelation,bool>) Method

Gets the first relation of the specified type that contains the given unique object and optionally matches the predicate.

public ZRelation? GetRelation<ZRelation>(TUniqueObject? value, System.Func<ZRelation?,bool>? func=null)
    where ZRelation : XRelation;

Type parameters

ZRelation

The type of relation to retrieve.

Parameters

value TUniqueObject

The unique object to search for.

func System.Func<ZRelation,System.Boolean>

An optional predicate to filter the relations.

Returns

ZRelation
The first relation containing the unique object and matching the predicate, or null.

UniqueObjectRelationCluster<TUniqueObject,XRelation>.GetRelations<ZRelation>(IUniqueReference) Method

Gets all relations of the specified type that contain the given unique reference.

public System.Collections.Generic.List<ZRelation>? GetRelations<ZRelation>(DiGi.Core.Interfaces.IUniqueReference? uniqueReference)
    where ZRelation : XRelation;

Type parameters

ZRelation

The type of relation to retrieve.

Parameters

uniqueReference DiGi.Core.Interfaces.IUniqueReference

The unique reference to search for.

Returns

System.Collections.Generic.List<ZRelation>
A list of relations containing the unique reference, or null.

UniqueObjectRelationCluster<TUniqueObject,XRelation>.GetRelations<ZRelation>(IUniqueReference, Func<ZRelation,bool>) Method

Gets all relations of the specified type that contain the given unique reference and optionally match the predicate.

public System.Collections.Generic.List<ZRelation>? GetRelations<ZRelation>(DiGi.Core.Interfaces.IUniqueReference? uniqueReference, System.Func<ZRelation?,bool>? func=null)
    where ZRelation : XRelation;

Type parameters

ZRelation

The type of relation to retrieve.

Parameters

uniqueReference DiGi.Core.Interfaces.IUniqueReference

The unique reference used to filter the relations.

func System.Func<ZRelation,System.Boolean>

An optional predicate to further filter the resulting relations.

Returns

System.Collections.Generic.List<ZRelation>
A list of matching relations, or null if no matches were found.

UniqueObjectRelationCluster<TUniqueObject,XRelation>.GetRelations<ZRelation>(IEnumerable<IUniqueReference>, Func<ZRelation,bool>) Method

Gets all relations of the specified type that contain any of the given unique references and optionally match the predicate.

public System.Collections.Generic.List<ZRelation>? GetRelations<ZRelation>(System.Collections.Generic.IEnumerable<DiGi.Core.Interfaces.IUniqueReference>? uniqueReferences, System.Func<ZRelation?,bool>? func=null)
    where ZRelation : XRelation;

Type parameters

ZRelation

The type of relation to retrieve.

Parameters

uniqueReferences System.Collections.Generic.IEnumerable<DiGi.Core.Interfaces.IUniqueReference>

The collection of unique references used to filter the relations.

func System.Func<ZRelation,System.Boolean>

An optional predicate to further filter the resulting relations.

Returns

System.Collections.Generic.List<ZRelation>
A list of matching relations, or null if no matches were found.

UniqueObjectRelationCluster<TUniqueObject,XRelation>.GetRelations<ZRelation>(IEnumerable<TUniqueObject>, Func<ZRelation,bool>) Method

Gets all relations of the specified type that contain any of the given unique objects and optionally match the predicate.

public System.Collections.Generic.List<ZRelation>? GetRelations<ZRelation>(System.Collections.Generic.IEnumerable<TUniqueObject>? uniqueObjects, System.Func<ZRelation?,bool>? func=null)
    where ZRelation : XRelation;

Type parameters

ZRelation

The type of relation to retrieve.

Parameters

uniqueObjects System.Collections.Generic.IEnumerable<TUniqueObject>

A collection of unique objects to search for.

func System.Func<ZRelation,System.Boolean>

An optional predicate to filter the relations.

Returns

System.Collections.Generic.List<ZRelation>
A list of relations containing any of the specified unique objects and matching the predicate, or null.

UniqueObjectRelationCluster<TUniqueObject,XRelation>.GetRelations<ZRelation>(TUniqueObject, Func<ZRelation,bool>) Method

Gets all relations of the specified type that contain the given unique object and optionally match the predicate.

public System.Collections.Generic.List<ZRelation>? GetRelations<ZRelation>(TUniqueObject? uniqueObject, System.Func<ZRelation?,bool>? func=null)
    where ZRelation : XRelation;

Type parameters

ZRelation

The type of relation to retrieve.

Parameters

uniqueObject TUniqueObject

The unique object to search for.

func System.Func<ZRelation,System.Boolean>

An optional predicate to filter the relations.

Returns

System.Collections.Generic.List<ZRelation>
A list of relations containing the unique object and matching the predicate, or null.

UniqueObjectRelationCluster<TUniqueObject,XRelation>.GetValue<UUniqueObject>(XRelation, RelationSide) Method

Gets the unique object of the specified type from the relation on the given side.

public UUniqueObject? GetValue<UUniqueObject>(XRelation? relation, DiGi.Core.Relation.Enums.RelationSide relationSide)
    where UUniqueObject : TUniqueObject;

Type parameters

UUniqueObject

The type of unique object to retrieve.

Parameters

relation XRelation

The relation to query.

relationSide RelationSide

The side of the relation to retrieve the value from.

Returns

UUniqueObject
The unique object found, or null if no such object exists.

UniqueObjectRelationCluster<TUniqueObject,XRelation>.GetValues<UUniqueObject>(XRelation, RelationSide) Method

Gets all unique objects of the specified type from the relation on the given side.

public System.Collections.Generic.List<UUniqueObject>? GetValues<UUniqueObject>(XRelation? relation, DiGi.Core.Relation.Enums.RelationSide relationSide)
    where UUniqueObject : TUniqueObject;

Type parameters

UUniqueObject

The type of unique object to retrieve.

Parameters

relation XRelation

The relation to query.

relationSide RelationSide

The side of the relation to retrieve values from.

Returns

System.Collections.Generic.List<UUniqueObject>
A list of unique objects found, or null if no objects were found.

UniqueObjectRelationCluster<TUniqueObject,XRelation>.Remove(IEnumerable<IUniqueReference>) Method

Removes the specified unique references and returns the affected references.

public override System.Collections.Generic.List<DiGi.Core.Interfaces.IUniqueReference>? Remove(System.Collections.Generic.IEnumerable<DiGi.Core.Interfaces.IUniqueReference>? keys_2);

Parameters

keys_2 System.Collections.Generic.IEnumerable<DiGi.Core.Interfaces.IUniqueReference>

The collection of unique references to remove.

Returns

System.Collections.Generic.List<DiGi.Core.Interfaces.IUniqueReference>
A list of the removed unique references, or null if no references were removed.

UniqueObjectRelationCluster<TUniqueObject,XRelation>.Remove(TUniqueObject) Method

Removes the specified unique object and its associated relations.

public override bool Remove(TUniqueObject? uniqueObject);

Parameters

uniqueObject TUniqueObject

The unique object to remove.

Returns

System.Boolean
True if the unique object was successfully removed; otherwise, false.

UniqueObjectRelationCluster<TUniqueObject,XRelation>.Remove(XRelation) Method

Removes the specified relation from the cluster.

public virtual bool Remove(XRelation? relation);

Parameters

relation XRelation

The relation to remove.

Returns

System.Boolean
True if the relation was successfully removed; otherwise, false.

UniqueObjectRelationCluster<TUniqueObject,XRelation>.Remove<UUniqueObject>(IEnumerable<UUniqueObject>) Method

Removes the specified unique objects and returns those that were successfully removed.

public override System.Collections.Generic.List<UUniqueObject>? Remove<UUniqueObject>(System.Collections.Generic.IEnumerable<UUniqueObject>? uniqueObjects)
    where UUniqueObject : TUniqueObject;

Type parameters

UUniqueObject

The type of the unique objects.

Parameters

uniqueObjects System.Collections.Generic.IEnumerable<UUniqueObject>

The collection of unique objects to remove.

Returns

System.Collections.Generic.List<UUniqueObject>
A list of unique objects that were successfully removed, or null if none were removed.

UniqueObjectRelationCluster<TUniqueObject,XRelation>.TryGetRelatedValue<UUniqueObject,ZRelation>(UUniqueObject, TUniqueObject, Func<UUniqueObject,bool>) Method

Tries to get a related value of the specified type for the given unique object using the specified relation type.

public bool TryGetRelatedValue<UUniqueObject,ZRelation>(out UUniqueObject? uniqueObject, TUniqueObject? value, System.Func<UUniqueObject?,bool>? func=null)
    where UUniqueObject : TUniqueObject
    where ZRelation : XRelation;

Type parameters

UUniqueObject

The type of the unique object.

ZRelation

The type of the relation.

Parameters

uniqueObject UUniqueObject

When this method returns, contains the related value if found; otherwise, null.

value TUniqueObject

The value to search for.

func System.Func<UUniqueObject,System.Boolean>

An optional function to filter the results.

Returns

System.Boolean
True if a related value was found; otherwise, false.

UniqueObjectRelationCluster<TUniqueObject,XRelation>.TryGetRelatedValue<UUniqueObject>(UUniqueObject, TUniqueObject, Func<UUniqueObject,bool>) Method

Tries to get a related value of the specified type for the given unique object.

public bool TryGetRelatedValue<UUniqueObject>(out UUniqueObject? uniqueObject, TUniqueObject? value, System.Func<UUniqueObject?,bool>? func=null)
    where UUniqueObject : TUniqueObject;

Type parameters

UUniqueObject

The type of the unique object.

Parameters

uniqueObject UUniqueObject

When this method returns, contains the related value if found; otherwise, null.

value TUniqueObject

The value to search for.

func System.Func<UUniqueObject,System.Boolean>

An optional function to filter the results.

Returns

System.Boolean
True if a related value was found; otherwise, false.

UniqueObjectRelationCluster<TUniqueObject,XRelation>.TryGetRelatedValues<UUniqueObject,ZRelation>(List<UUniqueObject>, TUniqueObject, Func<UUniqueObject,bool>) Method

Tries to get all related values of the specified type for the given unique object using the specified relation type.

public bool TryGetRelatedValues<UUniqueObject,ZRelation>(out System.Collections.Generic.List<UUniqueObject>? uniqueObjects, TUniqueObject? value, System.Func<UUniqueObject?,bool>? func=null)
    where UUniqueObject : TUniqueObject
    where ZRelation : XRelation;

Type parameters

UUniqueObject

The type of the unique objects to retrieve.

ZRelation

The type of the relation used to find the values.

Parameters

uniqueObjects System.Collections.Generic.List<UUniqueObject>

When this method returns, contains the list of related unique objects found; otherwise, null.

value TUniqueObject

The unique object for which to retrieve related values.

func System.Func<UUniqueObject,System.Boolean>

An optional predicate to filter the related values.

Returns

System.Boolean
True if one or more related values were found; otherwise, false.

UniqueObjectRelationCluster<TUniqueObject,XRelation>.TryGetRelatedValues<UUniqueObject>(List<UUniqueObject>, TUniqueObject, Func<UUniqueObject,bool>) Method

Tries to get all related values of the specified type for the given unique object.

public bool TryGetRelatedValues<UUniqueObject>(out System.Collections.Generic.List<UUniqueObject>? uniqueObjects, TUniqueObject? value, System.Func<UUniqueObject?,bool>? func=null)
    where UUniqueObject : TUniqueObject;

Type parameters

UUniqueObject

The type of the unique objects to retrieve.

Parameters

uniqueObjects System.Collections.Generic.List<UUniqueObject>

When this method returns, contains the list of related unique objects found; otherwise, null.

value TUniqueObject

The unique object for which to retrieve related values.

func System.Func<UUniqueObject,System.Boolean>

An optional predicate to filter the related values.

Returns

System.Boolean
True if one or more related values were found; otherwise, false.

UniqueObjectRelationCluster<TUniqueObject,XRelation>.TryGetRelation<ZRelation>(IUniqueReference, ZRelation, Func<ZRelation,bool>) Method

Tries to get a relation of the specified type that contains the given unique reference and optionally matches the predicate.

public bool TryGetRelation<ZRelation>(DiGi.Core.Interfaces.IUniqueReference? uniqueReference, out ZRelation? relation, System.Func<ZRelation?,bool>? func=null)
    where ZRelation : XRelation;

Type parameters

ZRelation

The type of relation to retrieve.

Parameters

uniqueReference DiGi.Core.Interfaces.IUniqueReference

The unique reference used to identify the relation.

relation ZRelation

When this method returns, contains the relation found; otherwise, null.

func System.Func<ZRelation,System.Boolean>

An optional predicate to filter the relation.

Returns

System.Boolean
True if a matching relation was found; otherwise, false.

UniqueObjectRelationCluster<TUniqueObject,XRelation>.TryGetRelation<ZRelation>(ZRelation, Func<ZRelation,bool>) Method

Tries to get a relation of the specified type that optionally matches the predicate.

public bool TryGetRelation<ZRelation>(out ZRelation? relation, System.Func<ZRelation?,bool>? func=null)
    where ZRelation : XRelation;

Type parameters

ZRelation

The type of relation to retrieve.

Parameters

relation ZRelation

When this method returns, contains the relation found; otherwise, null.

func System.Func<ZRelation,System.Boolean>

An optional predicate to filter the relation.

Returns

System.Boolean
True if a matching relation was found; otherwise, false.

UniqueObjectRelationCluster<TUniqueObject,XRelation>.TryGetRelations<ZRelation>(List<ZRelation>, Func<ZRelation,bool>) Method

Tries to get all relations of the specified type that optionally match the predicate.

public bool TryGetRelations<ZRelation>(out System.Collections.Generic.List<ZRelation>? relations, System.Func<ZRelation?,bool>? func=null)
    where ZRelation : XRelation;

Type parameters

ZRelation

The type of relation to retrieve.

Parameters

relations System.Collections.Generic.List<ZRelation>

When this method returns, contains the list of relations found; otherwise, null.

func System.Func<ZRelation,System.Boolean>

An optional predicate to filter the relations.

Returns

System.Boolean
True if one or more relations were found; otherwise, false.

UniqueObjectRelationClusterModel<TUniqueObject,XRelation> Class

Provides a base class for unique objects that manage relations through a UniqueObjectRelationCluster.

public abstract class UniqueObjectRelationClusterModel<TUniqueObject,XRelation> : DiGi.Core.Classes.GuidModel
    where TUniqueObject : DiGi.Core.Interfaces.IUniqueObject
    where XRelation : DiGi.Core.Relation.Interfaces.IRelation

Type parameters

TUniqueObject

The type of the unique object.

XRelation

The type of the relation.

Inheritance System.ObjectDiGi.Core.Classes.ObjectDiGi.Core.Classes.SerializableObjectDiGi.Core.Classes.UniqueObjectDiGi.Core.Classes.GuidObjectDiGi.Core.Classes.GuidModel → UniqueObjectRelationClusterModel<TUniqueObject,XRelation>

Constructors

UniqueObjectRelationClusterModel() Constructor

Initializes a new instance of the UniqueObjectRelationClusterModel class.

public UniqueObjectRelationClusterModel();

UniqueObjectRelationClusterModel(UniqueObjectRelationClusterModel<TUniqueObject,XRelation>) Constructor

Initializes a new instance of the UniqueObjectRelationClusterModel class by cloning another instance.

public UniqueObjectRelationClusterModel(DiGi.Core.Relation.Classes.UniqueObjectRelationClusterModel<TUniqueObject,XRelation>? uniqueObjectRelationClusterModel);

Parameters

uniqueObjectRelationClusterModel DiGi.Core.Relation.Classes.UniqueObjectRelationClusterModel<TUniqueObject,XRelation>

The existing model instance to clone from.

UniqueObjectRelationClusterModel(JsonObject) Constructor

Initializes a new instance of the UniqueObjectRelationClusterModel class from a JsonObject.

public UniqueObjectRelationClusterModel(System.Text.Json.Nodes.JsonObject? jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The JSON object to initialize the model from.

Methods

UniqueObjectRelationClusterModel<TUniqueObject,XRelation>.GetNewGuid(Type) Method

Creates a new Guid for a unique object of the specified type.

public System.Guid GetNewGuid(System.Type? type);

Parameters

type System.Type

The type of the unique object.

Returns

System.Guid
A new unique identifier (Guid).

UniqueObjectRelationClusterModel<TUniqueObject,XRelation>.GetNewGuid<YUniqueObject>() Method

Creates a new Guid for a unique object of the specified generic type.

public System.Guid GetNewGuid<YUniqueObject>()
    where YUniqueObject : TUniqueObject;

Type parameters

YUniqueObject

The type of unique object for which to create a new GUID.

Returns

System.Guid
A new unique identifier (Guid).

UniqueObjectRelationClusterModel<TUniqueObject,XRelation>.GetObject<YUniqueObject>(GuidReference) Method

Gets the unique object of the specified type identified by the given GUID reference.

public YUniqueObject? GetObject<YUniqueObject>(DiGi.Core.Classes.GuidReference? guidReference)
    where YUniqueObject : TUniqueObject;

Type parameters

YUniqueObject

The type of unique object to retrieve.

Parameters

guidReference DiGi.Core.Classes.GuidReference

The GUID reference identifying the unique object.

Returns

YUniqueObject
The unique object associated with the provided GUID reference, or null if not found.

UniqueObjectRelationClusterModel<TUniqueObject,XRelation>.GetObject<YUniqueObject>(Func<YUniqueObject,bool>) Method

Gets the first unique object of the specified type that optionally matches the predicate.

public YUniqueObject? GetObject<YUniqueObject>(System.Func<YUniqueObject?,bool>? func=null)
    where YUniqueObject : TUniqueObject;

Type parameters

YUniqueObject

The type of unique object to retrieve.

Parameters

func System.Func<YUniqueObject,System.Boolean>

An optional predicate to filter the unique objects.

Returns

YUniqueObject
The first unique object that matches the predicate, or null if no match is found.

UniqueObjectRelationClusterModel<TUniqueObject,XRelation>.GetObjects<YUniqueObject>(Func<YUniqueObject,bool>) Method

Gets all unique objects of the specified type that optionally match the predicate.

public System.Collections.Generic.List<YUniqueObject>? GetObjects<YUniqueObject>(System.Func<YUniqueObject?,bool>? func=null)
    where YUniqueObject : TUniqueObject;

Type parameters

YUniqueObject

The type of unique object to retrieve.

Parameters

func System.Func<YUniqueObject,System.Boolean>

An optional predicate to filter the unique objects.

Returns

System.Collections.Generic.List<YUniqueObject>
A list of unique objects that match the predicate, or null if none are found.

UniqueObjectRelationClusterModel<TUniqueObject,XRelation>.GetObjects<YUniqueObject>(XRelation, RelationSide, Func<YUniqueObject,bool>) Method

Gets all unique objects of the specified type related through the specified relation on the given side that optionally match the predicate.

public System.Collections.Generic.List<YUniqueObject>? GetObjects<YUniqueObject>(XRelation? relation, DiGi.Core.Relation.Enums.RelationSide relationSide, System.Func<YUniqueObject?,bool>? func=null)
    where YUniqueObject : TUniqueObject;

Type parameters

YUniqueObject

The type of the unique objects to retrieve.

Parameters

relation XRelation

The relation used to find the objects.

relationSide RelationSide

The side of the relation to query.

func System.Func<YUniqueObject,System.Boolean>

An optional predicate to filter the retrieved objects.

Returns

System.Collections.Generic.List<YUniqueObject>
A list of unique objects that match the criteria, or null if none are found.

UniqueObjectRelationClusterModel<TUniqueObject,XRelation>.GetRelatedObject<YUniqueObject>(TUniqueObject, Func<YUniqueObject,bool>) Method

Gets the related object of the specified type for the given unique object that optionally matches the predicate.

public YUniqueObject? GetRelatedObject<YUniqueObject>(TUniqueObject? uniqueObject, System.Func<YUniqueObject?,bool>? func=null)
    where YUniqueObject : TUniqueObject;

Type parameters

YUniqueObject

The type of the related object.

Parameters

uniqueObject TUniqueObject

The unique object to find a relation for.

func System.Func<YUniqueObject,System.Boolean>

An optional predicate to filter the related object.

Returns

YUniqueObject
The related object that matches the criteria, or null if not found.

UniqueObjectRelationClusterModel<TUniqueObject,XRelation>.GetRelatedObjectDictionary<YUniqueObject,URelation>(IEnumerable<TUniqueObject>, Func<YUniqueObject,bool>) Method

Gets a dictionary mapping unique references to related objects of the specified type using the specified relation type.

public virtual System.Collections.Generic.Dictionary<DiGi.Core.Interfaces.IUniqueReference,YUniqueObject>? GetRelatedObjectDictionary<YUniqueObject,URelation>(System.Collections.Generic.IEnumerable<TUniqueObject>? uniqueObjects, System.Func<YUniqueObject?,bool>? func=null)
    where YUniqueObject : TUniqueObject
    where URelation : XRelation;

Type parameters

YUniqueObject

The type of the related objects.

URelation

The type of the relation used for mapping.

Parameters

uniqueObjects System.Collections.Generic.IEnumerable<TUniqueObject>

The collection of unique objects to find relations for.

func System.Func<YUniqueObject,System.Boolean>

An optional predicate to filter the related objects.

Returns

System.Collections.Generic.Dictionary<DiGi.Core.Interfaces.IUniqueReference,YUniqueObject>
A dictionary mapping unique references to their corresponding related objects, or null if none are found.

UniqueObjectRelationClusterModel<TUniqueObject,XRelation>.GetRelatedObjectDictionary<YUniqueObject>(IEnumerable<TUniqueObject>, Func<YUniqueObject,bool>) Method

Gets a dictionary mapping unique references to related objects of the specified type for the given unique objects.

public System.Collections.Generic.Dictionary<DiGi.Core.Interfaces.IUniqueReference,YUniqueObject>? GetRelatedObjectDictionary<YUniqueObject>(System.Collections.Generic.IEnumerable<TUniqueObject>? uniqueObjects, System.Func<YUniqueObject?,bool>? func=null)
    where YUniqueObject : TUniqueObject;

Type parameters

YUniqueObject

The type of the related objects.

Parameters

uniqueObjects System.Collections.Generic.IEnumerable<TUniqueObject>

The collection of unique objects to find relations for.

func System.Func<YUniqueObject,System.Boolean>

An optional predicate to filter the related objects.

Returns

System.Collections.Generic.Dictionary<DiGi.Core.Interfaces.IUniqueReference,YUniqueObject>
A dictionary mapping unique references to their corresponding related objects, or null if none are found.

UniqueObjectRelationClusterModel<TUniqueObject,XRelation>.GetRelatedObjects<YUniqueObject>(IEnumerable<TUniqueObject>, Func<YUniqueObject,bool>) Method

Gets all related objects of the specified type for the given unique objects that optionally match the predicate.

public System.Collections.Generic.List<YUniqueObject>? GetRelatedObjects<YUniqueObject>(System.Collections.Generic.IEnumerable<TUniqueObject>? uniqueObjects, System.Func<YUniqueObject?,bool>? func=null)
    where YUniqueObject : TUniqueObject;

Type parameters

YUniqueObject

The type of the related objects.

Parameters

uniqueObjects System.Collections.Generic.IEnumerable<TUniqueObject>

The collection of unique objects to find relations for.

func System.Func<YUniqueObject,System.Boolean>

An optional predicate to filter the related objects.

Returns

System.Collections.Generic.List<YUniqueObject>
A list of related objects that match the criteria, or null if none are found.

UniqueObjectRelationClusterModel<TUniqueObject,XRelation>.GetRelatedObjects<YUniqueObject>(TUniqueObject, Func<YUniqueObject,bool>) Method

Gets all related objects of the specified type for the given unique object that optionally match the predicate.

public System.Collections.Generic.List<YUniqueObject>? GetRelatedObjects<YUniqueObject>(TUniqueObject? uniqueObject, System.Func<YUniqueObject?,bool>? func=null)
    where YUniqueObject : TUniqueObject;

Type parameters

YUniqueObject

The type of the related objects.

Parameters

uniqueObject TUniqueObject

The unique object to find relations for.

func System.Func<YUniqueObject,System.Boolean>

An optional predicate to filter the related objects.

Returns

System.Collections.Generic.List<YUniqueObject>
A list of related objects that match the predicate, or null if none are found.

UniqueObjectRelationClusterModel<TUniqueObject,XRelation>.GetRelation<URelation>(TUniqueObject, Func<URelation,bool>) Method

Gets the relation of the specified type for the given unique object that optionally matches the predicate.

public URelation? GetRelation<URelation>(TUniqueObject? uniqueObject, System.Func<URelation?,bool>? func=null)
    where URelation : XRelation;

Type parameters

URelation

The type of the relation.

Parameters

uniqueObject TUniqueObject

The unique object for which to get the relation.

func System.Func<URelation,System.Boolean>

An optional predicate to filter the relation.

Returns

URelation
The relation that matches the predicate, or null if not found.

UniqueObjectRelationClusterModel<TUniqueObject,XRelation>.GetRelation<YUniqueObject>(Func<YUniqueObject,bool>) Method

Gets the first relation of the specified type that optionally matches the predicate.

public YUniqueObject? GetRelation<YUniqueObject>(System.Func<YUniqueObject?,bool>? func=null)
    where YUniqueObject : XRelation;

Type parameters

YUniqueObject

The type of the unique object.

Parameters

func System.Func<YUniqueObject,System.Boolean>

An optional predicate to filter the result.

Returns

YUniqueObject
The first matching unique object, or null if not found.

UniqueObjectRelationClusterModel<TUniqueObject,XRelation>.GetRelations<URelation>(Func<URelation,bool>) Method

Gets all relations of the specified type that optionally match the predicate.

public System.Collections.Generic.List<URelation>? GetRelations<URelation>(System.Func<URelation?,bool>? func=null)
    where URelation : XRelation;

Type parameters

URelation

The type of the relation.

Parameters

func System.Func<URelation,System.Boolean>

An optional predicate to filter the relations.

Returns

System.Collections.Generic.List<URelation>
A list of relations that match the predicate, or null if none are found.

UniqueObjectRelationClusterModel<TUniqueObject,XRelation>.TryGetObject<YUniqueObject>(GuidReference, YUniqueObject) Method

Determines whether a unique object of the specified type exists for the given GUID reference.

public bool TryGetObject<YUniqueObject>(DiGi.Core.Classes.GuidReference? guidReference, out YUniqueObject? uniqueObject)
    where YUniqueObject : TUniqueObject;

Type parameters

YUniqueObject

The type of the unique object to retrieve.

Parameters

guidReference DiGi.Core.Classes.GuidReference

The GUID reference of the unique object.

uniqueObject YUniqueObject

When this method returns, contains the unique object if found; otherwise, null.

Returns

System.Boolean
True if a unique object was found for the given GUID reference; otherwise, false.

UniqueObjectRelationClusterModel<TUniqueObject,XRelation>.TryGetObject<YUniqueObject>(YUniqueObject, Func<YUniqueObject,bool>) Method

Determines whether a unique object of the specified type exists and optionally matches the predicate.

public virtual bool TryGetObject<YUniqueObject>(out YUniqueObject? uniqueObject, System.Func<YUniqueObject?,bool>? func=null)
    where YUniqueObject : TUniqueObject;

Type parameters

YUniqueObject

The type of the unique object.

Parameters

uniqueObject YUniqueObject

When this method returns, contains the unique object if found; otherwise, null.

func System.Func<YUniqueObject,System.Boolean>

An optional predicate to filter the unique object.

Returns

System.Boolean
True if the unique object was found and matches the predicate; otherwise, false.

UniqueObjectRelationClusterModel<TUniqueObject,XRelation>.TryGetObjects<YUniqueObject>(List<YUniqueObject>, Func<YUniqueObject,bool>) Method

Determines whether any unique objects of the specified type exist and optionally match the predicate.

public virtual bool TryGetObjects<YUniqueObject>(out System.Collections.Generic.List<YUniqueObject>? uniqueObjects, System.Func<YUniqueObject?,bool>? func=null)
    where YUniqueObject : TUniqueObject;

Type parameters

YUniqueObject

The type of the unique objects to retrieve.

Parameters

uniqueObjects System.Collections.Generic.List<YUniqueObject>

When this method returns, contains a list of found unique objects if any exist; otherwise, null.

func System.Func<YUniqueObject,System.Boolean>

An optional predicate to filter the unique objects.

Returns

System.Boolean
True if one or more unique objects were found that match the predicate; otherwise, false.

UniqueObjectRelationClusterModel<TUniqueObject,XRelation>.TryGetObjects<YUniqueObject>(XRelation, RelationSide, List<YUniqueObject>, Func<YUniqueObject,bool>) Method

Determines whether any unique objects of the specified type exist that are related through the specified relation on the given side and optionally match the predicate.

public virtual bool TryGetObjects<YUniqueObject>(XRelation? relation, DiGi.Core.Relation.Enums.RelationSide relationSide, out System.Collections.Generic.List<YUniqueObject>? uniqueObjects, System.Func<YUniqueObject?,bool>? func=null)
    where YUniqueObject : TUniqueObject;

Type parameters

YUniqueObject

The type of the unique objects to retrieve.

Parameters

relation XRelation

The relation used to find the unique objects.

relationSide RelationSide

The side of the relation to search on.

uniqueObjects System.Collections.Generic.List<YUniqueObject>

When this method returns, contains a list of found unique objects if any exist; otherwise, null.

func System.Func<YUniqueObject,System.Boolean>

An optional predicate to filter the unique objects.

Returns

System.Boolean
True if one or more unique objects were found that match the predicate; otherwise, false.

UniqueObjectRelationClusterModel<TUniqueObject,XRelation>.TryGetRelatedObject<YUniqueObject,URelation>(TUniqueObject, YUniqueObject, Func<YUniqueObject,bool>) Method

Determines whether a related object of the specified type exists for the given unique object using the specified relation type and optionally matches the predicate.

public virtual bool TryGetRelatedObject<YUniqueObject,URelation>(TUniqueObject? uniqueObject, out YUniqueObject? relatedUniqueObject, System.Func<YUniqueObject?,bool>? func=null)
    where YUniqueObject : TUniqueObject
    where URelation : XRelation;

Type parameters

YUniqueObject

The type of the related unique object.

URelation

The type of the relation used to find the related object.

Parameters

uniqueObject TUniqueObject

The unique object for which to find a related object.

relatedUniqueObject YUniqueObject

When this method returns, contains the related unique object if found; otherwise, null.

func System.Func<YUniqueObject,System.Boolean>

An optional predicate to filter the related object.

Returns

System.Boolean
True if a related object was found that matches the predicate; otherwise, false.

UniqueObjectRelationClusterModel<TUniqueObject,XRelation>.TryGetRelatedObject<YUniqueObject>(TUniqueObject, YUniqueObject, Func<YUniqueObject,bool>) Method

Determines whether a related object of the specified type exists for the given unique object and optionally matches the predicate.

public virtual bool TryGetRelatedObject<YUniqueObject>(TUniqueObject? uniqueObject, out YUniqueObject? relatedUniqueObject, System.Func<YUniqueObject?,bool>? func=null)
    where YUniqueObject : TUniqueObject;

Type parameters

YUniqueObject

The type of the related unique object.

Parameters

uniqueObject TUniqueObject

The unique object for which to find a related object.

relatedUniqueObject YUniqueObject

When this method returns, contains the related unique object if found; otherwise, null.

func System.Func<YUniqueObject,System.Boolean>

An optional predicate to filter the related object.

Returns

System.Boolean
True if a related object was found that matches the predicate; otherwise, false.

UniqueObjectRelationClusterModel<TUniqueObject,XRelation>.TryGetRelatedObjects<YUniqueObject,URelation>(TUniqueObject, List<YUniqueObject>, Func<YUniqueObject,bool>) Method

Determines whether any related objects of the specified type exist for the given unique object using the specified relation type and optionally match the predicate.

public virtual bool TryGetRelatedObjects<YUniqueObject,URelation>(TUniqueObject? uniqueObject, out System.Collections.Generic.List<YUniqueObject>? uniqueObjects, System.Func<YUniqueObject?,bool>? func=null)
    where YUniqueObject : TUniqueObject
    where URelation : XRelation;

Type parameters

YUniqueObject

The type of the related objects.

URelation

The type of the relation used to identify related objects.

Parameters

uniqueObject TUniqueObject

The unique object to evaluate.

uniqueObjects System.Collections.Generic.List<YUniqueObject>

When this method returns, contains a list of related objects found; otherwise, null.

func System.Func<YUniqueObject,System.Boolean>

An optional predicate used to filter the related objects.

Returns

System.Boolean
True if one or more related objects were found; otherwise, false.

UniqueObjectRelationClusterModel<TUniqueObject,XRelation>.TryGetRelatedObjects<YUniqueObject>(TUniqueObject, List<YUniqueObject>, Func<YUniqueObject,bool>) Method

Determines whether any related objects of the specified type exist for the given unique object and optionally match the predicate.

public virtual bool TryGetRelatedObjects<YUniqueObject>(TUniqueObject? uniqueObject, out System.Collections.Generic.List<YUniqueObject>? uniqueObjects, System.Func<YUniqueObject?,bool>? func=null)
    where YUniqueObject : TUniqueObject;

Type parameters

YUniqueObject

The type of the related objects.

Parameters

uniqueObject TUniqueObject

The unique object to evaluate.

uniqueObjects System.Collections.Generic.List<YUniqueObject>

When this method returns, contains a list of related objects found; otherwise, null.

func System.Func<YUniqueObject,System.Boolean>

An optional predicate used to filter the related objects.

Returns

System.Boolean
True if one or more related objects were found; otherwise, false.

UniqueObjectRelationClusterModel<TUniqueObject,XRelation>.TryGetRelation<URelation>(TUniqueObject, URelation, Func<URelation,bool>) Method

Determines whether a relation of the specified type exists for the given unique object and optionally matches the predicate.

public bool TryGetRelation<URelation>(TUniqueObject uniqueObject, out URelation? relation, System.Func<URelation?,bool>? func=null)
    where URelation : XRelation;

Type parameters

URelation

The type of relation to search for.

Parameters

uniqueObject TUniqueObject

The unique object to evaluate.

relation URelation

When this method returns, contains the relation found; otherwise, null.

func System.Func<URelation,System.Boolean>

An optional predicate used to filter the relation.

Returns

System.Boolean
True if a relation was found for the specified object; otherwise, false.

UniqueObjectRelationClusterModel<TUniqueObject,XRelation>.TryGetRelation<URelation>(URelation, Func<URelation,bool>) Method

Determines whether a relation of the specified type exists and optionally matches the predicate.

public virtual bool TryGetRelation<URelation>(out URelation? relation, System.Func<URelation?,bool>? func=null)
    where URelation : XRelation;

Type parameters

URelation

The type of relation to search for.

Parameters

relation URelation

When this method returns, contains the relation found; otherwise, null.

func System.Func<URelation,System.Boolean>

An optional predicate used to filter the relation.

Returns

System.Boolean
True if a relation was found; otherwise, false.

UniqueObjectRelationClusterModel<TUniqueObject,XRelation>.TryGetRelations<URelation>(List<URelation>, Func<URelation,bool>) Method

Determines whether any relations of the specified type exist and optionally match the predicate.

public virtual bool TryGetRelations<URelation>(out System.Collections.Generic.List<URelation>? relations, System.Func<URelation?,bool>? func=null)
    where URelation : XRelation;

Type parameters

URelation

The type of relation to search for.

Parameters

relations System.Collections.Generic.List<URelation>

When this method returns, contains a list of relations found; otherwise, null.

func System.Func<URelation,System.Boolean>

An optional predicate used to filter the relations.

Returns

System.Boolean
True if one or more relations were found; otherwise, false.

Clone this wiki locally