Class RelationshipTree
- Namespace
- The.Relationships
- Assembly
- Instagile.dll
public sealed class RelationshipTree : IReadOnlyCollection<RelationshipPath>, IEnumerable<RelationshipPath>, IRelationshipTree<RelationshipTree>, IReadOnlyDictionary<RelationshipInfo, RelationshipTree>, IReadOnlyCollection<KeyValuePair<RelationshipInfo, RelationshipTree>>, IEnumerable<KeyValuePair<RelationshipInfo, RelationshipTree>>, IEnumerable
- Inheritance
-
RelationshipTree
- Implements
- Inherited Members
Constructors
RelationshipTree(IEnumerable<RelationshipPath>)
public RelationshipTree(IEnumerable<RelationshipPath> paths)
Parameters
pathsIEnumerable<RelationshipPath>
RelationshipTree(IEntityInfo, IEnumerable<RelationshipPath>?)
public RelationshipTree(IEntityInfo type, IEnumerable<RelationshipPath>? paths = null)
Parameters
typeIEntityInfopathsIEnumerable<RelationshipPath>
Properties
Count
Gets the number of elements in the collection.
public int Count { get; }
Property Value
- int
The number of elements in the collection.
this[RelationshipInfo]
Gets the element that has the specified key in the read-only dictionary.
public RelationshipTree this[RelationshipInfo key] { get; }
Parameters
keyRelationshipInfoThe key to locate.
Property Value
- RelationshipTree
The element that has the specified key in the read-only dictionary.
Exceptions
- ArgumentNullException
keyis null.- KeyNotFoundException
The property is retrieved and
keyis not found.
Keys
Gets an enumerable collection that contains the keys in the read-only dictionary.
public IEnumerable<RelationshipInfo> Keys { get; }
Property Value
- IEnumerable<RelationshipInfo>
An enumerable collection that contains the keys in the read-only dictionary.
Metadata
public IEntityInfo Metadata { get; }
Property Value
Values
Gets an enumerable collection that contains the values in the read-only dictionary.
public IEnumerable<RelationshipTree> Values { get; }
Property Value
- IEnumerable<RelationshipTree>
An enumerable collection that contains the values in the read-only dictionary.
Methods
Add(RelationshipPath)
public void Add(RelationshipPath path)
Parameters
pathRelationshipPath
AddRange(IEnumerable<RelationshipPath>)
public void AddRange(IEnumerable<RelationshipPath> paths)
Parameters
pathsIEnumerable<RelationshipPath>
ContainsKey(RelationshipInfo)
Determines whether the read-only dictionary contains an element that has the specified key.
public bool ContainsKey(RelationshipInfo key)
Parameters
keyRelationshipInfoThe key to locate.
Returns
- bool
true if the read-only dictionary contains an element that has the specified key; otherwise, false.
Exceptions
- ArgumentNullException
keyis null.
GetEnumerator()
Returns an enumerator that iterates through the collection.
public IEnumerator<KeyValuePair<RelationshipInfo, RelationshipTree>> GetEnumerator()
Returns
- IEnumerator<KeyValuePair<RelationshipInfo, RelationshipTree>>
An enumerator that can be used to iterate through the collection.
Prepend(RelationshipInfo)
public RelationshipTree Prepend(RelationshipInfo relationship)
Parameters
relationshipRelationshipInfo
Returns
TryGetValue(RelationshipInfo, out RelationshipTree)
Gets the value that is associated with the specified key.
public bool TryGetValue(RelationshipInfo key, out RelationshipTree value)
Parameters
keyRelationshipInfoThe key to locate.
valueRelationshipTreeWhen this method returns, the value associated with the specified key, if the key is found; otherwise, the default value for the type of the
valueparameter. This parameter is passed uninitialized.
Returns
- bool
true if the object that implements the IReadOnlyDictionary<TKey, TValue> interface contains an element that has the specified key; otherwise, false.
Exceptions
- ArgumentNullException
keyis null.