4 instantiations of EnumMapping
System.Private.Xml (4)
System\Xml\Serialization\SoapReflectionImporter.cs (1)
567
mapping = new
EnumMapping
();
System\Xml\Serialization\XmlReflectionImporter.cs (1)
1201
mapping = new
EnumMapping
();
System\Xml\Serialization\XmlSchemaImporter.cs (2)
1742
EnumMapping enumMapping = new
EnumMapping
();
1800
EnumMapping enumMapping = new
EnumMapping
();
110 references to EnumMapping
System.Private.Xml (110)
System\Xml\Serialization\ReflectionXmlSerializationReader.cs (8)
39
(mapping is StructMapping || mapping is
EnumMapping
|| mapping is ArrayMapping || mapping is NullableMapping) &&
1028
else if (mapping is
EnumMapping
enumMapping)
1168
if (mapping is
EnumMapping
enumMapping)
1252
private object WriteEnumMethod(
EnumMapping
mapping, Func<object, string> readFunc, object funcState)
1259
private object WriteEnumMethodSoap(
EnumMapping
mapping)
1265
private object WriteEnumMethod(
EnumMapping
mapping, string source)
1286
private static Hashtable WriteHashtable(
EnumMapping
mapping)
1771
if (m is
EnumMapping
enumMapping)
System\Xml\Serialization\ReflectionXmlSerializationWriter.cs (11)
45
(mapping is StructMapping || mapping is
EnumMapping
) &&
282
if (text.Mapping is
EnumMapping
enumMapping)
377
else if (element.Mapping is
EnumMapping
)
382
WriteEnumMethod((
EnumMapping
)element.Mapping, o!);
464
else if (mapping is
EnumMapping
enumMapping)
666
if (m is
EnumMapping
em && em.TypeDesc!.Type == objType)
688
private string? WriteEnumMethod(
EnumMapping
mapping, object v)
792
if (attribute.Mapping is
EnumMapping
enumMapping)
932
if (mapping is
EnumMapping
)
934
if (((
EnumMapping
)mapping).IsFlags)
965
if (mapping is
EnumMapping
enumMapping)
System\Xml\Serialization\SoapReflectionImporter.cs (4)
470
if (itemTypeMapping is
EnumMapping
)
555
private
EnumMapping
ImportEnumMapping(EnumModel model)
564
EnumMapping
? mapping = (
EnumMapping
?)GetTypeMapping(typeName, typeNs, model.TypeDesc);
System\Xml\Serialization\XmlReflectionImporter.cs (8)
1037
else if (itemTypeMapping is
EnumMapping
)
1188
private
EnumMapping
ImportEnumMapping(EnumModel model, string? ns, bool repeats)
1198
EnumMapping
? mapping = (
EnumMapping
?)GetTypeMapping(typeName, typeNs, model.TypeDesc, _types, model.Type);
1566
CheckChoiceIdentifierMapping((
EnumMapping
)accessor.ChoiceIdentifier.Mapping);
1992
EnumMapping
choiceMapping = (
EnumMapping
)accessor.ChoiceIdentifier.Mapping!;
2125
private static void CheckChoiceIdentifierMapping(
EnumMapping
choiceMapping)
System\Xml\Serialization\XmlSchemaExporter.cs (6)
556
if (mapping is
EnumMapping
)
558
return ExportEnumMapping((
EnumMapping
)mapping, null);
569
if (mapping is
EnumMapping
)
571
XmlSchemaType type = ExportEnumMapping((
EnumMapping
)mapping, ns);
872
if (mapping is
EnumMapping
em)
1141
private XmlSchemaSimpleType ExportEnumMapping(
EnumMapping
mapping, string? ns)
System\Xml\Serialization\XmlSchemaImporter.cs (4)
847
ConstantMapping[] constants = ((
EnumMapping
)member.ChoiceIdentifier.Mapping).Constants!;
1742
EnumMapping
enumMapping = new EnumMapping();
1797
private
EnumMapping
ImportEnumeratedChoice(ElementAccessor[] choice, string? typeNs, string typeName)
1800
EnumMapping
enumMapping = new EnumMapping();
System\Xml\Serialization\XmlSerializationReader.cs (11)
2244
if (mapping is StructMapping || mapping is
EnumMapping
|| mapping is NullableMapping)
2258
else if (mapping is
EnumMapping
)
2259
WriteEnumMethod((
EnumMapping
)mapping);
2279
else if (mapping is
EnumMapping
)
2281
WriteEnumMethod((
EnumMapping
)mapping);
2390
(mapping is StructMapping || mapping is
EnumMapping
|| mapping is ArrayMapping || mapping is NullableMapping) &&
2823
if (mapping is
EnumMapping
)
2871
private string? MakeUnique(
EnumMapping
mapping, string name)
2894
private string WriteHashtable(
EnumMapping
mapping, string typeName)
2971
private void WriteEnumMethod(
EnumMapping
mapping)
3097
if (m is
EnumMapping
enumMapping)
System\Xml\Serialization\XmlSerializationReaderILGen.cs (12)
26
private Dictionary<string,
EnumMapping
>? _enums;
29
internal Dictionary<string,
EnumMapping
> Enums => _enums ??= new Dictionary<string,
EnumMapping
>();
197
if (mapping is StructMapping || mapping is
EnumMapping
|| mapping is NullableMapping)
213
else if (mapping is
EnumMapping
)
215
WriteEnumMethod((
EnumMapping
)mapping);
682
if (mapping is
EnumMapping
)
915
private string? MakeUnique(
EnumMapping
mapping, string name)
918
EnumMapping
? m;
938
private string WriteHashtable(
EnumMapping
mapping, string typeName, out MethodBuilder? get_TableName)
1015
private void WriteEnumMethod(
EnumMapping
mapping)
1176
if (m is
EnumMapping
enumMapping)
System\Xml\Serialization\XmlSerializationWriter.cs (26)
1721
else if (mapping is
EnumMapping
)
1901
internal string GetStringForEnumCompare(
EnumMapping
mapping, string memberName, bool useReflection)
2262
if (mapping is StructMapping || mapping is
EnumMapping
)
2281
else if (mapping is
EnumMapping
)
2282
WriteEnumMethod((
EnumMapping
)mapping);
2298
else if (mapping is
EnumMapping
)
2300
WriteEnumMethod((
EnumMapping
)mapping);
2339
(typeMapping is StructMapping || typeMapping is
EnumMapping
) &&
2402
private void WriteEnumValue(
EnumMapping
mapping, string source)
2452
if (mapping is
EnumMapping
)
2465
if (((
EnumMapping
)mapping).IsFlags)
2475
Writer.Write(RaCodeGen.GetStringForEnumCompare((
EnumMapping
)mapping, values[i], mapping.TypeDesc.UseReflection));
2481
Writer.Write(RaCodeGen.GetStringForEnumCompare((
EnumMapping
)mapping, (string)defaultValue!, mapping.TypeDesc.UseReflection));
2504
if (mapping is
EnumMapping
)
2506
WriteEnumValue((
EnumMapping
)mapping, source);
2861
private void WriteEnumMethod(
EnumMapping
mapping)
3013
if (m is
EnumMapping
&& !m.IsSoap)
3015
EnumMapping
mapping = (
EnumMapping
)m;
3406
if (attribute.Mapping is
EnumMapping
)
3407
WriteEnumValue((
EnumMapping
)attribute.Mapping, "ai");
3689
string enumFullName = (enumUseReflection ? "" : $"{enumTypeName}.@") + FindChoiceEnumValue(element, (
EnumMapping
)choice.Mapping, enumUseReflection);
3765
enumFullName = (enumUseReflection ? "" : $"{enumTypeName}.@") + FindChoiceEnumValue(element, (
EnumMapping
)choice.Mapping, enumUseReflection);
3885
if (text.Mapping is
EnumMapping
enumMapping)
4052
else if (element.Mapping is
EnumMapping
)
4445
private static string FindChoiceEnumValue(ElementAccessor element,
EnumMapping
choiceMapping, bool useReflection)
System\Xml\Serialization\XmlSerializationWriterILGen.cs (20)
39
if (mapping is StructMapping || mapping is
EnumMapping
)
57
else if (mapping is
EnumMapping
)
59
WriteEnumMethod((
EnumMapping
)mapping);
121
private void WriteEnumValue(
EnumMapping
mapping, SourceInfo source, out Type returnType)
197
if (mapping is
EnumMapping
)
206
if (((
EnumMapping
)mapping).IsFlags)
241
if (mapping is
EnumMapping
)
243
WriteEnumValue((
EnumMapping
)mapping, source, out argType);
596
private void WriteEnumMethod(
EnumMapping
mapping)
787
if (m is
EnumMapping
)
789
EnumMapping
mapping = (
EnumMapping
)m;
1263
if (attribute.Mapping is
EnumMapping
)
1264
WriteEnumValue((
EnumMapping
)attribute.Mapping, new SourceInfo(aiVar, aiVar, null, arrayElementTypeDesc.Type, ilg), out argType);
1609
string enumFullName = $"{enumTypeName}.@{FindChoiceEnumValue(element, (
EnumMapping
)choice.Mapping!, out enumValue)}";
1687
enumFullName = $"{enumTypeName}.@{FindChoiceEnumValue(element, (
EnumMapping
)choice.Mapping!, out enumValue)}";
1855
if (text.Mapping is
EnumMapping
)
1857
WriteEnumValue((
EnumMapping
)text.Mapping, source, out argType);
1971
else if (element.Mapping is
EnumMapping
)
2239
private static string FindChoiceEnumValue(ElementAccessor element,
EnumMapping
choiceMapping, out object? eValue)