Ejemplo n.º 1
0
        private MetadataLocation Read65_MetadataLocation(bool isNullable, bool checkType)
        {
            XmlQualifiedName type = checkType ? base.GetXsiType() : null;
            bool             flag = false;

            if (isNullable)
            {
                flag = base.ReadNull();
            }
            if ((checkType && (type != null)) && ((type.Name != this.id14_MetadataLocation) || (type.Namespace != this.id2_Item)))
            {
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(base.CreateUnknownTypeException(type));
            }
            if (flag)
            {
                return(null);
            }
            MetadataLocation o = new MetadataLocation();

            while (base.Reader.MoveToNextAttribute())
            {
                if (!base.IsXmlnsAttribute(base.Reader.Name))
                {
                    base.UnknownNode(o);
                }
            }
            base.Reader.MoveToElement();
            if (base.Reader.IsEmptyElement)
            {
                base.Reader.Skip();
                return(o);
            }
            base.Reader.ReadStartElement();
            base.Reader.MoveToContent();
            int whileIterations = 0;
            int readerCount     = base.ReaderCount;

            while ((base.Reader.NodeType != XmlNodeType.EndElement) && (base.Reader.NodeType != XmlNodeType.None))
            {
                string str = null;
                if (base.Reader.NodeType == XmlNodeType.Element)
                {
                    base.UnknownNode(o, "");
                }
                else if (((base.Reader.NodeType == XmlNodeType.Text) || (base.Reader.NodeType == XmlNodeType.CDATA)) || ((base.Reader.NodeType == XmlNodeType.Whitespace) || (base.Reader.NodeType == XmlNodeType.SignificantWhitespace)))
                {
                    str        = base.ReadString(str, false);
                    o.Location = str;
                }
                else
                {
                    base.UnknownNode(o, "");
                }
                base.Reader.MoveToContent();
                base.CheckReaderCount(ref whileIterations, ref readerCount);
            }
            base.ReadEndElement();
            return(o);
        }
 private void Write65_MetadataLocation(string n, string ns, MetadataLocation o, bool isNullable, bool needType)
 {
     if (o == null)
     {
         if (isNullable)
         {
             base.WriteNullTagLiteral(n, ns);
         }
     }
     else
     {
         if (!needType && !(o.GetType() == typeof(MetadataLocation)))
         {
             throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(base.CreateUnknownTypeException(o));
         }
         base.WriteStartElement(n, ns, o, false, null);
         if (needType)
         {
             base.WriteXsiType("MetadataLocation", "http://schemas.xmlsoap.org/ws/2004/09/mex");
         }
         base.WriteValue(o.Location);
         base.WriteEndElement(o);
     }
 }
 private void Write65_MetadataLocation(string n, string ns, MetadataLocation o, bool isNullable, bool needType)
 {
     if (o == null)
     {
         if (isNullable)
         {
             base.WriteNullTagLiteral(n, ns);
         }
     }
     else
     {
         if (!needType && !(o.GetType() == typeof(MetadataLocation)))
         {
             throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(base.CreateUnknownTypeException(o));
         }
         base.WriteStartElement(n, ns, o, false, null);
         if (needType)
         {
             base.WriteXsiType("MetadataLocation", "http://schemas.xmlsoap.org/ws/2004/09/mex");
         }
         base.WriteValue(o.Location);
         base.WriteEndElement(o);
     }
 }
 private MetadataLocation Read65_MetadataLocation(bool isNullable, bool checkType)
 {
     XmlQualifiedName type = checkType ? base.GetXsiType() : null;
     bool flag = false;
     if (isNullable)
     {
         flag = base.ReadNull();
     }
     if ((checkType && (type != null)) && ((type.Name != this.id14_MetadataLocation) || (type.Namespace != this.id2_Item)))
     {
         throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(base.CreateUnknownTypeException(type));
     }
     if (flag)
     {
         return null;
     }
     MetadataLocation o = new MetadataLocation();
     while (base.Reader.MoveToNextAttribute())
     {
         if (!base.IsXmlnsAttribute(base.Reader.Name))
         {
             base.UnknownNode(o);
         }
     }
     base.Reader.MoveToElement();
     if (base.Reader.IsEmptyElement)
     {
         base.Reader.Skip();
         return o;
     }
     base.Reader.ReadStartElement();
     base.Reader.MoveToContent();
     int whileIterations = 0;
     int readerCount = base.ReaderCount;
     while ((base.Reader.NodeType != XmlNodeType.EndElement) && (base.Reader.NodeType != XmlNodeType.None))
     {
         string str = null;
         if (base.Reader.NodeType == XmlNodeType.Element)
         {
             base.UnknownNode(o, "");
         }
         else if (((base.Reader.NodeType == XmlNodeType.Text) || (base.Reader.NodeType == XmlNodeType.CDATA)) || ((base.Reader.NodeType == XmlNodeType.Whitespace) || (base.Reader.NodeType == XmlNodeType.SignificantWhitespace)))
         {
             str = base.ReadString(str, false);
             o.Location = str;
         }
         else
         {
             base.UnknownNode(o, "");
         }
         base.Reader.MoveToContent();
         base.CheckReaderCount(ref whileIterations, ref readerCount);
     }
     base.ReadEndElement();
     return o;
 }