Exemplo n.º 1
0
 // ElemAttrAtom allows an attribute name on the specified element. The
 // receiver is returned to allow call chaining.
 public Config ElemAttrAtom(atom.AtomType elem, params atom.AtomType[] attr)
 {
     foreach (var a in attr)
     {
         this.ElemAttrAtomMatch(elem, a, null);
     }
     return(this);
 }
Exemplo n.º 2
0
        // ElemAttrAtomMatch allows an attribute name on the specified element,
        // but only if the value matches a regular expression. The receiver is returned
        // to allow call chaining.
        public Config ElemAttrAtomMatch(atom.AtomType elem, atom.AtomType attr, Regex match)
        {
            Dictionary <atom.AtomType, Regex> attrs;

            if (!this.elem.TryGetValue(elem, out attrs))
            {
                attrs           = new Dictionary <atom.AtomType, Regex>();
                this.elem[elem] = attrs;
            }

            attrs[attr] = match;

            return(this);
        }
Exemplo n.º 3
0
        // GlobalAttrAtom allows an attribute name on all allowed elements. The
        // receiver is returned to allow call chaining.
        public Config GlobalAttrAtom(atom.AtomType a)
        {
            this.attr.Add(a);

            return(this);
        }