| | | 1 | | // Licensed to the .NET Foundation under one or more agreements. |
| | | 2 | | // The .NET Foundation licenses this file to you under the MIT license. |
| | | 3 | | |
| | | 4 | | using System; |
| | | 5 | | using System.Collections.Generic; |
| | | 6 | | using System.Collections.ObjectModel; |
| | | 7 | | using System.Text; |
| | | 8 | | using System.Xml; |
| | | 9 | | using System.Xml.Serialization; |
| | | 10 | | |
| | | 11 | | namespace CoreWCF.Description |
| | | 12 | | { |
| | | 13 | | [XmlRoot(MetadataStrings.MetadataExchangeStrings.Metadata, Namespace = MetadataStrings.MetadataExchangeStrings.Names |
| | | 14 | | public class MetadataSet : IXmlSerializable |
| | | 15 | | { |
| | | 16 | | internal ServiceMetadataExtension.WriteFilter WriteFilter; |
| | | 17 | | |
| | | 18 | | public MetadataSet() |
| | | 19 | | { |
| | | 20 | | } |
| | | 21 | | |
| | | 22 | | public MetadataSet(IEnumerable<MetadataSection> sections) : this() |
| | | 23 | | { |
| | | 24 | | if (sections != null) |
| | | 25 | | { |
| | | 26 | | foreach (MetadataSection section in sections) |
| | | 27 | | { |
| | | 28 | | MetadataSections.Add(section); |
| | | 29 | | } |
| | | 30 | | } |
| | | 31 | | } |
| | | 32 | | |
| | | 33 | | [XmlElement(MetadataStrings.MetadataExchangeStrings.MetadataSection, Namespace = MetadataStrings.MetadataExchang |
| | | 34 | | public Collection<MetadataSection> MetadataSections { get; private set; } = new Collection<MetadataSection>(); |
| | | 35 | | |
| | | 36 | | [XmlAnyAttribute] |
| | | 37 | | public Collection<XmlAttribute> Attributes { get; private set; } = new Collection<XmlAttribute>(); |
| | | 38 | | |
| | | 39 | | //Reader should write the <Metadata> element |
| | | 40 | | public void WriteTo(XmlWriter writer) |
| | | 41 | | { |
| | | 42 | | WriteMetadataSet(writer, true); |
| | | 43 | | } |
| | | 44 | | |
| | | 45 | | //Reader is on the <Metadata> element |
| | | 46 | | public static MetadataSet ReadFrom(XmlReader reader) |
| | | 47 | | { |
| | | 48 | | if (reader == null) |
| | | 49 | | { |
| | | 50 | | throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull(nameof(reader)); |
| | | 51 | | } |
| | | 52 | | |
| | | 53 | | MetadataSetSerializer xs = new MetadataSetSerializer(); |
| | | 54 | | return (MetadataSet)xs.Deserialize(reader); |
| | | 55 | | } |
| | | 56 | | |
| | | 57 | | System.Xml.Schema.XmlSchema IXmlSerializable.GetSchema() |
| | | 58 | | { |
| | | 59 | | return null; |
| | | 60 | | } |
| | | 61 | | |
| | | 62 | | //Reader in on the <Metadata> element |
| | | 63 | | void IXmlSerializable.ReadXml(XmlReader reader) |
| | | 64 | | { |
| | | 65 | | if (reader == null) |
| | | 66 | | { |
| | | 67 | | throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull(nameof(reader)); |
| | | 68 | | } |
| | | 69 | | |
| | | 70 | | MetadataSetSerializer xs = new MetadataSetSerializer(); |
| | | 71 | | xs.ProcessOuterElement = false; |
| | | 72 | | |
| | | 73 | | MetadataSet metadataSet = (MetadataSet)xs.Deserialize(reader); |
| | | 74 | | |
| | | 75 | | MetadataSections = metadataSet.MetadataSections; |
| | | 76 | | Attributes = metadataSet.Attributes; |
| | | 77 | | } |
| | | 78 | | |
| | | 79 | | //Reader has just written the <Metadata> element can still write attribs here |
| | | 80 | | void IXmlSerializable.WriteXml(XmlWriter writer) |
| | | 81 | | { |
| | | 82 | | WriteMetadataSet(writer, false); |
| | | 83 | | } |
| | | 84 | | |
| | | 85 | | private void WriteMetadataSet(XmlWriter writer, bool processOuterElement) |
| | | 86 | | { |
| | | 87 | | if (writer == null) |
| | | 88 | | { |
| | | 89 | | throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull(nameof(writer)); |
| | | 90 | | } |
| | | 91 | | |
| | | 92 | | if (WriteFilter != null) |
| | | 93 | | { |
| | | 94 | | ServiceMetadataExtension.WriteFilter filter = WriteFilter.CloneWriteFilter(); |
| | | 95 | | filter.Writer = writer; |
| | | 96 | | writer = filter; |
| | | 97 | | } |
| | | 98 | | MetadataSetSerializer xs = new MetadataSetSerializer(); |
| | | 99 | | xs.ProcessOuterElement = processOuterElement; |
| | | 100 | | |
| | | 101 | | xs.Serialize(writer, this); |
| | | 102 | | } |
| | | 103 | | |
| | | 104 | | } |
| | | 105 | | |
| | | 106 | | #pragma warning disable |
| | | 107 | | |
| | | 108 | | /* The Following code is a generated XmlSerializer. It was created by: |
| | | 109 | | * (*) Removing the IXmlSerializable from MetadataSet |
| | | 110 | | * (*) Changing typeof(WsdlNS.ServiceDescription) and typeof(XsdNS.XmlSchema) to typeof(string) and typeof(int) |
| | | 111 | | * MetadataSection.Metadata |
| | | 112 | | * (*) running "sgen /a:System.ServiceModel.dll /t:System.ServiceModel.Description.MetadataSet /k" to generate |
| | | 113 | | * (*) Revert the above changes. |
| | | 114 | | * |
| | | 115 | | * and then doing the following to fix it up: |
| | | 116 | | * |
| | | 117 | | * (*) Change the classes from public to internal |
| | | 118 | | * (*) Add ProcessOuterElement to MetadataSetSerializer, XmlSerializationReaderMetadataSet, and XmlSerializatio |
| | | 119 | | private bool processOuterElement = true; |
| | | 120 | | |
| | | 121 | | public bool ProcessOuterElement |
| | | 122 | | { |
| | | 123 | | get { return processOuterElement; } |
| | | 124 | | set { processOuterElement = value; } |
| | | 125 | | } |
| | | 126 | | * (*) Set XmlSerializationWriterMetadataSet.ProcessOuterElement with MetadataSetSerializer.ProcessOuterElement |
| | | 127 | | * in MetadataSetSerializer.Serialize |
| | | 128 | | * ((XmlSerializationWriterMetadataSet)writer).ProcessOuterElement = this.processOuterElement; |
| | | 129 | | * |
| | | 130 | | * (*) Set XmlSerializationReaderMetadataSet.ProcessOuterElement with MetadataSetSerializer.ProcessOuterElement |
| | | 131 | | * in MetadataSetSerializer.Deserialize |
| | | 132 | | * ((XmlSerializationReaderMetadataSet)reader).ProcessOuterElement = this.processOuterElement; |
| | | 133 | | * (*) wrap anything in XmlSerializationWriterMetadataSet.Write*_Metadata or |
| | | 134 | | * XmlSerializationWriterMetadataSet.Write*_MetadataSet that outputs the outer |
| | | 135 | | * element with "if(processOuterElement) { ... }" |
| | | 136 | | * (*) Add "!processOuterElement ||" to checks for name and namespace of the outer element |
| | | 137 | | * in XmlSerializationReaderMetadataSet.Read*_Metadata and XmlSerializationReaderMetadataSet.Read*_Metadata |
| | | 138 | | * (*) In XmlSerializationReaderMetadataSet.Read*_MetadataSection change the if clause writing the XmlSchema fr |
| | | 139 | | * |
| | | 140 | | * o.@Metadata = Reader.ReadElementString(); |
| | | 141 | | * to |
| | | 142 | | o.@Metadata = System.Xml.Schema.XmlSchema.Read(this.Reader, null); |
| | | 143 | | if (this.Reader.NodeType == XmlNodeType.EndElement) |
| | | 144 | | ReadEndElement(); |
| | | 145 | | * |
| | | 146 | | * |
| | | 147 | | * (*) In XmlSerializationWriterMetadataSet Write*_MetadataSection change |
| | | 148 | | * |
| | | 149 | | * else if (o.@Metadata is global::System.Int32) { |
| | | 150 | | * WriteElementString(@"schema", @"http://www.w3.org/2001/XMLSchema", ((global::System.Int32)o.@Metadat |
| | | 151 | | * } |
| | | 152 | | * to |
| | | 153 | | * |
| | | 154 | | else if (o.@Metadata is global::System.Xml.Schema.XmlSchema) |
| | | 155 | | { |
| | | 156 | | ((global::System.Xml.Schema.XmlSchema)o.@Metadata).Write(this.Writer); |
| | | 157 | | } |
| | | 158 | | * |
| | | 159 | | * (*) In XmlSerializationReaderMetadataSet.Read*_MetadataSection change |
| | | 160 | | * |
| | | 161 | | * o.@Metadata = Reader.ReadElementString(); |
| | | 162 | | * to |
| | | 163 | | * o.@Metadata = System.Web.Services.Description.ServiceDescription.Read(this.Reader); |
| | | 164 | | * |
| | | 165 | | * |
| | | 166 | | * (*) In XmlSerializationWriterMetadataSet Write*_MetadataSection change |
| | | 167 | | * |
| | | 168 | | * if (o.@Metadata is global::System.String) { |
| | | 169 | | * WriteElementString(@"definitions", @"http://schemas.xmlsoap.org/wsdl/", ((global::System.String)o.@M |
| | | 170 | | * } |
| | | 171 | | * to |
| | | 172 | | * |
| | | 173 | | if (o.@Metadata is global::System.Web.Services.Description.ServiceDescription) { |
| | | 174 | | ((global::System.Web.Services.Description.ServiceDescription)o.@Metadata).Write(this.Writer); |
| | | 175 | | } |
| | | 176 | | * |
| | | 177 | | * (*) In XmlSerializationWriterMetadataSet Write*_MetadataSet add |
| | | 178 | | * |
| | | 179 | | XmlSerializerNamespaces xmlSerializerNamespaces = new XmlSerializerNamespaces(); |
| | | 180 | | xmlSerializerNamespaces.Add(MetadataStrings.MetadataExchangeStrings.Prefix, MetadataStrings.MetadataExch |
| | | 181 | | WriteNamespaceDeclarations(xmlSerializerNamespaces); |
| | | 182 | | * |
| | | 183 | | * immediately before 'if (needType) WriteXsiType(@"MetadataSet", @"http://schemas.xmlsoap.org/ws/2004/09/m |
| | | 184 | | * |
| | | 185 | | * (*) In XmlSerializationWriterMetadataSet Write*_MetadataSection replace |
| | | 186 | | * WriteStartElement(n, ns, o, false, null); |
| | | 187 | | * with |
| | | 188 | | * |
| | | 189 | | XmlSerializerNamespaces xmlSerializerNamespaces = new XmlSerializerNamespaces(); |
| | | 190 | | xmlSerializerNamespaces.Add(string.Empty, string.Empty); |
| | | 191 | | |
| | | 192 | | WriteStartElement(n, ns, o, true, xmlSerializerNamespaces); |
| | | 193 | | * |
| | | 194 | | * (*) In XmlSerializationWriterMetadataSet Write*_XmlSchema replace |
| | | 195 | | * WriteStartElement(n, ns, o, false, o.@Namespaces); |
| | | 196 | | * with |
| | | 197 | | * WriteStartElement(n, ns, o, true, o.@Namespaces); |
| | | 198 | | * |
| | | 199 | | * (*) Make sure you keep the #pragmas surrounding this block. |
| | | 200 | | * |
| | | 201 | | * (*) Make sure to replace all exception throw with standard throw using DiagnosticUtility.ExceptionUtility.Th |
| | | 202 | | * change: |
| | | 203 | | * |
| | | 204 | | * throw CreateUnknownTypeException(*); |
| | | 205 | | * to |
| | | 206 | | * throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(CreateUnknownTypeException(*)); |
| | | 207 | | * |
| | | 208 | | * throw CreateUnknownNodeException(); |
| | | 209 | | * to |
| | | 210 | | * throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(CreateUnknownNodeException()); |
| | | 211 | | * |
| | | 212 | | * throw CreateInvalidAnyTypeException(elem); |
| | | 213 | | * to |
| | | 214 | | * throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(CreateInvalidAnyTypeException(elem)); |
| | | 215 | | * |
| | | 216 | | * throw CreateInvalidEnumValueException(*); |
| | | 217 | | * to |
| | | 218 | | * throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(CreateInvalidEnumValueException(*)); |
| | | 219 | | * |
| | | 220 | | * throw CreateUnknownConstantException(*); |
| | | 221 | | * to |
| | | 222 | | * throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(CreateUnknownConstantException(*)); |
| | | 223 | | * |
| | | 224 | | */ |
| | | 225 | | |
| | | 226 | | internal class XmlSerializationWriterMetadataSet : System.Xml.Serialization.XmlSerializationWriter |
| | | 227 | | { |
| | | 228 | | bool processOuterElement = true; |
| | | 229 | | public bool ProcessOuterElement |
| | | 230 | | { |
| | | 231 | | get { return processOuterElement; } |
| | | 232 | | set { processOuterElement = value; } |
| | | 233 | | } |
| | | 234 | | |
| | | 235 | | public void Write68_Metadata(object o) |
| | | 236 | | { |
| | | 237 | | if (processOuterElement) |
| | | 238 | | { |
| | | 239 | | WriteStartDocument(); |
| | | 240 | | if (o == null) |
| | | 241 | | { |
| | | 242 | | WriteNullTagLiteral(@"Metadata", @"http://schemas.xmlsoap.org/ws/2004/09/mex"); |
| | | 243 | | return; |
| | | 244 | | } |
| | | 245 | | TopLevelElement(); |
| | | 246 | | } |
| | | 247 | | Write67_MetadataSet(@"Metadata", @"http://schemas.xmlsoap.org/ws/2004/09/mex", ((global::CoreWCF.Description |
| | | 248 | | } |
| | | 249 | | |
| | | 250 | | void Write67_MetadataSet(string n, string ns, global::CoreWCF.Description.MetadataSet o, bool isNullable, bool n |
| | | 251 | | { |
| | | 252 | | if (processOuterElement) |
| | | 253 | | { |
| | | 254 | | if ((object)o == null) |
| | | 255 | | { |
| | | 256 | | if (isNullable) WriteNullTagLiteral(n, ns); |
| | | 257 | | return; |
| | | 258 | | } |
| | | 259 | | } |
| | | 260 | | if (!needType) |
| | | 261 | | { |
| | | 262 | | System.Type t = o.GetType(); |
| | | 263 | | if (t == typeof(global::CoreWCF.Description.MetadataSet)) |
| | | 264 | | { |
| | | 265 | | } |
| | | 266 | | else |
| | | 267 | | { |
| | | 268 | | throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(CreateUnknownTypeException(o)); |
| | | 269 | | } |
| | | 270 | | } |
| | | 271 | | if (processOuterElement) |
| | | 272 | | { |
| | | 273 | | WriteStartElement(n, ns, o, false, null); |
| | | 274 | | } |
| | | 275 | | |
| | | 276 | | XmlSerializerNamespaces xmlSerializerNamespaces = new XmlSerializerNamespaces(); |
| | | 277 | | xmlSerializerNamespaces.Add(MetadataStrings.MetadataExchangeStrings.Prefix, MetadataStrings.MetadataExchange |
| | | 278 | | WriteNamespaceDeclarations(xmlSerializerNamespaces); |
| | | 279 | | |
| | | 280 | | if (needType) WriteXsiType(@"MetadataSet", @"http://schemas.xmlsoap.org/ws/2004/09/mex"); |
| | | 281 | | { |
| | | 282 | | global::System.Collections.ObjectModel.Collection<global::System.Xml.XmlAttribute> a = (global::System.C |
| | | 283 | | if (a != null) |
| | | 284 | | { |
| | | 285 | | for (int i = 0; i < ((System.Collections.ICollection)a).Count; i++) |
| | | 286 | | { |
| | | 287 | | global::System.Xml.XmlAttribute ai = (global::System.Xml.XmlAttribute)a[i]; |
| | | 288 | | WriteXmlAttribute(ai, o); |
| | | 289 | | } |
| | | 290 | | } |
| | | 291 | | } |
| | | 292 | | { |
| | | 293 | | global::System.Collections.ObjectModel.Collection<global::CoreWCF.Description.MetadataSection> a = (glob |
| | | 294 | | if (a != null) |
| | | 295 | | { |
| | | 296 | | for (int ia = 0; ia < ((System.Collections.ICollection)a).Count; ia++) |
| | | 297 | | { |
| | | 298 | | Write66_MetadataSection(@"MetadataSection", @"http://schemas.xmlsoap.org/ws/2004/09/mex", ((glob |
| | | 299 | | } |
| | | 300 | | } |
| | | 301 | | } |
| | | 302 | | if (processOuterElement) |
| | | 303 | | { |
| | | 304 | | WriteEndElement(o); |
| | | 305 | | } |
| | | 306 | | } |
| | | 307 | | |
| | | 308 | | void Write66_MetadataSection(string n, string ns, global::CoreWCF.Description.MetadataSection o, bool isNullable |
| | | 309 | | { |
| | | 310 | | if ((object)o == null) |
| | | 311 | | { |
| | | 312 | | if (isNullable) WriteNullTagLiteral(n, ns); |
| | | 313 | | return; |
| | | 314 | | } |
| | | 315 | | if (!needType) |
| | | 316 | | { |
| | | 317 | | System.Type t = o.GetType(); |
| | | 318 | | if (t == typeof(global::CoreWCF.Description.MetadataSection)) |
| | | 319 | | { |
| | | 320 | | } |
| | | 321 | | else |
| | | 322 | | { |
| | | 323 | | throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(CreateUnknownTypeException(o)); |
| | | 324 | | } |
| | | 325 | | } |
| | | 326 | | |
| | | 327 | | |
| | | 328 | | XmlSerializerNamespaces xmlSerializerNamespaces = new XmlSerializerNamespaces(); |
| | | 329 | | xmlSerializerNamespaces.Add(string.Empty, string.Empty); |
| | | 330 | | |
| | | 331 | | WriteStartElement(n, ns, o, true, xmlSerializerNamespaces); |
| | | 332 | | if (needType) WriteXsiType(@"MetadataSection", @"http://schemas.xmlsoap.org/ws/2004/09/mex"); |
| | | 333 | | { |
| | | 334 | | global::System.Collections.ObjectModel.Collection<global::System.Xml.XmlAttribute> a = (global::System.C |
| | | 335 | | if (a != null) |
| | | 336 | | { |
| | | 337 | | for (int i = 0; i < ((System.Collections.ICollection)a).Count; i++) |
| | | 338 | | { |
| | | 339 | | global::System.Xml.XmlAttribute ai = (global::System.Xml.XmlAttribute)a[i]; |
| | | 340 | | WriteXmlAttribute(ai, o); |
| | | 341 | | } |
| | | 342 | | } |
| | | 343 | | } |
| | | 344 | | WriteAttribute(@"Dialect", @"", ((global::System.String)o.@Dialect)); |
| | | 345 | | WriteAttribute(@"Identifier", @"", ((global::System.String)o.@Identifier)); |
| | | 346 | | { |
| | | 347 | | if (o.@Metadata is global::System.Web.Services.Description.ServiceDescription) |
| | | 348 | | { |
| | | 349 | | ((global::System.Web.Services.Description.ServiceDescription)o.@Metadata).Write(this.Writer); |
| | | 350 | | } |
| | | 351 | | else if (o.@Metadata is global::System.Xml.Schema.XmlSchema) |
| | | 352 | | { |
| | | 353 | | ((global::System.Xml.Schema.XmlSchema)o.@Metadata).Write(this.Writer); |
| | | 354 | | } |
| | | 355 | | else if (o.@Metadata is global::CoreWCF.Description.MetadataSet) |
| | | 356 | | { |
| | | 357 | | Write67_MetadataSet(@"Metadata", @"http://schemas.xmlsoap.org/ws/2004/09/mex", ((global::CoreWCF.Des |
| | | 358 | | } |
| | | 359 | | else if (o.@Metadata is global::CoreWCF.Description.MetadataLocation) |
| | | 360 | | { |
| | | 361 | | Write65_MetadataLocation(@"Location", @"http://schemas.xmlsoap.org/ws/2004/09/mex", ((global::CoreWC |
| | | 362 | | } |
| | | 363 | | else if (o.@Metadata is global::CoreWCF.Description.MetadataReference) |
| | | 364 | | { |
| | | 365 | | WriteSerializable((System.Xml.Serialization.IXmlSerializable)((global::CoreWCF.Description.MetadataR |
| | | 366 | | } |
| | | 367 | | else if (o.@Metadata is System.Xml.XmlElement) |
| | | 368 | | { |
| | | 369 | | System.Xml.XmlElement elem = (System.Xml.XmlElement)o.@Metadata; |
| | | 370 | | if ((elem) is System.Xml.XmlNode || elem == null) |
| | | 371 | | { |
| | | 372 | | WriteElementLiteral((System.Xml.XmlNode)elem, @"", null, false, true); |
| | | 373 | | } |
| | | 374 | | else |
| | | 375 | | { |
| | | 376 | | throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(CreateInvalidAnyTypeException(elem)); |
| | | 377 | | } |
| | | 378 | | } |
| | | 379 | | else |
| | | 380 | | { |
| | | 381 | | if (o.@Metadata != null) |
| | | 382 | | { |
| | | 383 | | throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(CreateUnknownTypeException(o.@Metadata |
| | | 384 | | } |
| | | 385 | | } |
| | | 386 | | } |
| | | 387 | | WriteEndElement(o); |
| | | 388 | | } |
| | | 389 | | |
| | | 390 | | void Write65_MetadataLocation(string n, string ns, global::CoreWCF.Description.MetadataLocation o, bool isNullab |
| | | 391 | | { |
| | | 392 | | if ((object)o == null) |
| | | 393 | | { |
| | | 394 | | if (isNullable) WriteNullTagLiteral(n, ns); |
| | | 395 | | return; |
| | | 396 | | } |
| | | 397 | | if (!needType) |
| | | 398 | | { |
| | | 399 | | System.Type t = o.GetType(); |
| | | 400 | | if (t == typeof(global::CoreWCF.Description.MetadataLocation)) |
| | | 401 | | { |
| | | 402 | | } |
| | | 403 | | else |
| | | 404 | | { |
| | | 405 | | throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(CreateUnknownTypeException(o)); |
| | | 406 | | } |
| | | 407 | | } |
| | | 408 | | WriteStartElement(n, ns, o, false, null); |
| | | 409 | | if (needType) WriteXsiType(@"MetadataLocation", @"http://schemas.xmlsoap.org/ws/2004/09/mex"); |
| | | 410 | | { |
| | | 411 | | WriteValue(((global::System.String)o.@Location)); |
| | | 412 | | } |
| | | 413 | | WriteEndElement(o); |
| | | 414 | | } |
| | | 415 | | |
| | | 416 | | protected override void InitCallbacks() |
| | | 417 | | { |
| | | 418 | | } |
| | | 419 | | } |
| | | 420 | | |
| | | 421 | | internal class XmlSerializationReaderMetadataSet : System.Xml.Serialization.XmlSerializationReader |
| | | 422 | | { |
| | | 423 | | bool processOuterElement = true; |
| | | 424 | | public bool ProcessOuterElement |
| | | 425 | | { |
| | | 426 | | get { return processOuterElement; } |
| | | 427 | | set { processOuterElement = value; } |
| | | 428 | | } |
| | | 429 | | |
| | | 430 | | public object Read68_Metadata() |
| | | 431 | | { |
| | | 432 | | object o = null; |
| | | 433 | | Reader.MoveToContent(); |
| | | 434 | | if (Reader.NodeType == System.Xml.XmlNodeType.Element) |
| | | 435 | | { |
| | | 436 | | if (!processOuterElement || (((object)Reader.LocalName == (object)id1_Metadata && (object)Reader.Namespa |
| | | 437 | | { |
| | | 438 | | o = Read67_MetadataSet(true, true); |
| | | 439 | | } |
| | | 440 | | else |
| | | 441 | | { |
| | | 442 | | throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(CreateUnknownNodeException()); |
| | | 443 | | } |
| | | 444 | | } |
| | | 445 | | else |
| | | 446 | | { |
| | | 447 | | UnknownNode(null, @"http://schemas.xmlsoap.org/ws/2004/09/mex:Metadata"); |
| | | 448 | | } |
| | | 449 | | return (object)o; |
| | | 450 | | } |
| | | 451 | | |
| | | 452 | | global::CoreWCF.Description.MetadataSet Read67_MetadataSet(bool isNullable, bool checkType) |
| | | 453 | | { |
| | | 454 | | System.Xml.XmlQualifiedName xsiType = checkType ? GetXsiType() : null; |
| | | 455 | | bool isNull = false; |
| | | 456 | | if (isNullable) isNull = ReadNull(); |
| | | 457 | | if (checkType) |
| | | 458 | | { |
| | | 459 | | if (!processOuterElement || (xsiType == null || ((object)((System.Xml.XmlQualifiedName)xsiType).Name == |
| | | 460 | | { |
| | | 461 | | } |
| | | 462 | | else |
| | | 463 | | throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(CreateUnknownTypeException((System.Xml.Xml |
| | | 464 | | } |
| | | 465 | | if (isNull) return null; |
| | | 466 | | global::CoreWCF.Description.MetadataSet o; |
| | | 467 | | o = new global::CoreWCF.Description.MetadataSet(); |
| | | 468 | | global::System.Collections.ObjectModel.Collection<global::CoreWCF.Description.MetadataSection> a_0 = (global |
| | | 469 | | global::System.Collections.ObjectModel.Collection<global::System.Xml.XmlAttribute> a_1 = (global::System.Col |
| | | 470 | | bool[] paramsRead = new bool[2]; |
| | | 471 | | while (Reader.MoveToNextAttribute()) |
| | | 472 | | { |
| | | 473 | | if (!IsXmlnsAttribute(Reader.Name)) |
| | | 474 | | { |
| | | 475 | | System.Xml.XmlAttribute attr = (System.Xml.XmlAttribute)Document.ReadNode(Reader); |
| | | 476 | | ParseWsdlArrayType(attr); |
| | | 477 | | a_1.Add(attr); |
| | | 478 | | } |
| | | 479 | | } |
| | | 480 | | Reader.MoveToElement(); |
| | | 481 | | if (Reader.IsEmptyElement) |
| | | 482 | | { |
| | | 483 | | Reader.Skip(); |
| | | 484 | | return o; |
| | | 485 | | } |
| | | 486 | | Reader.ReadStartElement(); |
| | | 487 | | Reader.MoveToContent(); |
| | | 488 | | int whileIterations0 = 0; |
| | | 489 | | int readerCount0 = ReaderCount; |
| | | 490 | | while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.Non |
| | | 491 | | { |
| | | 492 | | if (Reader.NodeType == System.Xml.XmlNodeType.Element) |
| | | 493 | | { |
| | | 494 | | if (((object)Reader.LocalName == (object)id4_MetadataSection && (object)Reader.NamespaceURI == (obje |
| | | 495 | | { |
| | | 496 | | if ((object)(a_0) == null) Reader.Skip(); else a_0.Add(Read66_MetadataSection(false, true)); |
| | | 497 | | } |
| | | 498 | | else |
| | | 499 | | { |
| | | 500 | | UnknownNode((object)o, @"http://schemas.xmlsoap.org/ws/2004/09/mex:MetadataSection"); |
| | | 501 | | } |
| | | 502 | | } |
| | | 503 | | else |
| | | 504 | | { |
| | | 505 | | UnknownNode((object)o, @"http://schemas.xmlsoap.org/ws/2004/09/mex:MetadataSection"); |
| | | 506 | | } |
| | | 507 | | Reader.MoveToContent(); |
| | | 508 | | CheckReaderCount(ref whileIterations0, ref readerCount0); |
| | | 509 | | } |
| | | 510 | | ReadEndElement(); |
| | | 511 | | return o; |
| | | 512 | | } |
| | | 513 | | |
| | | 514 | | global::CoreWCF.Description.MetadataSection Read66_MetadataSection(bool isNullable, bool checkType) |
| | | 515 | | { |
| | | 516 | | System.Xml.XmlQualifiedName xsiType = checkType ? GetXsiType() : null; |
| | | 517 | | bool isNull = false; |
| | | 518 | | if (isNullable) isNull = ReadNull(); |
| | | 519 | | if (checkType) |
| | | 520 | | { |
| | | 521 | | if (xsiType == null || ((object)((System.Xml.XmlQualifiedName)xsiType).Name == (object)id4_MetadataSecti |
| | | 522 | | { |
| | | 523 | | } |
| | | 524 | | else |
| | | 525 | | throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(CreateUnknownTypeException((System.Xml.Xml |
| | | 526 | | } |
| | | 527 | | if (isNull) return null; |
| | | 528 | | global::CoreWCF.Description.MetadataSection o; |
| | | 529 | | o = new global::CoreWCF.Description.MetadataSection(); |
| | | 530 | | global::System.Collections.ObjectModel.Collection<global::System.Xml.XmlAttribute> a_0 = (global::System.Col |
| | | 531 | | bool[] paramsRead = new bool[4]; |
| | | 532 | | while (Reader.MoveToNextAttribute()) |
| | | 533 | | { |
| | | 534 | | if (!paramsRead[1] && ((object)Reader.LocalName == (object)id5_Dialect && (object)Reader.NamespaceURI == |
| | | 535 | | { |
| | | 536 | | o.@Dialect = Reader.Value; |
| | | 537 | | paramsRead[1] = true; |
| | | 538 | | } |
| | | 539 | | else if (!paramsRead[2] && ((object)Reader.LocalName == (object)id7_Identifier && (object)Reader.Namespa |
| | | 540 | | { |
| | | 541 | | o.@Identifier = Reader.Value; |
| | | 542 | | paramsRead[2] = true; |
| | | 543 | | } |
| | | 544 | | else if (!IsXmlnsAttribute(Reader.Name)) |
| | | 545 | | { |
| | | 546 | | System.Xml.XmlAttribute attr = (System.Xml.XmlAttribute)Document.ReadNode(Reader); |
| | | 547 | | ParseWsdlArrayType(attr); |
| | | 548 | | a_0.Add(attr); |
| | | 549 | | } |
| | | 550 | | } |
| | | 551 | | Reader.MoveToElement(); |
| | | 552 | | if (Reader.IsEmptyElement) |
| | | 553 | | { |
| | | 554 | | Reader.Skip(); |
| | | 555 | | return o; |
| | | 556 | | } |
| | | 557 | | Reader.ReadStartElement(); |
| | | 558 | | Reader.MoveToContent(); |
| | | 559 | | int whileIterations1 = 0; |
| | | 560 | | int readerCount1 = ReaderCount; |
| | | 561 | | while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.Non |
| | | 562 | | { |
| | | 563 | | if (Reader.NodeType == System.Xml.XmlNodeType.Element) |
| | | 564 | | { |
| | | 565 | | if (!paramsRead[3] && ((object)Reader.LocalName == (object)id1_Metadata && (object)Reader.NamespaceU |
| | | 566 | | { |
| | | 567 | | o.@Metadata = Read67_MetadataSet(false, true); |
| | | 568 | | paramsRead[3] = true; |
| | | 569 | | } |
| | | 570 | | else if (!paramsRead[3] && ((object)Reader.LocalName == (object)id8_schema && (object)Reader.Namespa |
| | | 571 | | { |
| | | 572 | | o.@Metadata = System.Xml.Schema.XmlSchema.Read(this.Reader, null); |
| | | 573 | | if (this.Reader.NodeType == XmlNodeType.EndElement) |
| | | 574 | | ReadEndElement(); |
| | | 575 | | paramsRead[3] = true; |
| | | 576 | | } |
| | | 577 | | else if (!paramsRead[3] && ((object)Reader.LocalName == (object)id10_definitions && (object)Reader.N |
| | | 578 | | { |
| | | 579 | | { |
| | | 580 | | o.@Metadata = System.Web.Services.Description.ServiceDescription.Read(this.Reader); |
| | | 581 | | } |
| | | 582 | | paramsRead[3] = true; |
| | | 583 | | } |
| | | 584 | | else if (!paramsRead[3] && ((object)Reader.LocalName == (object)id12_MetadataReference && (object)Re |
| | | 585 | | { |
| | | 586 | | o.@Metadata = (global::CoreWCF.Description.MetadataReference)ReadSerializable((System.Xml.Serial |
| | | 587 | | paramsRead[3] = true; |
| | | 588 | | } |
| | | 589 | | else if (!paramsRead[3] && ((object)Reader.LocalName == (object)id13_Location && (object)Reader.Name |
| | | 590 | | { |
| | | 591 | | o.@Metadata = Read65_MetadataLocation(false, true); |
| | | 592 | | paramsRead[3] = true; |
| | | 593 | | } |
| | | 594 | | else |
| | | 595 | | { |
| | | 596 | | o.@Metadata = (global::System.Xml.XmlElement)ReadXmlNode(false); |
| | | 597 | | } |
| | | 598 | | } |
| | | 599 | | else |
| | | 600 | | { |
| | | 601 | | UnknownNode((object)o, @"http://schemas.xmlsoap.org/ws/2004/09/mex:Metadata, http://www.w3.org/2001/ |
| | | 602 | | } |
| | | 603 | | Reader.MoveToContent(); |
| | | 604 | | CheckReaderCount(ref whileIterations1, ref readerCount1); |
| | | 605 | | } |
| | | 606 | | ReadEndElement(); |
| | | 607 | | return o; |
| | | 608 | | } |
| | | 609 | | |
| | | 610 | | global::CoreWCF.Description.MetadataLocation Read65_MetadataLocation(bool isNullable, bool checkType) |
| | | 611 | | { |
| | | 612 | | System.Xml.XmlQualifiedName xsiType = checkType ? GetXsiType() : null; |
| | | 613 | | bool isNull = false; |
| | | 614 | | if (isNullable) isNull = ReadNull(); |
| | | 615 | | if (checkType) |
| | | 616 | | { |
| | | 617 | | if (xsiType == null || ((object)((System.Xml.XmlQualifiedName)xsiType).Name == (object)id14_MetadataLoca |
| | | 618 | | { |
| | | 619 | | } |
| | | 620 | | else |
| | | 621 | | throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(CreateUnknownTypeException((System.Xml.Xml |
| | | 622 | | } |
| | | 623 | | if (isNull) return null; |
| | | 624 | | global::CoreWCF.Description.MetadataLocation o; |
| | | 625 | | o = new global::CoreWCF.Description.MetadataLocation(); |
| | | 626 | | bool[] paramsRead = new bool[1]; |
| | | 627 | | while (Reader.MoveToNextAttribute()) |
| | | 628 | | { |
| | | 629 | | if (!IsXmlnsAttribute(Reader.Name)) |
| | | 630 | | { |
| | | 631 | | UnknownNode((object)o); |
| | | 632 | | } |
| | | 633 | | } |
| | | 634 | | Reader.MoveToElement(); |
| | | 635 | | if (Reader.IsEmptyElement) |
| | | 636 | | { |
| | | 637 | | Reader.Skip(); |
| | | 638 | | return o; |
| | | 639 | | } |
| | | 640 | | Reader.ReadStartElement(); |
| | | 641 | | Reader.MoveToContent(); |
| | | 642 | | int whileIterations2 = 0; |
| | | 643 | | int readerCount2 = ReaderCount; |
| | | 644 | | while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.Non |
| | | 645 | | { |
| | | 646 | | string tmp = null; |
| | | 647 | | if (Reader.NodeType == System.Xml.XmlNodeType.Element) |
| | | 648 | | { |
| | | 649 | | UnknownNode((object)o, @""); |
| | | 650 | | } |
| | | 651 | | else if (Reader.NodeType == System.Xml.XmlNodeType.Text || |
| | | 652 | | Reader.NodeType == System.Xml.XmlNodeType.CDATA || |
| | | 653 | | Reader.NodeType == System.Xml.XmlNodeType.Whitespace || |
| | | 654 | | Reader.NodeType == System.Xml.XmlNodeType.SignificantWhitespace) |
| | | 655 | | { |
| | | 656 | | tmp = ReadString(tmp, false); |
| | | 657 | | o.@Location = tmp; |
| | | 658 | | } |
| | | 659 | | else |
| | | 660 | | { |
| | | 661 | | UnknownNode((object)o, @""); |
| | | 662 | | } |
| | | 663 | | Reader.MoveToContent(); |
| | | 664 | | CheckReaderCount(ref whileIterations2, ref readerCount2); |
| | | 665 | | } |
| | | 666 | | ReadEndElement(); |
| | | 667 | | return o; |
| | | 668 | | } |
| | | 669 | | |
| | | 670 | | protected override void InitCallbacks() |
| | | 671 | | { |
| | | 672 | | } |
| | | 673 | | |
| | | 674 | | string id60_documentation; |
| | | 675 | | string id22_targetNamespace; |
| | | 676 | | string id10_definitions; |
| | | 677 | | string id65_lang; |
| | | 678 | | string id31_attribute; |
| | | 679 | | string id47_ref; |
| | | 680 | | string id4_MetadataSection; |
| | | 681 | | string id54_refer; |
| | | 682 | | string id83_union; |
| | | 683 | | string id127_Item; |
| | | 684 | | string id53_XmlSchemaKeyref; |
| | | 685 | | string id27_import; |
| | | 686 | | string id75_all; |
| | | 687 | | string id128_XmlSchemaSimpleContent; |
| | | 688 | | string id139_XmlSchemaInclude; |
| | | 689 | | string id78_namespace; |
| | | 690 | | string id18_attributeFormDefault; |
| | | 691 | | string id100_XmlSchemaFractionDigitsFacet; |
| | | 692 | | string id32_attributeGroup; |
| | | 693 | | string id64_XmlSchemaDocumentation; |
| | | 694 | | string id93_maxLength; |
| | | 695 | | string id49_type; |
| | | 696 | | string id86_XmlSchemaSimpleTypeRestriction; |
| | | 697 | | string id96_length; |
| | | 698 | | string id104_XmlSchemaLengthFacet; |
| | | 699 | | string id17_XmlSchema; |
| | | 700 | | string id134_public; |
| | | 701 | | string id77_XmlSchemaAnyAttribute; |
| | | 702 | | string id24_id; |
| | | 703 | | string id71_simpleContent; |
| | | 704 | | string id51_key; |
| | | 705 | | string id67_XmlSchemaKey; |
| | | 706 | | string id80_XmlSchemaAttribute; |
| | | 707 | | string id126_Item; |
| | | 708 | | string id23_version; |
| | | 709 | | string id121_XmlSchemaGroupRef; |
| | | 710 | | string id90_maxInclusive; |
| | | 711 | | string id116_memberTypes; |
| | | 712 | | string id20_finalDefault; |
| | | 713 | | string id120_any; |
| | | 714 | | string id112_XmlSchemaMaxExclusiveFacet; |
| | | 715 | | string id15_EndpointReference; |
| | | 716 | | string id45_name; |
| | | 717 | | string id122_XmlSchemaSequence; |
| | | 718 | | string id73_sequence; |
| | | 719 | | string id82_XmlSchemaSimpleType; |
| | | 720 | | string id48_substitutionGroup; |
| | | 721 | | string id111_XmlSchemaMinInclusiveFacet; |
| | | 722 | | string id7_Identifier; |
| | | 723 | | string id113_XmlSchemaSimpleTypeList; |
| | | 724 | | string id41_default; |
| | | 725 | | string id125_extension; |
| | | 726 | | string id16_Item; |
| | | 727 | | string id1000_Item; |
| | | 728 | | string id124_XmlSchemaComplexContent; |
| | | 729 | | string id72_complexContent; |
| | | 730 | | string id11_Item; |
| | | 731 | | string id25_include; |
| | | 732 | | string id34_simpleType; |
| | | 733 | | string id91_minExclusive; |
| | | 734 | | string id94_pattern; |
| | | 735 | | string id2_Item; |
| | | 736 | | string id95_enumeration; |
| | | 737 | | string id114_itemType; |
| | | 738 | | string id115_XmlSchemaSimpleTypeUnion; |
| | | 739 | | string id59_XmlSchemaAnnotation; |
| | | 740 | | string id28_notation; |
| | | 741 | | string id84_list; |
| | | 742 | | string id39_abstract; |
| | | 743 | | string id103_XmlSchemaWhiteSpaceFacet; |
| | | 744 | | string id110_XmlSchemaMaxInclusiveFacet; |
| | | 745 | | string id55_selector; |
| | | 746 | | string id43_fixed; |
| | | 747 | | string id57_XmlSchemaXPath; |
| | | 748 | | string id118_XmlSchemaAll; |
| | | 749 | | string id56_field; |
| | | 750 | | string id119_XmlSchemaChoice; |
| | | 751 | | string id123_XmlSchemaAny; |
| | | 752 | | string id132_XmlSchemaGroup; |
| | | 753 | | string id35_element; |
| | | 754 | | string id129_Item; |
| | | 755 | | string id30_annotation; |
| | | 756 | | string id44_form; |
| | | 757 | | string id21_elementFormDefault; |
| | | 758 | | string id98_totalDigits; |
| | | 759 | | string id88_maxExclusive; |
| | | 760 | | string id42_final; |
| | | 761 | | string id46_nillable; |
| | | 762 | | string id9_Item; |
| | | 763 | | string id61_appinfo; |
| | | 764 | | string id38_maxOccurs; |
| | | 765 | | string id70_mixed; |
| | | 766 | | string id87_base; |
| | | 767 | | string id13_Location; |
| | | 768 | | string id12_MetadataReference; |
| | | 769 | | string id97_whiteSpace; |
| | | 770 | | string id29_group; |
| | | 771 | | string id92_minLength; |
| | | 772 | | string id99_fractionDigits; |
| | | 773 | | string id137_schemaLocation; |
| | | 774 | | string id26_redefine; |
| | | 775 | | string id101_value; |
| | | 776 | | string id63_source; |
| | | 777 | | string id89_minInclusive; |
| | | 778 | | string id133_XmlSchemaNotation; |
| | | 779 | | string id52_keyref; |
| | | 780 | | string id33_complexType; |
| | | 781 | | string id135_system; |
| | | 782 | | string id50_unique; |
| | | 783 | | string id74_choice; |
| | | 784 | | string id66_Item; |
| | | 785 | | string id105_XmlSchemaEnumerationFacet; |
| | | 786 | | string id107_XmlSchemaMaxLengthFacet; |
| | | 787 | | string id36_XmlSchemaElement; |
| | | 788 | | string id106_XmlSchemaPatternFacet; |
| | | 789 | | string id37_minOccurs; |
| | | 790 | | string id130_Item; |
| | | 791 | | string id68_XmlSchemaUnique; |
| | | 792 | | string id131_XmlSchemaAttributeGroup; |
| | | 793 | | string id40_block; |
| | | 794 | | string id81_use; |
| | | 795 | | string id85_restriction; |
| | | 796 | | string id1_Metadata; |
| | | 797 | | string id69_XmlSchemaComplexType; |
| | | 798 | | string id117_XmlSchemaAttributeGroupRef; |
| | | 799 | | string id138_XmlSchemaRedefine; |
| | | 800 | | string id6_Item; |
| | | 801 | | string id102_XmlSchemaTotalDigitsFacet; |
| | | 802 | | string id58_xpath; |
| | | 803 | | string id5_Dialect; |
| | | 804 | | string id14_MetadataLocation; |
| | | 805 | | string id3_MetadataSet; |
| | | 806 | | string id79_processContents; |
| | | 807 | | string id76_anyAttribute; |
| | | 808 | | string id19_blockDefault; |
| | | 809 | | string id136_XmlSchemaImport; |
| | | 810 | | string id109_XmlSchemaMinExclusiveFacet; |
| | | 811 | | string id108_XmlSchemaMinLengthFacet; |
| | | 812 | | string id8_schema; |
| | | 813 | | string id62_XmlSchemaAppInfo; |
| | | 814 | | |
| | | 815 | | protected override void InitIDs() |
| | | 816 | | { |
| | | 817 | | id60_documentation = Reader.NameTable.Add(@"documentation"); |
| | | 818 | | id22_targetNamespace = Reader.NameTable.Add(@"targetNamespace"); |
| | | 819 | | id10_definitions = Reader.NameTable.Add(@"definitions"); |
| | | 820 | | id65_lang = Reader.NameTable.Add(@"lang"); |
| | | 821 | | id31_attribute = Reader.NameTable.Add(@"attribute"); |
| | | 822 | | id47_ref = Reader.NameTable.Add(@"ref"); |
| | | 823 | | id4_MetadataSection = Reader.NameTable.Add(@"MetadataSection"); |
| | | 824 | | id54_refer = Reader.NameTable.Add(@"refer"); |
| | | 825 | | id83_union = Reader.NameTable.Add(@"union"); |
| | | 826 | | id127_Item = Reader.NameTable.Add(@"XmlSchemaComplexContentRestriction"); |
| | | 827 | | id53_XmlSchemaKeyref = Reader.NameTable.Add(@"XmlSchemaKeyref"); |
| | | 828 | | id27_import = Reader.NameTable.Add(@"import"); |
| | | 829 | | id75_all = Reader.NameTable.Add(@"all"); |
| | | 830 | | id128_XmlSchemaSimpleContent = Reader.NameTable.Add(@"XmlSchemaSimpleContent"); |
| | | 831 | | id139_XmlSchemaInclude = Reader.NameTable.Add(@"XmlSchemaInclude"); |
| | | 832 | | id78_namespace = Reader.NameTable.Add(@"namespace"); |
| | | 833 | | id18_attributeFormDefault = Reader.NameTable.Add(@"attributeFormDefault"); |
| | | 834 | | id100_XmlSchemaFractionDigitsFacet = Reader.NameTable.Add(@"XmlSchemaFractionDigitsFacet"); |
| | | 835 | | id32_attributeGroup = Reader.NameTable.Add(@"attributeGroup"); |
| | | 836 | | id64_XmlSchemaDocumentation = Reader.NameTable.Add(@"XmlSchemaDocumentation"); |
| | | 837 | | id93_maxLength = Reader.NameTable.Add(@"maxLength"); |
| | | 838 | | id49_type = Reader.NameTable.Add(@"type"); |
| | | 839 | | id86_XmlSchemaSimpleTypeRestriction = Reader.NameTable.Add(@"XmlSchemaSimpleTypeRestriction"); |
| | | 840 | | id96_length = Reader.NameTable.Add(@"length"); |
| | | 841 | | id104_XmlSchemaLengthFacet = Reader.NameTable.Add(@"XmlSchemaLengthFacet"); |
| | | 842 | | id17_XmlSchema = Reader.NameTable.Add(@"XmlSchema"); |
| | | 843 | | id134_public = Reader.NameTable.Add(@"public"); |
| | | 844 | | id77_XmlSchemaAnyAttribute = Reader.NameTable.Add(@"XmlSchemaAnyAttribute"); |
| | | 845 | | id24_id = Reader.NameTable.Add(@"id"); |
| | | 846 | | id71_simpleContent = Reader.NameTable.Add(@"simpleContent"); |
| | | 847 | | id51_key = Reader.NameTable.Add(@"key"); |
| | | 848 | | id67_XmlSchemaKey = Reader.NameTable.Add(@"XmlSchemaKey"); |
| | | 849 | | id80_XmlSchemaAttribute = Reader.NameTable.Add(@"XmlSchemaAttribute"); |
| | | 850 | | id126_Item = Reader.NameTable.Add(@"XmlSchemaComplexContentExtension"); |
| | | 851 | | id23_version = Reader.NameTable.Add(@"version"); |
| | | 852 | | id121_XmlSchemaGroupRef = Reader.NameTable.Add(@"XmlSchemaGroupRef"); |
| | | 853 | | id90_maxInclusive = Reader.NameTable.Add(@"maxInclusive"); |
| | | 854 | | id116_memberTypes = Reader.NameTable.Add(@"memberTypes"); |
| | | 855 | | id20_finalDefault = Reader.NameTable.Add(@"finalDefault"); |
| | | 856 | | id120_any = Reader.NameTable.Add(@"any"); |
| | | 857 | | id112_XmlSchemaMaxExclusiveFacet = Reader.NameTable.Add(@"XmlSchemaMaxExclusiveFacet"); |
| | | 858 | | id15_EndpointReference = Reader.NameTable.Add(@"EndpointReference"); |
| | | 859 | | id45_name = Reader.NameTable.Add(@"name"); |
| | | 860 | | id122_XmlSchemaSequence = Reader.NameTable.Add(@"XmlSchemaSequence"); |
| | | 861 | | id73_sequence = Reader.NameTable.Add(@"sequence"); |
| | | 862 | | id82_XmlSchemaSimpleType = Reader.NameTable.Add(@"XmlSchemaSimpleType"); |
| | | 863 | | id48_substitutionGroup = Reader.NameTable.Add(@"substitutionGroup"); |
| | | 864 | | id111_XmlSchemaMinInclusiveFacet = Reader.NameTable.Add(@"XmlSchemaMinInclusiveFacet"); |
| | | 865 | | id7_Identifier = Reader.NameTable.Add(@"Identifier"); |
| | | 866 | | id113_XmlSchemaSimpleTypeList = Reader.NameTable.Add(@"XmlSchemaSimpleTypeList"); |
| | | 867 | | id41_default = Reader.NameTable.Add(@"default"); |
| | | 868 | | id125_extension = Reader.NameTable.Add(@"extension"); |
| | | 869 | | id16_Item = Reader.NameTable.Add(@"http://schemas.xmlsoap.org/ws/2004/08/addressing"); |
| | | 870 | | id1000_Item = Reader.NameTable.Add(@"http://www.w3.org/2005/08/addressing"); |
| | | 871 | | id124_XmlSchemaComplexContent = Reader.NameTable.Add(@"XmlSchemaComplexContent"); |
| | | 872 | | id72_complexContent = Reader.NameTable.Add(@"complexContent"); |
| | | 873 | | id11_Item = Reader.NameTable.Add(@"http://schemas.xmlsoap.org/wsdl/"); |
| | | 874 | | id25_include = Reader.NameTable.Add(@"include"); |
| | | 875 | | id34_simpleType = Reader.NameTable.Add(@"simpleType"); |
| | | 876 | | id91_minExclusive = Reader.NameTable.Add(@"minExclusive"); |
| | | 877 | | id94_pattern = Reader.NameTable.Add(@"pattern"); |
| | | 878 | | id2_Item = Reader.NameTable.Add(@"http://schemas.xmlsoap.org/ws/2004/09/mex"); |
| | | 879 | | id95_enumeration = Reader.NameTable.Add(@"enumeration"); |
| | | 880 | | id114_itemType = Reader.NameTable.Add(@"itemType"); |
| | | 881 | | id115_XmlSchemaSimpleTypeUnion = Reader.NameTable.Add(@"XmlSchemaSimpleTypeUnion"); |
| | | 882 | | id59_XmlSchemaAnnotation = Reader.NameTable.Add(@"XmlSchemaAnnotation"); |
| | | 883 | | id28_notation = Reader.NameTable.Add(@"notation"); |
| | | 884 | | id84_list = Reader.NameTable.Add(@"list"); |
| | | 885 | | id39_abstract = Reader.NameTable.Add(@"abstract"); |
| | | 886 | | id103_XmlSchemaWhiteSpaceFacet = Reader.NameTable.Add(@"XmlSchemaWhiteSpaceFacet"); |
| | | 887 | | id110_XmlSchemaMaxInclusiveFacet = Reader.NameTable.Add(@"XmlSchemaMaxInclusiveFacet"); |
| | | 888 | | id55_selector = Reader.NameTable.Add(@"selector"); |
| | | 889 | | id43_fixed = Reader.NameTable.Add(@"fixed"); |
| | | 890 | | id57_XmlSchemaXPath = Reader.NameTable.Add(@"XmlSchemaXPath"); |
| | | 891 | | id118_XmlSchemaAll = Reader.NameTable.Add(@"XmlSchemaAll"); |
| | | 892 | | id56_field = Reader.NameTable.Add(@"field"); |
| | | 893 | | id119_XmlSchemaChoice = Reader.NameTable.Add(@"XmlSchemaChoice"); |
| | | 894 | | id123_XmlSchemaAny = Reader.NameTable.Add(@"XmlSchemaAny"); |
| | | 895 | | id132_XmlSchemaGroup = Reader.NameTable.Add(@"XmlSchemaGroup"); |
| | | 896 | | id35_element = Reader.NameTable.Add(@"element"); |
| | | 897 | | id129_Item = Reader.NameTable.Add(@"XmlSchemaSimpleContentExtension"); |
| | | 898 | | id30_annotation = Reader.NameTable.Add(@"annotation"); |
| | | 899 | | id44_form = Reader.NameTable.Add(@"form"); |
| | | 900 | | id21_elementFormDefault = Reader.NameTable.Add(@"elementFormDefault"); |
| | | 901 | | id98_totalDigits = Reader.NameTable.Add(@"totalDigits"); |
| | | 902 | | id88_maxExclusive = Reader.NameTable.Add(@"maxExclusive"); |
| | | 903 | | id42_final = Reader.NameTable.Add(@"final"); |
| | | 904 | | id46_nillable = Reader.NameTable.Add(@"nillable"); |
| | | 905 | | id9_Item = Reader.NameTable.Add(@"http://www.w3.org/2001/XMLSchema"); |
| | | 906 | | id61_appinfo = Reader.NameTable.Add(@"appinfo"); |
| | | 907 | | id38_maxOccurs = Reader.NameTable.Add(@"maxOccurs"); |
| | | 908 | | id70_mixed = Reader.NameTable.Add(@"mixed"); |
| | | 909 | | id87_base = Reader.NameTable.Add(@"base"); |
| | | 910 | | id13_Location = Reader.NameTable.Add(@"Location"); |
| | | 911 | | id12_MetadataReference = Reader.NameTable.Add(@"MetadataReference"); |
| | | 912 | | id97_whiteSpace = Reader.NameTable.Add(@"whiteSpace"); |
| | | 913 | | id29_group = Reader.NameTable.Add(@"group"); |
| | | 914 | | id92_minLength = Reader.NameTable.Add(@"minLength"); |
| | | 915 | | id99_fractionDigits = Reader.NameTable.Add(@"fractionDigits"); |
| | | 916 | | id137_schemaLocation = Reader.NameTable.Add(@"schemaLocation"); |
| | | 917 | | id26_redefine = Reader.NameTable.Add(@"redefine"); |
| | | 918 | | id101_value = Reader.NameTable.Add(@"value"); |
| | | 919 | | id63_source = Reader.NameTable.Add(@"source"); |
| | | 920 | | id89_minInclusive = Reader.NameTable.Add(@"minInclusive"); |
| | | 921 | | id133_XmlSchemaNotation = Reader.NameTable.Add(@"XmlSchemaNotation"); |
| | | 922 | | id52_keyref = Reader.NameTable.Add(@"keyref"); |
| | | 923 | | id33_complexType = Reader.NameTable.Add(@"complexType"); |
| | | 924 | | id135_system = Reader.NameTable.Add(@"system"); |
| | | 925 | | id50_unique = Reader.NameTable.Add(@"unique"); |
| | | 926 | | id74_choice = Reader.NameTable.Add(@"choice"); |
| | | 927 | | id66_Item = Reader.NameTable.Add(@"http://www.w3.org/XML/1998/namespace"); |
| | | 928 | | id105_XmlSchemaEnumerationFacet = Reader.NameTable.Add(@"XmlSchemaEnumerationFacet"); |
| | | 929 | | id107_XmlSchemaMaxLengthFacet = Reader.NameTable.Add(@"XmlSchemaMaxLengthFacet"); |
| | | 930 | | id36_XmlSchemaElement = Reader.NameTable.Add(@"XmlSchemaElement"); |
| | | 931 | | id106_XmlSchemaPatternFacet = Reader.NameTable.Add(@"XmlSchemaPatternFacet"); |
| | | 932 | | id37_minOccurs = Reader.NameTable.Add(@"minOccurs"); |
| | | 933 | | id130_Item = Reader.NameTable.Add(@"XmlSchemaSimpleContentRestriction"); |
| | | 934 | | id68_XmlSchemaUnique = Reader.NameTable.Add(@"XmlSchemaUnique"); |
| | | 935 | | id131_XmlSchemaAttributeGroup = Reader.NameTable.Add(@"XmlSchemaAttributeGroup"); |
| | | 936 | | id40_block = Reader.NameTable.Add(@"block"); |
| | | 937 | | id81_use = Reader.NameTable.Add(@"use"); |
| | | 938 | | id85_restriction = Reader.NameTable.Add(@"restriction"); |
| | | 939 | | id1_Metadata = Reader.NameTable.Add(@"Metadata"); |
| | | 940 | | id69_XmlSchemaComplexType = Reader.NameTable.Add(@"XmlSchemaComplexType"); |
| | | 941 | | id117_XmlSchemaAttributeGroupRef = Reader.NameTable.Add(@"XmlSchemaAttributeGroupRef"); |
| | | 942 | | id138_XmlSchemaRedefine = Reader.NameTable.Add(@"XmlSchemaRedefine"); |
| | | 943 | | id6_Item = Reader.NameTable.Add(@""); |
| | | 944 | | id102_XmlSchemaTotalDigitsFacet = Reader.NameTable.Add(@"XmlSchemaTotalDigitsFacet"); |
| | | 945 | | id58_xpath = Reader.NameTable.Add(@"xpath"); |
| | | 946 | | id5_Dialect = Reader.NameTable.Add(@"Dialect"); |
| | | 947 | | id14_MetadataLocation = Reader.NameTable.Add(@"MetadataLocation"); |
| | | 948 | | id3_MetadataSet = Reader.NameTable.Add(@"MetadataSet"); |
| | | 949 | | id79_processContents = Reader.NameTable.Add(@"processContents"); |
| | | 950 | | id76_anyAttribute = Reader.NameTable.Add(@"anyAttribute"); |
| | | 951 | | id19_blockDefault = Reader.NameTable.Add(@"blockDefault"); |
| | | 952 | | id136_XmlSchemaImport = Reader.NameTable.Add(@"XmlSchemaImport"); |
| | | 953 | | id109_XmlSchemaMinExclusiveFacet = Reader.NameTable.Add(@"XmlSchemaMinExclusiveFacet"); |
| | | 954 | | id108_XmlSchemaMinLengthFacet = Reader.NameTable.Add(@"XmlSchemaMinLengthFacet"); |
| | | 955 | | id8_schema = Reader.NameTable.Add(@"schema"); |
| | | 956 | | id62_XmlSchemaAppInfo = Reader.NameTable.Add(@"XmlSchemaAppInfo"); |
| | | 957 | | } |
| | | 958 | | } |
| | | 959 | | |
| | | 960 | | internal abstract class XmlSerializer1 : System.Xml.Serialization.XmlSerializer |
| | | 961 | | { |
| | | 962 | | protected override System.Xml.Serialization.XmlSerializationReader CreateReader() |
| | | 963 | | { |
| | 0 | 964 | | return new XmlSerializationReaderMetadataSet(); |
| | | 965 | | } |
| | | 966 | | protected override System.Xml.Serialization.XmlSerializationWriter CreateWriter() |
| | | 967 | | { |
| | 0 | 968 | | return new XmlSerializationWriterMetadataSet(); |
| | | 969 | | } |
| | | 970 | | } |
| | | 971 | | |
| | | 972 | | internal sealed class MetadataSetSerializer : XmlSerializer1 |
| | | 973 | | { |
| | | 974 | | bool processOuterElement = true; |
| | | 975 | | public bool ProcessOuterElement |
| | | 976 | | { |
| | | 977 | | get { return processOuterElement; } |
| | | 978 | | set { processOuterElement = value; } |
| | | 979 | | } |
| | | 980 | | |
| | | 981 | | public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) |
| | | 982 | | { |
| | | 983 | | return xmlReader.IsStartElement(@"Metadata", @"http://schemas.xmlsoap.org/ws/2004/09/mex"); |
| | | 984 | | } |
| | | 985 | | |
| | | 986 | | protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writ |
| | | 987 | | { |
| | | 988 | | ((XmlSerializationWriterMetadataSet)writer).ProcessOuterElement = this.processOuterElement; |
| | | 989 | | ((XmlSerializationWriterMetadataSet)writer).Write68_Metadata(objectToSerialize); |
| | | 990 | | } |
| | | 991 | | |
| | | 992 | | protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) |
| | | 993 | | { |
| | | 994 | | ((XmlSerializationReaderMetadataSet)reader).ProcessOuterElement = this.processOuterElement; |
| | | 995 | | return ((XmlSerializationReaderMetadataSet)reader).Read68_Metadata(); |
| | | 996 | | } |
| | | 997 | | } |
| | | 998 | | |
| | | 999 | | internal class XmlSerializerContract : global::System.Xml.Serialization.XmlSerializerImplementation |
| | | 1000 | | { |
| | | 1001 | | public override global::System.Xml.Serialization.XmlSerializationReader Reader { get { return new XmlSerializati |
| | | 1002 | | public override global::System.Xml.Serialization.XmlSerializationWriter Writer { get { return new XmlSerializati |
| | | 1003 | | System.Collections.Hashtable readMethods = null; |
| | | 1004 | | public override System.Collections.Hashtable ReadMethods |
| | | 1005 | | { |
| | | 1006 | | get |
| | | 1007 | | { |
| | | 1008 | | if (readMethods == null) |
| | | 1009 | | { |
| | | 1010 | | System.Collections.Hashtable _tmp = new System.Collections.Hashtable(); |
| | | 1011 | | _tmp[@"System.ServiceModel.Description.MetadataSet:http://schemas.xmlsoap.org/ws/2004/09/mex:Metadat |
| | | 1012 | | if (readMethods == null) readMethods = _tmp; |
| | | 1013 | | } |
| | | 1014 | | return readMethods; |
| | | 1015 | | } |
| | | 1016 | | } |
| | | 1017 | | System.Collections.Hashtable writeMethods = null; |
| | | 1018 | | public override System.Collections.Hashtable WriteMethods |
| | | 1019 | | { |
| | | 1020 | | get |
| | | 1021 | | { |
| | | 1022 | | if (writeMethods == null) |
| | | 1023 | | { |
| | | 1024 | | System.Collections.Hashtable _tmp = new System.Collections.Hashtable(); |
| | | 1025 | | _tmp[@"System.ServiceModel.Description.MetadataSet:http://schemas.xmlsoap.org/ws/2004/09/mex:Metadat |
| | | 1026 | | if (writeMethods == null) writeMethods = _tmp; |
| | | 1027 | | } |
| | | 1028 | | return writeMethods; |
| | | 1029 | | } |
| | | 1030 | | } |
| | | 1031 | | System.Collections.Hashtable typedSerializers = null; |
| | | 1032 | | public override System.Collections.Hashtable TypedSerializers |
| | | 1033 | | { |
| | | 1034 | | get |
| | | 1035 | | { |
| | | 1036 | | if (typedSerializers == null) |
| | | 1037 | | { |
| | | 1038 | | System.Collections.Hashtable _tmp = new System.Collections.Hashtable(); |
| | | 1039 | | _tmp.Add(@"System.ServiceModel.Description.MetadataSet:http://schemas.xmlsoap.org/ws/2004/09/mex:Met |
| | | 1040 | | if (typedSerializers == null) typedSerializers = _tmp; |
| | | 1041 | | } |
| | | 1042 | | return typedSerializers; |
| | | 1043 | | } |
| | | 1044 | | } |
| | | 1045 | | public override System.Boolean CanSerialize(System.Type type) |
| | | 1046 | | { |
| | | 1047 | | if (type == typeof(global::CoreWCF.Description.MetadataSet)) return true; |
| | | 1048 | | return false; |
| | | 1049 | | } |
| | | 1050 | | public override System.Xml.Serialization.XmlSerializer GetSerializer(System.Type type) |
| | | 1051 | | { |
| | | 1052 | | if (type == typeof(global::CoreWCF.Description.MetadataSet)) return new MetadataSetSerializer(); |
| | | 1053 | | return null; |
| | | 1054 | | } |
| | | 1055 | | } |
| | | 1056 | | |
| | | 1057 | | // end generated code |
| | | 1058 | | #pragma warning restore |
| | | 1059 | | } |