Пример #1
0
            public NavigatorState(AttributeWrapper attribute)
            {
                if (attribute == null)
                {
                    throw new ArgumentNullException("attribute");
                }

                Attribute = attribute;
            }
Пример #2
0
        public AttributeWrapper CreateAttributeWrapper(GumboAttribute attribute, ElementWrapper parent)
        {
            var attributeWrapper = new AttributeWrapper(attribute, parent);

            if (string.Equals(attributeWrapper.Name, "id", StringComparison.OrdinalIgnoreCase))
            {
                AddElementById(attributeWrapper.Value, parent);
            }
            return(attributeWrapper);
        }
Пример #3
0
            public void SetCurrent(NodeWrapper node)
            {
                if (node == null)
                {
                    throw new ArgumentNullException("node");
                }

                Node      = node;
                Attribute = null;
            }
Пример #4
0
            public void SetCurrent(AttributeWrapper attribute)
            {
                if (attribute == null)
                {
                    throw new ArgumentNullException("attribute");
                }

                Node      = null;
                Attribute = attribute;
            }
Пример #5
0
 public GumboNavigator(GumboWrapper gumbo, AttributeWrapper attribute)
 {
     _Gumbo = gumbo;
     _State = new NavigatorState(attribute);
 }