Table of Contents

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

paths IEnumerable<RelationshipPath>

RelationshipTree(IEntityInfo, IEnumerable<RelationshipPath>?)

public RelationshipTree(IEntityInfo type, IEnumerable<RelationshipPath>? paths = null)

Parameters

type IEntityInfo
paths IEnumerable<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

key RelationshipInfo

The key to locate.

Property Value

RelationshipTree

The element that has the specified key in the read-only dictionary.

Exceptions

ArgumentNullException

key is null.

KeyNotFoundException

The property is retrieved and key is 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

IEntityInfo

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

path RelationshipPath

AddRange(IEnumerable<RelationshipPath>)

public void AddRange(IEnumerable<RelationshipPath> paths)

Parameters

paths IEnumerable<RelationshipPath>

ContainsKey(RelationshipInfo)

Determines whether the read-only dictionary contains an element that has the specified key.

public bool ContainsKey(RelationshipInfo key)

Parameters

key RelationshipInfo

The key to locate.

Returns

bool

true if the read-only dictionary contains an element that has the specified key; otherwise, false.

Exceptions

ArgumentNullException

key is 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

relationship RelationshipInfo

Returns

RelationshipTree

TryGetValue(RelationshipInfo, out RelationshipTree)

Gets the value that is associated with the specified key.

public bool TryGetValue(RelationshipInfo key, out RelationshipTree value)

Parameters

key RelationshipInfo

The key to locate.

value RelationshipTree

When this method returns, the value associated with the specified key, if the key is found; otherwise, the default value for the type of the value parameter. 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

key is null.