Table of Contents

Class Node<TObject, TKey>

Namespace
DynamicData
Assembly
DynamicData.dll

Node describing the relationship between and item and it's ancestors and descendent.

public class Node<TObject, TKey> : IDisposable, IEquatable<Node<TObject, TKey>> where TObject : class where TKey : notnull

Type Parameters

TObject

The type of the object.

TKey

The type of the key.

Inheritance
Node<TObject, TKey>
Implements
IEquatable<Node<TObject, TKey>>
Extension Methods
WhenAnyMixin.WhenAny<TSender, TRet, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>(TSender?, Expression<Func<TSender, T1>>, Expression<Func<TSender, T2>>, Expression<Func<TSender, T3>>, Expression<Func<TSender, T4>>, Expression<Func<TSender, T5>>, Expression<Func<TSender, T6>>, Expression<Func<TSender, T7>>, Expression<Func<TSender, T8>>, Expression<Func<TSender, T9>>, Expression<Func<TSender, T10>>, Expression<Func<TSender, T11>>, Expression<Func<TSender, T12>>, Func<IObservedChange<TSender, T1>, IObservedChange<TSender, T2>, IObservedChange<TSender, T3>, IObservedChange<TSender, T4>, IObservedChange<TSender, T5>, IObservedChange<TSender, T6>, IObservedChange<TSender, T7>, IObservedChange<TSender, T8>, IObservedChange<TSender, T9>, IObservedChange<TSender, T10>, IObservedChange<TSender, T11>, IObservedChange<TSender, T12>, TRet>)
WhenAnyMixin.WhenAny<TSender, TRet, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>(TSender?, Expression<Func<TSender, T1>>, Expression<Func<TSender, T2>>, Expression<Func<TSender, T3>>, Expression<Func<TSender, T4>>, Expression<Func<TSender, T5>>, Expression<Func<TSender, T6>>, Expression<Func<TSender, T7>>, Expression<Func<TSender, T8>>, Expression<Func<TSender, T9>>, Expression<Func<TSender, T10>>, Expression<Func<TSender, T11>>, Expression<Func<TSender, T12>>, Func<IObservedChange<TSender, T1>, IObservedChange<TSender, T2>, IObservedChange<TSender, T3>, IObservedChange<TSender, T4>, IObservedChange<TSender, T5>, IObservedChange<TSender, T6>, IObservedChange<TSender, T7>, IObservedChange<TSender, T8>, IObservedChange<TSender, T9>, IObservedChange<TSender, T10>, IObservedChange<TSender, T11>, IObservedChange<TSender, T12>, TRet>)
WhenAnyMixin.WhenAny<TSender, TRet, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>(TSender?, Expression<Func<TSender, T1>>, Expression<Func<TSender, T2>>, Expression<Func<TSender, T3>>, Expression<Func<TSender, T4>>, Expression<Func<TSender, T5>>, Expression<Func<TSender, T6>>, Expression<Func<TSender, T7>>, Expression<Func<TSender, T8>>, Expression<Func<TSender, T9>>, Expression<Func<TSender, T10>>, Expression<Func<TSender, T11>>, Expression<Func<TSender, T12>>, Func<IObservedChange<TSender, T1>, IObservedChange<TSender, T2>, IObservedChange<TSender, T3>, IObservedChange<TSender, T4>, IObservedChange<TSender, T5>, IObservedChange<TSender, T6>, IObservedChange<TSender, T7>, IObservedChange<TSender, T8>, IObservedChange<TSender, T9>, IObservedChange<TSender, T10>, IObservedChange<TSender, T11>, IObservedChange<TSender, T12>, TRet>)
WhenAnyMixin.WhenAny<TSender, TRet, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>(TSender?, Expression<Func<TSender, T1>>, Expression<Func<TSender, T2>>, Expression<Func<TSender, T3>>, Expression<Func<TSender, T4>>, Expression<Func<TSender, T5>>, Expression<Func<TSender, T6>>, Expression<Func<TSender, T7>>, Expression<Func<TSender, T8>>, Expression<Func<TSender, T9>>, Expression<Func<TSender, T10>>, Expression<Func<TSender, T11>>, Expression<Func<TSender, T12>>, Func<IObservedChange<TSender, T1>, IObservedChange<TSender, T2>, IObservedChange<TSender, T3>, IObservedChange<TSender, T4>, IObservedChange<TSender, T5>, IObservedChange<TSender, T6>, IObservedChange<TSender, T7>, IObservedChange<TSender, T8>, IObservedChange<TSender, T9>, IObservedChange<TSender, T10>, IObservedChange<TSender, T11>, IObservedChange<TSender, T12>, TRet>)

Constructors

Node(TObject, TKey)

Initializes a new instance of the Node<TObject, TKey> class.

public Node(TObject item, TKey key)

Parameters

item TObject

The item.

key TKey

The key.

Node(TObject, TKey, in Optional<Node<TObject, TKey>>)

Initializes a new instance of the Node<TObject, TKey> class.

public Node(TObject item, TKey key, in Optional<Node<TObject, TKey>> parent)

Parameters

item TObject

The item.

key TKey

The key.

parent Optional<Node<TObject, TKey>>

The parent.

Properties

Children

Gets the child nodes.

public IObservableCache<Node<TObject, TKey>, TKey> Children { get; }

Property Value

IObservableCache<Node<TObject, TKey>, TKey>

Depth

Gets the depth i.e. how many degrees of separation from the parent.

public int Depth { get; }

Property Value

int

IsRoot

Gets a value indicating whether this instance is root.

public bool IsRoot { get; }

Property Value

bool

true if this instance is root node; otherwise, false.

Item

Gets the item.

public TObject Item { get; }

Property Value

TObject

Key

Gets the key.

public TKey Key { get; }

Property Value

TKey

Parent

Gets the parent if it has one.

public Optional<Node<TObject, TKey>> Parent { get; }

Property Value

Optional<Node<TObject, TKey>>

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

Dispose(bool)

Disposes any managed or unmanaged resources.

protected virtual void Dispose(bool isDisposing)

Parameters

isDisposing bool

If the dispose is being called by the Dispose method.

Equals(Node<TObject, TKey>?)

Determines whether the specified object is equal to the current object.

public bool Equals(Node<TObject, TKey>? other)

Parameters

other Node<TObject, TKey>

The object to compare with the current object.

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

Equals(object?)

Determines whether the specified object is equal to the current object.

public override bool Equals(object? obj)

Parameters

obj object

The object to compare with the current object.

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

ToString()

Returns a string that represents this instance.

public override string ToString()

Returns

string

A string that represents this instance.

Operators

operator ==(Node<TObject, TKey>?, Node<TObject, TKey>?)

Determines whether the specified objects are equal.

public static bool operator ==(Node<TObject, TKey>? left, Node<TObject, TKey>? right)

Parameters

left Node<TObject, TKey>

The left value to compare.

right Node<TObject, TKey>

The right value to compare.

Returns

bool

If the two values are equal.

operator !=(Node<TObject, TKey>, Node<TObject, TKey>)

Determines whether the specified objects are not equal.

public static bool operator !=(Node<TObject, TKey> left, Node<TObject, TKey> right)

Parameters

left Node<TObject, TKey>

The left value to compare.

right Node<TObject, TKey>

The right value to compare.

Returns

bool

If the two values are not equal.