Example #1
0
        public BinaryVisualNode(
            string text,
            string nodeType,
            VisualNode leftChild,
            VisualNode rightChild,
            VisualTreeSettings settings
            )
            : base(text, nodeType, settings)
        {
            LeftChild  = leftChild ?? throw new ArgumentNullException(nameof(leftChild));
            RightChild = rightChild ?? throw new ArgumentNullException(nameof(rightChild));

            LeftChild.Parent  = this;
            RightChild.Parent = this;
        }
Example #2
0
 protected VisualNode(string text, string nodeType, VisualTreeSettings settings)
 {
     Text     = text ?? throw new ArgumentNullException(nameof(text));
     NodeType = nodeType ?? throw new ArgumentNullException(nameof(nodeType));
     Settings = settings ?? throw new ArgumentNullException(nameof(settings));
 }
Example #3
0
 public UnaryVisualNode(string text, string nodeType, VisualNode child, VisualTreeSettings settings)
     : base(text, nodeType, settings)
 {
     Child        = child ?? throw new ArgumentNullException(nameof(child));
     Child.Parent = this;
 }