Class ChainLink<T>
A link between two nodes in a Chain<T>.
public class ChainLink<T>
Type Parameters
T
The node data type.
- Inheritance
-
ChainLink<T>
- Inherited Members
Constructors
ChainLink()
Initializes a new instance of the ChainLink<T> class.
public ChainLink()
ChainLink(string, ChainNode<T>?, ChainNode<T>?)
Initializes a new instance of the ChainLink<T> class.
public ChainLink(string tag, ChainNode<T>? source, ChainNode<T>? target)
Parameters
Exceptions
- ArgumentNullException
tag
- ArgumentException
Both source and target are null.
Properties
IsHead
Gets a value indicating whether this link is a head link.
public bool IsHead { get; }
Property Value
IsTail
Gets a value indicating whether this link is a tail link.
public bool IsTail { get; }
Property Value
Source
Gets or sets the source node.
public ChainNode<T>? Source { get; set; }
Property Value
- ChainNode<T>
Tag
Gets or sets the version tag for this link.
public string Tag { get; set; }
Property Value
Target
Gets or sets the target node.
public ChainNode<T>? Target { get; set; }
Property Value
- ChainNode<T>
Methods
ToString()
Converts to string.
public override string ToString()
Returns
- string
string