void Write4_WebReferenceOptions(string n, string ns, WebReferenceOptions o, bool isNullable, bool needType) { if ((object)o == null) { if (isNullable) { WriteNullTagLiteral(n, ns); } return; } if (!needType) { System.Type t = o.GetType(); if (t == typeof(WebReferenceOptions)) { } else { throw CreateUnknownTypeException(o); } } EscapeName = false; WriteStartElement(n, ns, o); if (needType) { WriteXsiType(@"webReferenceOptions", @"http://microsoft.com/webReference/"); } if (((CodeGenerationOptions)o.@CodeGenerationOptions) != (CodeGenerationOptions.@GenerateOldAsync)) { WriteElementString(@"codeGenerationOptions", @"http://microsoft.com/webReference/", Write1_CodeGenerationOptions(((CodeGenerationOptions)o.@CodeGenerationOptions))); } { System.Collections.Specialized.StringCollection a = (System.Collections.Specialized.StringCollection)((System.Collections.Specialized.StringCollection)o.@SchemaImporterExtensions); if (a != null) { WriteStartElement(@"schemaImporterExtensions", @"http://microsoft.com/webReference/"); for (int ia = 0; ia < a.Count; ia++) { WriteNullableStringLiteral(@"type", @"http://microsoft.com/webReference/", ((System.String)a[ia])); } WriteEndElement(); } } if (((System.Web.Services.Description.ServiceDescriptionImportStyle)o.@Style) != System.Web.Services.Description.ServiceDescriptionImportStyle.@Client) { WriteElementString(@"style", @"http://microsoft.com/webReference/", Write2_ServiceDescriptionImportStyle(((System.Web.Services.Description.ServiceDescriptionImportStyle)o.@Style))); } WriteElementStringRaw(@"verbose", @"http://microsoft.com/webReference/", System.Xml.XmlConvert.ToString((System.Boolean)((System.Boolean)o.@Verbose))); WriteEndElement(o); }
private void Write4_WebReferenceOptions(string n, string ns, WebReferenceOptions o, bool isNullable, bool needType) { if (o == null) { if (isNullable) { base.WriteNullTagLiteral(n, ns); } } else { if (!needType && !(o.GetType() == typeof(WebReferenceOptions))) { throw base.CreateUnknownTypeException(o); } base.EscapeName = false; base.WriteStartElement(n, ns, o); if (needType) { base.WriteXsiType("webReferenceOptions", "http://microsoft.com/webReference/"); } if (o.CodeGenerationOptions != CodeGenerationOptions.GenerateOldAsync) { base.WriteElementString("codeGenerationOptions", "http://microsoft.com/webReference/", this.Write1_CodeGenerationOptions(o.CodeGenerationOptions)); } StringCollection schemaImporterExtensions = o.SchemaImporterExtensions; if (schemaImporterExtensions != null) { base.WriteStartElement("schemaImporterExtensions", "http://microsoft.com/webReference/"); for (int i = 0; i < schemaImporterExtensions.Count; i++) { base.WriteNullableStringLiteral("type", "http://microsoft.com/webReference/", schemaImporterExtensions[i]); } base.WriteEndElement(); } if (o.Style != ServiceDescriptionImportStyle.Client) { base.WriteElementString("style", "http://microsoft.com/webReference/", this.Write2_ServiceDescriptionImportStyle(o.Style)); } base.WriteElementStringRaw("verbose", "http://microsoft.com/webReference/", XmlConvert.ToString(o.Verbose)); base.WriteEndElement(o); } }
private void Write4_WebReferenceOptions(string n, string ns, WebReferenceOptions o, bool isNullable, bool needType) { if (o == null) { if (isNullable) { base.WriteNullTagLiteral(n, ns); } } else { if (!needType && !(o.GetType() == typeof(WebReferenceOptions))) { throw base.CreateUnknownTypeException(o); } base.EscapeName = false; base.WriteStartElement(n, ns, o); if (needType) { base.WriteXsiType("webReferenceOptions", "http://microsoft.com/webReference/"); } if (o.CodeGenerationOptions != CodeGenerationOptions.GenerateOldAsync) { base.WriteElementString("codeGenerationOptions", "http://microsoft.com/webReference/", this.Write1_CodeGenerationOptions(o.CodeGenerationOptions)); } StringCollection schemaImporterExtensions = o.SchemaImporterExtensions; if (schemaImporterExtensions != null) { base.WriteStartElement("schemaImporterExtensions", "http://microsoft.com/webReference/"); for (int i = 0; i < schemaImporterExtensions.Count; i++) { base.WriteNullableStringLiteral("type", "http://microsoft.com/webReference/", schemaImporterExtensions[i]); } base.WriteEndElement(); } if (o.Style != ServiceDescriptionImportStyle.Client) { base.WriteElementString("style", "http://microsoft.com/webReference/", this.Write2_ServiceDescriptionImportStyle(o.Style)); } base.WriteElementStringRaw("verbose", "http://microsoft.com/webReference/", XmlConvert.ToString(o.Verbose)); base.WriteEndElement(o); } }
void Write4_WebReferenceOptions(string n, string ns, WebReferenceOptions o, bool isNullable, bool needType) { if ((object)o == null) { if (isNullable) WriteNullTagLiteral(n, ns); return; } if (!needType) { System.Type t = o.GetType(); if (t == typeof(WebReferenceOptions)) { } else { throw CreateUnknownTypeException(o); } } EscapeName = false; WriteStartElement(n, ns, o); if (needType) WriteXsiType(@"webReferenceOptions", @"http://microsoft.com/webReference/"); if (((CodeGenerationOptions)o.@CodeGenerationOptions) != (CodeGenerationOptions.@GenerateOldAsync)) { WriteElementString(@"codeGenerationOptions", @"http://microsoft.com/webReference/", Write1_CodeGenerationOptions(((CodeGenerationOptions)o.@CodeGenerationOptions))); } { System.Collections.Specialized.StringCollection a = (System.Collections.Specialized.StringCollection)((System.Collections.Specialized.StringCollection)o.@SchemaImporterExtensions); if (a != null) { WriteStartElement(@"schemaImporterExtensions", @"http://microsoft.com/webReference/"); for (int ia = 0; ia < a.Count; ia++) { WriteNullableStringLiteral(@"type", @"http://microsoft.com/webReference/", ((System.String)a[ia])); } WriteEndElement(); } } if (((System.Web.Services.Description.ServiceDescriptionImportStyle)o.@Style) != System.Web.Services.Description.ServiceDescriptionImportStyle.@Client) { WriteElementString(@"style", @"http://microsoft.com/webReference/", Write2_ServiceDescriptionImportStyle(((System.Web.Services.Description.ServiceDescriptionImportStyle)o.@Style))); } WriteElementStringRaw(@"verbose", @"http://microsoft.com/webReference/", System.Xml.XmlConvert.ToString((System.Boolean)((System.Boolean)o.@Verbose))); WriteEndElement(o); }