Exemplo n.º 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;
        }
Exemplo n.º 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;
        }
Exemplo n.º 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;
        }
Exemplo n.º 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);
            }
        }
Exemplo n.º 5
0
 protected TemplateNode([CanBeNull] TemplateNode parent)
 {
     Parent = parent;
 }
Exemplo n.º 6
0
 protected CompositeNode([CanBeNull] TemplateNode parent)
     : base(parent)
 {
     _childNodes = new List <TemplateNode>();
 }