예제 #1
0
        private System.Web.Services.Description.WebReferenceOptions Read4_WebReferenceOptions(bool isNullable, bool checkType)
        {
            Microsoft.Xml.XmlQualifiedName xsiType = checkType ? GetXsiType() : null;
            bool isNull = false;

            if (isNullable)
            {
                isNull = ReadNull();
            }
            if (checkType)
            {
                if (xsiType == null || ((object)((Microsoft.Xml.XmlQualifiedName)xsiType).Name == (object)_id1_webReferenceOptions && (object)((Microsoft.Xml.XmlQualifiedName)xsiType).Namespace == (object)_id2_Item))
                {
                }
                else
                {
                    throw CreateUnknownTypeException((Microsoft.Xml.XmlQualifiedName)xsiType);
                }
            }
            if (isNull)
            {
                return(null);
            }
            System.Web.Services.Description.WebReferenceOptions o;
            o = new System.Web.Services.Description.WebReferenceOptions();
            System.Collections.Specialized.StringCollection a_1 = (System.Collections.Specialized.StringCollection)o.@SchemaImporterExtensions;
            bool[] paramsRead = new bool[4];
            while (Reader.MoveToNextAttribute())
            {
                if (!IsXmlnsAttribute(Reader.Name))
                {
                    UnknownNode((object)o);
                }
            }
            Reader.MoveToElement();
            if (Reader.IsEmptyElement)
            {
                Reader.Skip();
                return(o);
            }
            Reader.ReadStartElement();
            Reader.MoveToContent();
            int whileIterations0 = 0;
            int readerCount0     = ReaderCount;

            while (Reader.NodeType != Microsoft.Xml.XmlNodeType.EndElement && Reader.NodeType != Microsoft.Xml.XmlNodeType.None)
            {
                if (Reader.NodeType == Microsoft.Xml.XmlNodeType.Element)
                {
                    if (!paramsRead[0] && ((object)Reader.LocalName == (object)_id3_codeGenerationOptions && (object)Reader.NamespaceURI == (object)_id2_Item))
                    {
                        if (Reader.IsEmptyElement)
                        {
                            Reader.Skip();
                        }
                        else
                        {
                            o.@CodeGenerationOptions = Read1_CodeGenerationOptions(Reader.ReadElementString());
                        }
                        paramsRead[0] = true;
                    }
                    else if (((object)Reader.LocalName == (object)_id4_schemaImporterExtensions && (object)Reader.NamespaceURI == (object)_id2_Item))
                    {
                        if (!ReadNull())
                        {
                            System.Collections.Specialized.StringCollection a_1_0 = (System.Collections.Specialized.StringCollection)o.@SchemaImporterExtensions;
                            if (((object)(a_1_0) == null) || (Reader.IsEmptyElement))
                            {
                                Reader.Skip();
                            }
                            else
                            {
                                Reader.ReadStartElement();
                                Reader.MoveToContent();
                                int whileIterations1 = 0;
                                int readerCount1     = ReaderCount;
                                while (Reader.NodeType != Microsoft.Xml.XmlNodeType.EndElement && Reader.NodeType != Microsoft.Xml.XmlNodeType.None)
                                {
                                    if (Reader.NodeType == Microsoft.Xml.XmlNodeType.Element)
                                    {
                                        if (((object)Reader.LocalName == (object)_id5_type && (object)Reader.NamespaceURI == (object)_id2_Item))
                                        {
                                            if (ReadNull())
                                            {
                                                a_1_0.Add(null);
                                            }
                                            else
                                            {
                                                a_1_0.Add(Reader.ReadElementString());
                                            }
                                        }
                                        else
                                        {
                                            UnknownNode(null, @"http://microsoft.com/webReference/:type");
                                        }
                                    }
                                    else
                                    {
                                        UnknownNode(null, @"http://microsoft.com/webReference/:type");
                                    }
                                    Reader.MoveToContent();
                                    CheckReaderCount(ref whileIterations1, ref readerCount1);
                                }
                                ReadEndElement();
                            }
                        }
                    }
                    else if (!paramsRead[2] && ((object)Reader.LocalName == (object)_id6_style && (object)Reader.NamespaceURI == (object)_id2_Item))
                    {
                        if (Reader.IsEmptyElement)
                        {
                            Reader.Skip();
                        }
                        else
                        {
                            o.@Style = Read2_ServiceDescriptionImportStyle(Reader.ReadElementString());
                        }
                        paramsRead[2] = true;
                    }
                    else if (!paramsRead[3] && ((object)Reader.LocalName == (object)_id7_verbose && (object)Reader.NamespaceURI == (object)_id2_Item))
                    {
                        {
                            o.@Verbose = Microsoft.Xml.XmlConvert.ToBoolean(Reader.ReadElementString());
                        }
                        paramsRead[3] = true;
                    }
                    else
                    {
                        UnknownNode((object)o, @"http://microsoft.com/webReference/:codeGenerationOptions, http://microsoft.com/webReference/:schemaImporterExtensions, http://microsoft.com/webReference/:style, http://microsoft.com/webReference/:verbose");
                    }
                }
                else
                {
                    UnknownNode((object)o, @"http://microsoft.com/webReference/:codeGenerationOptions, http://microsoft.com/webReference/:schemaImporterExtensions, http://microsoft.com/webReference/:style, http://microsoft.com/webReference/:verbose");
                }
                Reader.MoveToContent();
                CheckReaderCount(ref whileIterations0, ref readerCount0);
            }
            ReadEndElement();
            return(o);
        }