Example #1
0
        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;
        }
Example #2
0
        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;
        }
Example #3
0
        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;
        }
Example #4
0
        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);
            }
        }
Example #5
0
 protected TemplateNode([CanBeNull] TemplateNode parent)
 {
     Parent = parent;
 }
Example #6
0
 protected CompositeNode([CanBeNull] TemplateNode parent)
     : base(parent)
 {
     _childNodes = new List <TemplateNode>();
 }