Class Node<TObject, TKey>
- Namespace
- Dynamic
Data
- 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>>
Constructors
Node(TObject, TKey)
Initializes a new instance of the Node<TObject, TKey> class.
Parameters
item
TObjectThe item.
key
TKeyThe key.
Node(TObject, TKey, in Optional<Node<TObject, TKey>>)
Initializes a new instance of the Node<TObject, TKey> class.
Parameters
Properties
Children
Gets the child nodes.
Property Value
- IObservable
Cache <Node<TObject, TKey>, TKey>
Depth
Gets the depth i.e. how many degrees of separation from the parent.
Property Value
IsRoot
Gets a value indicating whether this instance is root.
Property Value
- bool
true
if this instance is root node; otherwise,false
.
Item
Gets the item.
Property Value
- TObject
Key
Gets the key.
Property Value
- TKey
Parent
Gets the parent if it has one.
Property Value
Methods
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Dispose(bool)
Disposes any managed or unmanaged resources.
Parameters
isDisposing
boolIf the dispose is being called by the Dispose method.
Equals(Node<TObject, TKey>?)
Determines whether the specified object is equal to the current object.
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.
Parameters
obj
objectThe 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.
Returns
- int
A hash code for the current object.
ToString()
Returns a string that represents this instance.
Returns
Operators
operator ==(Node<TObject, TKey>?, Node<TObject, TKey>?)
Determines whether the specified objects are equal.
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.
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.