Class RelationshipPath
- Namespace
- The.Relationships
- Assembly
- Instagile.dll
A sequence of relationships leading from a source entity type to a destination entity type, used as the key for includes, preloads and navigation. Enumerating a path yields its relationships from the source outwards.
public abstract record RelationshipPath : IEnumerable<RelationshipInfo>, IEnumerable, IEquatable<RelationshipPath>
- Inheritance
-
RelationshipPath
- Implements
- Derived
- Inherited Members
Methods
Append(RelationshipInfo)
public RelationshipPath Append(RelationshipInfo relationship)
Parameters
relationshipRelationshipInfo
Returns
Concat(RelationshipPath)
Joins other onto the end of this path; its source must be this path's destination.
public abstract RelationshipPath Concat(RelationshipPath other)
Parameters
otherRelationshipPath
Returns
Create(IEntityInfo)
The empty path at type, from which longer paths are built with Append(RelationshipInfo).
public static RelationshipPath Create(IEntityInfo type)
Parameters
typeIEntityInfo
Returns
Create(RelationshipInfo, params RelationshipInfo[])
public static RelationshipPath Create(RelationshipInfo firstRelationship, params RelationshipInfo[] otherRelationships)
Parameters
firstRelationshipRelationshipInfootherRelationshipsRelationshipInfo[]
Returns
GetDestination()
public abstract IEntityInfo GetDestination()
Returns
GetEnumerator()
public RelationshipPath.Enumerator GetEnumerator()
Returns
GetPrefixes()
This path's non-empty prefixes, shortest first and ending with this path itself.
public IEnumerable<RelationshipPath> GetPrefixes()
Returns
GetSource()
public abstract IEntityInfo GetSource()
Returns
Invert()
The path from this path's destination back to its source, through the other side of each relationship.
public RelationshipPath Invert()
Returns
Parent()
This path without its last relationship: the empty path at the source, for a path of one relationship.
public abstract RelationshipPath Parent()
Returns
ToString()
Returns a string that represents the current object.
public override abstract string ToString()
Returns
- string
A string that represents the current object.
Operators
implicit operator RelationshipPath(RelationshipInfo)
public static implicit operator RelationshipPath(RelationshipInfo relationship)
Parameters
relationshipRelationshipInfo