public TagNode([NotNull] TemplateNode parent, [NotNull] TagLex lex) : base(parent) { Debug.Assert(parent != null, "parent cannot be null."); Debug.Assert(lex != null, "lex cannot be null."); Components = lex.Components; }
public UnParsedNode([NotNull] TemplateNode parent, [NotNull] UnParsedLex lex) : base(parent) { Debug.Assert(parent != null, "parent cannot be null."); Debug.Assert(lex != null, "lex cannot be null."); UnParsedText = lex.UnParsedText; }
public DirectiveNode([NotNull] TemplateNode parent, [NotNull][ItemNotNull] Directive[] candidateDirectives) : base(parent) { Debug.Assert(parent != null, "parent cannot be null."); Debug.Assert(candidateDirectives != null, "candidateDirectives cannot be null."); Debug.Assert(candidateDirectives.Length > 0, "candidateDirectives cannot be empty"); CandidateDirectives = candidateDirectives; }
public void AddChild([NotNull] TemplateNode child) { Debug.Assert(child != null, "child cannot be null."); Debug.Assert(child.Parent == this, "child's Parent must be this."); if (!_childNodes.Contains(child)) { _childNodes.Add(child); } }
protected TemplateNode([CanBeNull] TemplateNode parent) { Parent = parent; }
protected CompositeNode([CanBeNull] TemplateNode parent) : base(parent) { _childNodes = new List <TemplateNode>(); }