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

◆ ImportStructLikeMapping()

StructMapping System.Xml.Serialization.SoapReflectionImporter.ImportStructLikeMapping ( StructModel model,
RecursionLimiter limiter )
inlineprivate

Definition at line 308 of file SoapReflectionImporter.cs.

309 {
310 if (model.TypeDesc.Kind == TypeKind.Root)
311 {
312 return GetRootMapping();
313 }
314 SoapAttributes attributes = GetAttributes(model.Type);
315 string text = _defaultNs;
316 if (attributes.SoapType != null && attributes.SoapType.Namespace != null)
317 {
318 text = attributes.SoapType.Namespace;
319 }
320 string name = XsdTypeName(model.Type, attributes, model.TypeDesc.Name);
321 name = XmlConvert.EncodeLocalName(name);
322 StructMapping structMapping = (StructMapping)GetTypeMapping(name, text, model.TypeDesc);
323 if (structMapping == null)
324 {
325 structMapping = new StructMapping();
327 structMapping.TypeDesc = model.TypeDesc;
330 if (attributes.SoapType != null)
331 {
332 structMapping.IncludeInSchema = attributes.SoapType.IncludeInSchema;
333 }
336 if (limiter.IsExceededLimit)
337 {
338 limiter.DeferredWorkItems.Add(new ImportStructWorkItem(model, structMapping));
339 return structMapping;
340 }
341 limiter.Depth++;
343 while (limiter.DeferredWorkItems.Count > 0)
344 {
346 ImportStructWorkItem importStructWorkItem = limiter.DeferredWorkItems[index];
348 {
349 limiter.DeferredWorkItems.RemoveAt(index);
350 }
351 }
352 limiter.Depth--;
353 }
354 return structMapping;
355 }
void Add(TKey key, TValue value)
void Add(XmlQualifiedName qname, object value)
Definition NameTable.cs:57
bool InitializeStructMembers(StructMapping mapping, StructModel model, RecursionLimiter limiter)
TypeMapping GetTypeMapping(string typeName, string ns, TypeDesc typeDesc)
void AddTypeMapping(TypeMapping typeMapping)
Definition TypeScope.cs:930

References System.Xml.Serialization.SoapReflectionImporter._defaultNs, System.Xml.Serialization.SoapReflectionImporter._types, System.Xml.Serialization.SoapReflectionImporter._typeScope, System.Collections.Generic.Dictionary< TKey, TValue >.Add(), System.Xml.Serialization.NameTable.Add(), System.Xml.Serialization.TypeScope.AddTypeMapping(), System.Collections.Generic.Dictionary< TKey, TValue >.Count, System.Xml.Dictionary, System.Xml.XmlConvert.EncodeLocalName(), System.Xml.Serialization.SoapReflectionImporter.GetAttributes(), System.Xml.Serialization.SoapReflectionImporter.GetRootMapping(), System.Xml.Serialization.SoapReflectionImporter.GetTypeMapping(), System.Xml.Serialization.SoapTypeAttribute.IncludeInSchema, System.index, System.Xml.Serialization.SoapReflectionImporter.InitializeStructMembers(), System.Xml.Serialization.SoapTypeAttribute.Namespace, System.Xml.Serialization.SoapAttributes.SoapType, System.text, and System.Xml.Serialization.SoapReflectionImporter.XsdTypeName().

Referenced by System.Xml.Serialization.SoapReflectionImporter.ImportTypeMapping(), and System.Xml.Serialization.SoapReflectionImporter.InitializeStructMembers().