6 types derived from TypeMapping
System.Private.Xml (6)
System\Xml\Serialization\Mappings.cs (6)
353
internal class PrimitiveMapping :
TypeMapping
364
internal sealed class NullableMapping :
TypeMapping
380
internal sealed class ArrayMapping :
TypeMapping
467
internal sealed class StructMapping :
TypeMapping
, INameScope
986
internal sealed class MembersMapping :
TypeMapping
1025
internal class SpecialMapping :
TypeMapping
149 references to TypeMapping
System.Private.Xml (149)
System\Xml\Serialization\Mappings.cs (4)
27
private
TypeMapping
? _mapping;
37
internal
TypeMapping
? Mapping
366
private
TypeMapping
? _baseMapping;
368
internal
TypeMapping
? BaseMapping
System\Xml\Serialization\ReflectionXmlSerializationReader.cs (6)
36
foreach (
TypeMapping
mapping in scope.TypeMappings)
451
TypeMapping
mapping = element.Mapping!;
909
TypeMapping
mapping = element.Mapping;
1021
private XmlSerializationReadCallback CreateXmlSerializationReadCallback(
TypeMapping
mapping)
1166
private object WritePrimitive(
TypeMapping
mapping, Func<object, string> readFunc, object funcState)
1399
TypeMapping
? mapping = member.Mapping.Elements[0].Mapping;
System\Xml\Serialization\ReflectionXmlSerializationWriter.cs (4)
42
foreach (
TypeMapping
mapping in scope.TypeMappings)
79
TypeMapping
mapping = element.Mapping!;
455
private XmlSerializationWriteCallback CreateXmlSerializationWriteCallback(
TypeMapping
mapping, string name, string? ns, bool isNullable)
926
private void WritePrimitive(WritePrimitiveMethodRequirement method, string name, string? ns, object? defaultValue, object o,
TypeMapping
mapping, bool writeXsiType)
System\Xml\Serialization\SoapReflectionImporter.cs (15)
157
private
TypeMapping
ImportTypeMapping(TypeModel model, RecursionLimiter limiter)
163
private
TypeMapping
ImportTypeMapping(TypeModel model, string dataType, RecursionLimiter limiter)
209
TypeMapping
baseMapping =
248
private
TypeMapping
? GetTypeMapping(string typeName, string? ns, TypeDesc typeDesc)
250
TypeMapping
? mapping = (
TypeMapping
?)_types[typeName, ns];
257
private NullableMapping CreateNullableMapping(
TypeMapping
baseMapping,
261
TypeMapping
? existingMapping = (
TypeMapping
?)_nullables[baseMapping.TypeName!, baseMapping.Namespace];
423
TypeMapping
itemTypeMapping = ImportTypeMapping(model.Element, limiter);
464
TypeMapping
? itemTypeMapping;
509
TypeMapping
? existingMapping = (
TypeMapping
?)_types[uniqueName, ns];
521
existingMapping = (
TypeMapping
?)_types[uniqueName, ns];
728
private static ElementAccessor CreateElementAccessor(
TypeMapping
mapping, string? ns)
System\Xml\Serialization\Types.cs (3)
731
internal
TypeMapping
? GetTypeMappingFromTypeDesc(TypeDesc typeDesc)
733
foreach (
TypeMapping
typeMapping in TypeMappings)
1412
internal void AddTypeMapping(
TypeMapping
typeMapping)
System\Xml\Serialization\XmlReflectionImporter.cs (20)
126
TypeMapping
mapping = ImportTypeMapping(_modelScope.GetTypeModel(type), _defaultNs, ImportContext.Element, string.Empty, null, limiter);
300
else if (mapping is
TypeMapping
)
301
return ((
TypeMapping
)mapping).TypeDesc!.FullName;
391
private
TypeMapping
ImportTypeMapping(TypeModel model, string? ns, ImportContext context, string dataType, XmlAttributes? a, RecursionLimiter limiter)
398
private
TypeMapping
ImportTypeMapping(TypeModel model, string? ns, ImportContext context, string dataType, XmlAttributes? a, bool repeats, bool openModel, RecursionLimiter limiter)
449
TypeMapping
baseMapping =
646
private NullableMapping CreateNullableMapping(
TypeMapping
baseMapping,
650
TypeMapping
? existingMapping;
653
existingMapping = (
TypeMapping
?)_nullables[baseMapping.TypeName!, baseMapping.Namespace];
657
existingMapping = (
TypeMapping
?)_anonymous[type];
712
private
TypeMapping
? GetTypeMapping(string? typeName, string? ns, TypeDesc typeDesc, NameTable typeLib, Type? type)
714
TypeMapping
? mapping;
716
mapping = type == null ? null : (
TypeMapping
?)_anonymous[type];
718
mapping = (
TypeMapping
?)typeLib[typeName, ns];
1016
TypeMapping
? itemTypeMapping;
1072
TypeMapping
? existingMapping = (
TypeMapping
?)_types[uniqueName, ns];
1084
existingMapping = (
TypeMapping
?)_types[uniqueName, ns];
2229
private static void CheckNullable(bool isNullable, TypeDesc typeDesc,
TypeMapping
? mapping)
2236
private static ElementAccessor CreateElementAccessor(
TypeMapping
mapping, string ns)
System\Xml\Serialization\XmlSchemaExporter.cs (5)
249
private void CheckForDuplicateType(
TypeMapping
mapping, string? newNamespace)
845
ExportElementMapping(element, (
TypeMapping
)accessor.Mapping!, accessor.Namespace, accessor.Any);
863
internal static string? ExportDefaultValue(
TypeMapping
mapping, object? value)
942
foreach (
TypeMapping
mapping in typeScope.TypeMappings)
1040
TypeMapping
? textMapping = null;
System\Xml\Serialization\XmlSchemaImporter.cs (37)
41
internal static
TypeMapping
GetDefaultMapping(TypeFlags flags)
54
ElementAccessor element = ImportElement(name, typeof(
TypeMapping
), baseType);
95
TypeMapping
typeMapping = ImportType(typeName, typeof(
TypeMapping
), baseType, TypeFlags.CanBeElementValue, true)!;
148
TypeMapping
? typeMapping = ImportType(typeName, typeof(MembersMapping), null, TypeFlags.CanBeElementValue, true);
202
ElementAccessor accessor = ImportElement(name, typeof(
TypeMapping
), baseType);
292
TypeMapping
mapping = ImportElementType(element, identifier, desiredMappingType, baseType, ns);
326
private
TypeMapping
ImportElementType(XmlSchemaElement element, string identifier, Type desiredMappingType, Type? baseType, string? ns)
328
TypeMapping
? mapping;
406
ImportType(type.QualifiedName, typeof(
TypeMapping
), null, TypeFlags.CanBeElementValue, false);
415
private
TypeMapping
? ImportType(XmlQualifiedName name, Type desiredMappingType, Type? baseType, TypeFlags flags, bool addref)
421
TypeMapping
? mapping = (
TypeMapping
?)ImportedMappings[type];
444
private
TypeMapping
? ImportType(XmlSchemaComplexType type, string? typeNs, string identifier, Type desiredMappingType, Type? baseType)
451
if (desiredMappingType == typeof(
TypeMapping
))
453
TypeMapping
? mapping = null;
498
TypeMapping
? baseMapping = null;
503
baseMapping = ImportType(type.DerivedFrom, typeof(
TypeMapping
), null, TypeFlags.CanBeElementValue | TypeFlags.CanBeTextValue, false);
887
TypeMapping
itemMapping = item.Mapping!;
963
AddScopeElement(choiceElements, ImportElement(elements[j], identifier, typeof(
TypeMapping
), null, elements[j].QualifiedName.Namespace, true), ref duplicateElements, allowDuplicates);
967
AddScopeElement(choiceElements, ImportElement(element, identifier, typeof(
TypeMapping
), null, element.QualifiedName.Namespace, false), ref duplicateElements, allowDuplicates);
1116
TypeMapping
? mapping;
1122
mapping = ImportType(simpleContentType, typeof(
TypeMapping
), null, TypeFlags.CanBeElementValue | TypeFlags.CanBeTextValue, false);
1176
member.TypeDesc = ((
TypeMapping
)accessors[0].Mapping!).TypeDesc;
1308
ElementAccessor itemAccessor = ImportElement(itemElement, identifier, typeof(
TypeMapping
), null, ns, false);
1312
arrayMapping.TypeDesc = ((
TypeMapping
)itemAccessor.Mapping!).TypeDesc!.CreateArrayTypeDesc();
1416
accessor = ImportElement(element, identifier, typeof(
TypeMapping
), null, ns, false);
1504
member.TypeDesc = ((
TypeMapping
)accessor.Mapping).TypeDesc;
1613
TypeMapping
? mapping;
1620
mapping = (
TypeMapping
?)ImportType(attribute.SchemaTypeName, typeof(
TypeMapping
), null, TypeFlags.CanBeAttributeValue, false);
1663
private
TypeMapping
? ImportDataType(XmlSchemaSimpleType dataType, string? typeNs, string identifier, Type? baseType, TypeFlags flags, bool isList)
1668
TypeMapping
? mapping = ImportNonXsdPrimitiveDataType(dataType, typeNs, flags);
1710
mapping = ImportType(list.ItemTypeName, typeof(
TypeMapping
), null, TypeFlags.CanBeAttributeValue, true);
1725
private
TypeMapping
? ImportEnumeratedDataType(XmlSchemaSimpleType dataType, string? typeNs, string identifier, TypeFlags flags, bool isList)
1727
TypeMapping
? mapping = (
TypeMapping
?)ImportedMappings[dataType];
System\Xml\Serialization\XmlSerializationGeneratedCode.cs (9)
31
private
TypeMapping
[]? _referencedMethods;
62
internal virtual void GenerateMethod(
TypeMapping
mapping) { }
69
TypeMapping
mapping = _referencedMethods![--_references];
74
internal string? ReferenceMapping(
TypeMapping
mapping)
87
private static
TypeMapping
[] EnsureArrayIndex(
TypeMapping
[] a, int index)
89
if (a == null) return new
TypeMapping
[32];
91
TypeMapping
[] b = new
TypeMapping
[a.Length + 32];
System\Xml\Serialization\XmlSerializationILGen.cs (15)
19
private readonly Dictionary<
TypeMapping
, string> _methodNames = new Dictionary<
TypeMapping
, string>();
31
private
TypeMapping
[]? _referencedMethods;
33
private readonly HashSet<
TypeMapping
> _generatedMethods = new HashSet<
TypeMapping
>();
59
internal Dictionary<
TypeMapping
, string> MethodNames { get { return _methodNames; } }
60
internal HashSet<
TypeMapping
> GeneratedMethods { get { return _generatedMethods; } }
106
internal virtual void GenerateMethod(
TypeMapping
mapping) { }
112
TypeMapping
mapping = _referencedMethods![--_references];
117
internal string? ReferenceMapping(
TypeMapping
mapping)
130
private static
TypeMapping
[] EnsureArrayIndex(
TypeMapping
[]? a, int index)
132
if (a == null) return new
TypeMapping
[32];
134
TypeMapping
[] b = new
TypeMapping
[a.Length + 32];
System\Xml\Serialization\XmlSerializationReader.cs (9)
2242
foreach (
TypeMapping
mapping in scope.TypeMappings)
2252
foreach (
TypeMapping
mapping in scope.TypeMappings)
2269
internal override void GenerateMethod(
TypeMapping
mapping)
2387
foreach (
TypeMapping
mapping in scope.TypeMappings)
2788
TypeMapping
mapping = element.Mapping!;
2821
private void WritePrimitive(
TypeMapping
mapping, string source)
3871
TypeMapping
? mapping = member.Mapping.Elements[0].Mapping;
4735
TypeMapping
mapping = element.Mapping;
5051
private void WriteCreateMapping(
TypeMapping
mapping, string local)
System\Xml\Serialization\XmlSerializationReaderILGen.cs (6)
195
foreach (
TypeMapping
mapping in scope.TypeMappings)
204
internal override void GenerateMethod(
TypeMapping
mapping)
630
TypeMapping
mapping = element.Mapping!;
678
private void WritePrimitive(
TypeMapping
mapping, string source)
3124
TypeMapping
mapping = element.Mapping;
3428
private void WriteCreateMapping(
TypeMapping
mapping, string local)
System\Xml\Serialization\XmlSerializationWriter.cs (10)
1665
TypeMapping
? mapping = scope.GetTypeMappingFromTypeDesc(typeDesc);
1693
private void WriteMappingInfo(
TypeMapping
mapping, string typeVariable,
2260
foreach (
TypeMapping
mapping in scope.TypeMappings)
2274
foreach (
TypeMapping
mapping in scope.TypeMappings)
2288
internal override void GenerateMethod(
TypeMapping
mapping)
2336
foreach (
TypeMapping
typeMapping in scope.TypeMappings)
2363
private void WriteQualifiedNameElement(string name, string? ns, object? defaultValue, string source, bool nullable, bool IsSoap,
TypeMapping
mapping)
2446
private void WritePrimitive(string method, string name, string? ns, object? defaultValue, string source,
TypeMapping
mapping, bool writeXsiType, bool isElement, bool isNullable)
2815
TypeMapping
mapping = element.Mapping!;
4195
private void WriteCheckDefault(
TypeMapping
mapping, string source, object value, bool isNullable)
System\Xml\Serialization\XmlSerializationWriterILGen.cs (5)
37
foreach (
TypeMapping
mapping in scope.TypeMappings)
48
internal override void GenerateMethod(
TypeMapping
mapping)
94
private void WriteQualifiedNameElement(string name, string? ns, object? defaultValue, SourceInfo source, bool nullable,
TypeMapping
mapping)
191
private void WritePrimitive(string method, string name, string? ns, object? defaultValue, SourceInfo source,
TypeMapping
mapping, bool writeXsiType, bool isElement, bool isNullable)
545
TypeMapping
mapping = element.Mapping!;
System\Xml\Serialization\XmlTypeMapping.cs (1)
18
internal
TypeMapping
? Mapping