Ejemplo n.º 1
0
        public override void ReadXml(XmlReader reader)
        {
            if (CheckEmptyNode(reader, "HTTP", Namespace))
                return;

            while (!reader.EOF)
            {
                if (reader.IsStartElement())
                {
                    switch (reader.LocalName)
                    {
                        case "Get":
                            Get = new Get();
                            Get.ReadXml(reader);
                            break;
                        case "Post":
                            _postField = new Post();
                            Post.ReadXml(reader);
                            break;
                        default:
                            reader.Skip();
                            break;
                    }
                }
                else
                    reader.Read();
            }
        }
Ejemplo n.º 2
0
 public Http(XElement node, string ns)
 {
     var element = node.Element(XName.Get("Get", ns));
     if (element != null) _getField = new Get(element, ns);
     element = node.Element(XName.Get("Post", ns));
     if (element != null) _postField = new Post(element, ns);
 }