Skip to content

DiGi.Core.Relation

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

DiGi.Core.Relation Namespace

Classes

Modify Class

Provides methods for modifying relations.

public static class Modify

Inheritance System.Object → Modify

Methods

Modify.RemoveFirst<TReference>(this List<TReference>, IReference) Method

Removes the first occurrence of the specified reference from the list.

public static bool RemoveFirst<TReference>(this System.Collections.Generic.List<TReference>? references, DiGi.Core.Interfaces.IReference? reference)
    where TReference : DiGi.Core.Interfaces.IReference;

Type parameters

TReference

The type of elements in the references list.

Parameters

references System.Collections.Generic.List<TReference>

The list of references to remove the item from.

reference DiGi.Core.Interfaces.IReference

The reference to remove from the list.

Returns

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

Query Class

Provides methods for querying relations.

public static class Query

Inheritance System.Object → Query

Methods

Query.IsValid(this IRelation, Type, RelationSide) Method

Determines whether the relation is valid for the specified type and side.

public static bool IsValid(this DiGi.Core.Relation.Interfaces.IRelation? relation, System.Type? type, DiGi.Core.Relation.Enums.RelationSide relationSide);

Parameters

relation IRelation

The relation to validate.

type System.Type

The type to check against.

relationSide RelationSide

The side of the relation.

Returns

System.Boolean
True if the relation is valid; otherwise, false.

Query.UniqueReferences(this IRelation, RelationSide) Method

Gets the set of unique references from the relation on the specified side.

public static System.Collections.Generic.HashSet<DiGi.Core.Interfaces.IUniqueReference>? UniqueReferences(this DiGi.Core.Relation.Interfaces.IRelation? relation, DiGi.Core.Relation.Enums.RelationSide relationSide);

Parameters

relation IRelation

The relation to retrieve unique references from.

relationSide RelationSide

The side of the relation to check.

Returns

System.Collections.Generic.HashSet<DiGi.Core.Interfaces.IUniqueReference>
A set of unique references, or null if none exist.

Clone this wiki locally