Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ SetArrayMappingType()

void System.Xml.Serialization.SoapReflectionImporter.SetArrayMappingType ( ArrayMapping mapping)
inlineprivate

Definition at line 468 of file SoapReflectionImporter.cs.

469 {
470 bool flag = false;
471 TypeMapping typeMapping = ((mapping.Elements.Length != 1) ? null : mapping.Elements[0].Mapping);
472 string text;
473 string identifier;
474 if (typeMapping is EnumMapping)
475 {
476 text = typeMapping.Namespace;
477 identifier = typeMapping.TypeName;
478 }
479 else if (typeMapping is PrimitiveMapping)
480 {
481 text = (typeMapping.TypeDesc.IsXsdType ? "http://www.w3.org/2001/XMLSchema" : "http://microsoft.com/wsdl/types/");
482 identifier = typeMapping.TypeDesc.DataType.Name;
483 flag = true;
484 }
485 else if (typeMapping is StructMapping)
486 {
487 if (typeMapping.TypeDesc.IsRoot)
488 {
489 text = "http://www.w3.org/2001/XMLSchema";
490 identifier = "anyType";
491 flag = true;
492 }
493 else
494 {
495 text = typeMapping.Namespace;
496 identifier = typeMapping.TypeName;
497 }
498 }
499 else
500 {
501 if (!(typeMapping is ArrayMapping))
502 {
504 }
505 text = typeMapping.Namespace;
506 identifier = typeMapping.TypeName;
507 }
508 identifier = CodeIdentifier.MakePascal(identifier);
509 string text2 = "ArrayOf" + identifier;
510 string text3 = (flag ? _defaultNs : text);
511 int num = 1;
512 TypeMapping typeMapping2 = (TypeMapping)_types[text2, text3];
513 while (typeMapping2 != null)
514 {
515 if (typeMapping2 is ArrayMapping)
516 {
517 ArrayMapping arrayMapping = (ArrayMapping)typeMapping2;
518 if (AccessorMapping.ElementsMatch(arrayMapping.Elements, mapping.Elements))
519 {
520 break;
521 }
522 }
524 typeMapping2 = (TypeMapping)_types[text2, text3];
525 num++;
526 }
529 }
static CultureInfo InvariantCulture
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
static string XmlInvalidSoapArray
Definition SR.cs:1578
Definition SR.cs:7

References System.Xml.Serialization.SoapReflectionImporter._defaultNs, System.Xml.Serialization.SoapReflectionImporter._types, System.Xml.Dictionary, System.Xml.Serialization.AccessorMapping.ElementsMatch(), System.SR.Format(), System.Globalization.CultureInfo.InvariantCulture, System.Xml.Serialization.CodeIdentifier.MakePascal(), System.text, and System.SR.XmlInvalidSoapArray.

Referenced by System.Xml.Serialization.SoapReflectionImporter.ImportArrayLikeMapping().