-
Notifications
You must be signed in to change notification settings - Fork 0
DiGi.Core.Relation
Provides methods for modifying relations.
public static class ModifyInheritance System.Object → Modify
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;TReference
The type of elements in the references list.
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.
System.Boolean
True if the reference was successfully removed; otherwise, false.
Provides methods for querying relations.
public static class QueryInheritance System.Object → Query
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);relation IRelation
The relation to validate.
type System.Type
The type to check against.
relationSide RelationSide
The side of the relation.
System.Boolean
True if the relation is valid; otherwise, false.
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);relation IRelation
The relation to retrieve unique references from.
relationSide RelationSide
The side of the relation to check.
System.Collections.Generic.HashSet<DiGi.Core.Interfaces.IUniqueReference>
A set of unique references, or null if none exist.