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