50 writes to Mapping
dotnet-svcutil-lib (50)
FrameworkFork\Microsoft.Xml\Xml\Serialization\Mappings.cs (1)
172
newAccessor.
Mapping
= this.Mapping;
FrameworkFork\Microsoft.Xml\Xml\Serialization\SoapReflectionImporter.cs (5)
115
element.
Mapping
= ImportTypeMapping(_modelScope.GetTypeModel(type), new RecursionLimiter());
162
element.
Mapping
= ImportMembersMapping(members, ns, hasWrapperElement, writeAccessors, validate, new RecursionLimiter());
732
attribute.
Mapping
= ImportTypeMapping(_modelScope.GetTypeModel(accessorType), (a.SoapAttribute == null ? String.Empty : a.SoapAttribute.DataType), limiter);
747
element.
Mapping
= ImportTypeMapping(_modelScope.GetTypeModel(accessorType), (a.SoapElement == null ? String.Empty : a.SoapElement.DataType), limiter);
760
element.
Mapping
= mapping;
FrameworkFork\Microsoft.Xml\Xml\Serialization\SoapSchemaImporter.cs (7)
70
accessor.
Mapping
= mapping;
96
accessor.
Mapping
= mapping;
158
accessor.
Mapping
= mapping;
182
accessor.
Mapping
= mapping;
438
arrayAccessor.
Mapping
= arrayMapping;
456
itemAccessor.
Mapping
= mapping;
517
itemAccessor.
Mapping
= mapping;
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlReflectionImporter.cs (14)
218
element.
Mapping
= membersMapping;
1504
arrayItemElement.
Mapping
= ImportTypeMapping(_modelScope.GetTypeModel(targetType), arrayItemElement.Namespace, ImportContext.Element, xmlArrayItem.DataType, null, limiter);
1551
accessor.ChoiceIdentifier.
Mapping
= ImportTypeMapping(_modelScope.GetTypeModel(choiceIdentifierType), ns, ImportContext.Element, String.Empty, null, limiter);
1595
attribute.
Mapping
= ImportTypeMapping(_modelScope.GetTypeModel(targetType), ns, ImportContext.Attribute, a.XmlAttribute.DataType, null, isList, false, limiter);
1618
text.
Mapping
= ImportTypeMapping(_modelScope.GetTypeModel(targetType), ns, ImportContext.Text, a.XmlText.DataType, null, true, false, limiter);
1635
element.
Mapping
= ImportTypeMapping(typeModel, rpc ? ns : element.Namespace, ImportContext.Element, xmlElement.DataType, null, limiter);
1695
element.
Mapping
= ImportTypeMapping(typeModel, element.Namespace, ImportContext.Element, String.Empty, null, limiter);
1735
arrayElement.
Mapping
= arrayMapping;
1776
attribute.
Mapping
= ImportTypeMapping(_modelScope.GetTypeModel(accessorType), ns, ImportContext.Attribute, a.XmlAttribute.DataType, null, limiter);
1795
text.
Mapping
= ImportTypeMapping(_modelScope.GetTypeModel(accessorType), ns, ImportContext.Text, a.XmlText.DataType, null, limiter);
1815
element.
Mapping
= ImportTypeMapping(typeModel, rpc ? ns : element.Namespace, ImportContext.Element, xmlElement.DataType, null, limiter);
1879
element.
Mapping
= ImportTypeMapping(typeModel, rpc ? ns : element.Namespace, ImportContext.Element, xmlElement.DataType, null, false, openModel, limiter);
1940
element.
Mapping
= ImportTypeMapping(typeModel, element.Namespace, ImportContext.Element, String.Empty, null, false, openModel, limiter);
2242
element.
Mapping
= mapping;
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSchemaImporter.cs (21)
104
element.
Mapping
= ((ArrayMapping)element.Mapping).TopLevelMapping;
148
accessor.
Mapping
= typeMapping;
164
accessor.
Mapping
= ((ArrayMapping)accessor.Mapping).TopLevelMapping;
218
accessor.
Mapping
= mapping;
271
element.
Mapping
= mapping;
292
accessor.
Mapping
= mapping;
344
accessor.
Mapping
= mapping;
908
element.
Mapping
= arrayMapping.TopLevelMapping;
947
member.ChoiceIdentifier.
Mapping
= ImportEnumeratedChoice(member.Elements, ns, member.Name + "ChoiceType");
971
choiceAccessor.
Mapping
= member.ChoiceIdentifier.Mapping;
1237
accessor.
Mapping
= mapping;
1287
text.
Mapping
= textMapping;
1326
accessor.
Mapping
= mapping;
1339
anyAccessor.
Mapping
= mapping;
1355
arrayAccessor.
Mapping
= arrayMapping;
1540
accessor.
Mapping
= GetDefaultMapping(TypeFlags.CanBeElementValue | TypeFlags.CanBeTextValue);
1555
accessor.
Mapping
= ((ArrayMapping)accessor.Mapping).TopLevelMapping;
1600
accessor.
Mapping
= mapping;
1663
xmlns.
Mapping
= xmlnsMapping;
1698
accessor.
Mapping
= mapping;
1737
accessor.
Mapping
= mapping;
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSerializationWriter.cs (1)
3184
e.
Mapping
= ((NullableMapping)element.Mapping).BaseMapping;
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSerializationWriterILGen.cs (1)
2036
e.
Mapping
= ((NullableMapping)element.Mapping).BaseMapping;
292 references to Mapping
dotnet-svcutil-lib (292)
FrameworkFork\Microsoft.Xml\Xml\Serialization\CodeExporter.cs (2)
223
TypeKind kind = arrayMapping.Elements[0].
Mapping
.TypeDesc.Kind;
230
if (arrayMapping.Elements[i].Name != arrayMapping.Elements[i].
Mapping
.DefaultElementName)
FrameworkFork\Microsoft.Xml\Xml\Serialization\Mappings.cs (9)
172
newAccessor.Mapping = this.
Mapping
;
631
_hasSimpleContent = !hasElements && text != null && !text.
Mapping
.IsList;
649
if (!_hasSimpleContent && text != null && !text.
Mapping
.TypeDesc.CanBeTextValue)
651
throw new InvalidOperationException(string.Format(ResXml.XmlIllegalTypedTextAttribute, TypeDesc.FullName, text.Name, text.
Mapping
.TypeDesc.FullName));
773
int w1 = a1.
Mapping
.TypeDesc.Weight;
774
int w2 = a2.
Mapping
.TypeDesc.Weight;
835
if (element.
Mapping
is ArrayMapping)
837
ArrayMapping arrayMapping = (ArrayMapping)element.
Mapping
;
846
return element.IsNullable && element.
Mapping
.TypeDesc.IsValueType;
FrameworkFork\Microsoft.Xml\Xml\Serialization\SoapCodeExporter.cs (3)
83
ExportType(element.
Mapping
);
228
TypeMapping mapping = (TypeMapping)element.
Mapping
;
290
ExportType(accessors[i].
Mapping
);
FrameworkFork\Microsoft.Xml\Xml\Serialization\SoapReflectionImporter.cs (7)
116
element.Name = element.
Mapping
.DefaultElementName;
117
element.Namespace = element.
Mapping
.Namespace == null ? defaultNamespace : element.
Mapping
.Namespace;
163
element.
Mapping
.TypeName = elementName;
164
element.Namespace = element.
Mapping
.Namespace == null ? ns : element.
Mapping
.Namespace;
495
itemTypeMapping = mapping.Elements[0].
Mapping
;
FrameworkFork\Microsoft.Xml\Xml\Serialization\SoapSchemaExporter.cs (5)
62
MembersMapping membersMapping = (MembersMapping)xmlMembersMapping.Accessor.
Mapping
;
72
ExportTypeMapping(memberMapping.Elements[0].
Mapping
, null);
245
XmlQualifiedName qname = ExportTypeMapping(mapping.Elements[0].
Mapping
, mapping.Namespace);
300
element.IsNillable = accessor.IsNullable || accessor.
Mapping
is NullableMapping;
302
element.SchemaTypeName = ExportTypeMapping(accessor.
Mapping
, accessor.Namespace);
FrameworkFork\Microsoft.Xml\Xml\Serialization\SoapSchemaImporter.cs (8)
150
if (member.Accessor.
Mapping
is StructMapping)
151
MakeDerived((StructMapping)member.Accessor.
Mapping
, baseType, baseTypeCanBeIndirect);
461
arrayMapping.TypeDesc = itemAccessor.
Mapping
.TypeDesc.CreateArrayTypeDesc();
462
arrayMapping.TypeName = "ArrayOf" + CodeIdentifier.MakePascal(itemAccessor.
Mapping
.TypeName);
522
arrayMapping.TypeDesc = itemAccessor.
Mapping
.TypeDesc.CreateArrayTypeDesc();
523
arrayMapping.TypeName = "ArrayOf" + CodeIdentifier.MakePascal(itemAccessor.
Mapping
.TypeName);
540
arrayMapping.TypeDesc = ((TypeMapping)itemAccessor.
Mapping
).TypeDesc.CreateArrayTypeDesc();
566
member.TypeDesc = ((TypeMapping)accessor.
Mapping
).TypeDesc;
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlCodeExporter.cs (13)
89
ExportType(mapping.Attribute.
Mapping
, Accessor.UnescapeName(mapping.Attribute.Name), mapping.Attribute.Namespace, null, false);
96
ExportType(element.
Mapping
, Accessor.UnescapeName(element.Name), element.Namespace, null, false);
101
ExportType(mapping.Text.
Mapping
, Accessor.UnescapeName(mapping.Text.Name), mapping.Text.Namespace, null, false);
109
ExportType(element.
Mapping
, Accessor.UnescapeName(element.Name), element.Namespace, element, true);
689
TypeMapping elementMapping = arrayElement.
Mapping
;
691
bool sameName = arrayElement.
Mapping
.TypeDesc.IsArray ? false : elementName == arrayElement.
Mapping
.TypeName;
717
TypeMapping mapping = (TypeMapping)attribute.
Mapping
;
738
TypeMapping mapping = (TypeMapping)member.Text.
Mapping
;
746
TypeMapping mapping = (TypeMapping)element.
Mapping
;
791
ExportElement(metadata, elemName, sameNs ? null : element.Namespace, ((TypeMapping)element.
Mapping
).TypeDesc, ((TypeMapping)element.
Mapping
).TypeDesc, element.IsNullable, defaultForm ? XmlSchemaForm.None : element.Form, member.SequenceId);
976
ExportType(accessor.
Mapping
, null, ns, null, false);
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlMemberMapping.cs (4)
81
get { return Accessor.
Mapping
!= null ? Accessor.
Mapping
.TypeName : String.Empty; }
90
get { return Accessor.
Mapping
!= null ? Accessor.
Mapping
.Namespace : null; }
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlMembersMapping.cs (3)
22
MembersMapping mapping = (MembersMapping)accessor.
Mapping
;
44
get { return Accessor.
Mapping
.TypeName; }
53
get { return Accessor.
Mapping
.Namespace; }
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlReflectionImporter.cs (50)
282
CheckNullable(element.IsNullable, model.TypeDesc, element.
Mapping
);
319
if (existing.
Mapping
== accessor.
Mapping
)
322
if (!(accessor.
Mapping
is MembersMapping) && !(existing.
Mapping
is MembersMapping))
324
if (accessor.
Mapping
.TypeDesc == existing.
Mapping
.TypeDesc
325
|| (existing.
Mapping
is NullableMapping && accessor.
Mapping
.TypeDesc == ((NullableMapping)existing.
Mapping
).BaseMapping.TypeDesc)
326
|| (accessor.
Mapping
is NullableMapping && ((NullableMapping)accessor.
Mapping
).BaseMapping.TypeDesc == existing.
Mapping
.TypeDesc))
339
if (accessor.
Mapping
is MembersMapping || existing.
Mapping
is MembersMapping)
342
if (accessor.
Mapping
is ArrayMapping)
344
if (!(existing.
Mapping
is ArrayMapping))
346
throw new InvalidOperationException(string.Format(ResXml.XmlCannotReconcileAccessor, accessor.Name, accessor.Namespace, GetMappingName(existing.
Mapping
), GetMappingName(accessor.
Mapping
)));
348
ArrayMapping mapping = (ArrayMapping)accessor.
Mapping
;
349
ArrayMapping existingMapping = mapping.IsAnonymousType ? null : (ArrayMapping)_types[existing.
Mapping
.TypeName, existing.
Mapping
.Namespace];
353
if (existingMapping == accessor.
Mapping
)
359
_types[existing.
Mapping
.TypeName, existing.
Mapping
.Namespace] = mapping;
363
throw new InvalidOperationException(string.Format(ResXml.XmlCannotReconcileAttributeAccessor, accessor.Name, accessor.Namespace, GetMappingName(existing.
Mapping
), GetMappingName(accessor.
Mapping
)));
365
throw new InvalidOperationException(string.Format(ResXml.XmlCannotReconcileAccessor, accessor.Name, accessor.Namespace, GetMappingName(existing.
Mapping
), GetMappingName(accessor.
Mapping
)));
870
if (!member.Text.
Mapping
.TypeDesc.CanBeTextValue && member.Text.
Mapping
.IsList)
871
throw new InvalidOperationException(string.Format(ResXml.XmlIllegalTypedTextAttribute, typeName, member.Text.Name, member.Text.
Mapping
.TypeDesc.FullName));
1017
itemTypeMapping = element.
Mapping
;
1505
arrayItemElement.Name = xmlArrayItem.ElementName.Length == 0 ? arrayItemElement.
Mapping
.DefaultElementName : XmlConvert.EncodeLocalName(xmlArrayItem.ElementName);
1509
CheckNullable(arrayItemElement.IsNullable, targetTypeDesc, arrayItemElement.
Mapping
);
1552
CheckChoiceIdentifierMapping((EnumMapping)accessor.ChoiceIdentifier.
Mapping
);
1619
if (!(text.
Mapping
is SpecialMapping) && targetTypeDesc != _typeScope.GetTypeDesc(typeof(string)))
1643
element.Name = xmlElement.ElementName.Length == 0 ? element.
Mapping
.DefaultElementName : XmlConvert.EncodeLocalName(xmlElement.ElementName);
1652
CheckNullable(element.IsNullable, targetTypeDesc, element.
Mapping
);
1700
CheckNullable(element.IsNullable, targetTypeDesc, element.
Mapping
);
1739
CheckNullable(arrayElement.IsNullable, accessor.TypeDesc, arrayElement.
Mapping
);
1816
if (element.
Mapping
.TypeDesc.Kind == TypeKind.Node)
1827
CheckNullable(element.IsNullable, accessor.TypeDesc, element.
Mapping
);
1886
element.Name = xmlElement.ElementName.Length == 0 ? element.
Mapping
.DefaultElementName : XmlConvert.EncodeLocalName(xmlElement.ElementName);
1894
CheckNullable(element.IsNullable, targetTypeDesc, element.
Mapping
);
1944
CheckNullable(element.IsNullable, targetTypeDesc, element.
Mapping
);
1966
if (accessor.TypeDesc.IsArrayLike && accessor.Elements.Length > 0 && !(accessor.Elements[0].
Mapping
is ArrayMapping))
1981
EnumMapping choiceMapping = (EnumMapping)accessor.ChoiceIdentifier.
Mapping
;
2016
throw new InvalidOperationException(string.Format(ResXml.XmlChoiceMissingAnyValue, accessor.ChoiceIdentifier.
Mapping
.TypeDesc.FullName));
2022
throw new InvalidOperationException(string.Format(ResXml.XmlChoiceMissingValue, accessor.ChoiceIdentifier.
Mapping
.TypeDesc.FullName, id, element.Name, element.Namespace));
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSchemaExporter.cs (19)
60
MembersMapping mapping = (MembersMapping)xmlMembersMapping.Accessor.
Mapping
;
61
if (mapping.Members.Length == 1 && mapping.Members[0].Elements[0].
Mapping
is SpecialMapping)
63
SpecialMapping special = (SpecialMapping)mapping.Members[0].Elements[0].
Mapping
;
92
MembersMapping mapping = (MembersMapping)xmlMembersMapping.Accessor.
Mapping
;
109
if (member.TypeDesc.IsArrayLike && !(member.Elements[0].
Mapping
is ArrayMapping))
118
ExportMapping(member.Elements[0].
Mapping
, member.Elements[0].Namespace, member.Elements[0].Any);
258
if (!accessor.
Mapping
.IncludeInSchema && !accessor.
Mapping
.TypeDesc.IsRoot)
272
ExportElementMapping(element, accessor.
Mapping
, accessor.Namespace, accessor.Any);
768
if (!accessor.HasDefault && !valueTypeOptional && accessor.
Mapping
.TypeDesc.IsValueType)
801
if (accessor.
Mapping
is PrimitiveMapping)
803
PrimitiveMapping pm = (PrimitiveMapping)accessor.
Mapping
;
832
else if (!(accessor.
Mapping
is SpecialMapping))
837
attribute.DefaultValue = ExportDefaultValue(accessor.
Mapping
, accessor.Default);
856
int minOccurs = repeats || accessor.HasDefault || (!accessor.IsNullable && !accessor.
Mapping
.TypeDesc.IsValueType) || valueTypeOptional ? 0 : 1;
865
element.DefaultValue = ExportDefaultValue(accessor.
Mapping
, accessor.Default);
886
ExportElementMapping(element, (TypeMapping)accessor.
Mapping
, accessor.Namespace, accessor.Any);
1096
textMapping = member.Text.
Mapping
;
1101
!(member.Elements.Length == 1 && member.Elements[0].
Mapping
is ArrayMapping);
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSchemaImporter.cs (48)
95
if (element.
Mapping
is StructMapping)
97
MakeDerived((StructMapping)element.
Mapping
, baseType, baseTypeCanBeIndirect);
101
if (element.
Mapping
is ArrayMapping)
104
element.Mapping = ((ArrayMapping)element.
Mapping
).TopLevelMapping;
105
MakeDerived((StructMapping)element.
Mapping
, baseType, baseTypeCanBeIndirect);
155
if (accessor.
Mapping
is StructMapping)
157
MakeDerived((StructMapping)accessor.
Mapping
, baseType, baseTypeCanBeIndirect);
161
if (accessor.
Mapping
is ArrayMapping)
164
accessor.Mapping = ((ArrayMapping)accessor.
Mapping
).TopLevelMapping;
165
MakeDerived((StructMapping)accessor.
Mapping
, baseType, baseTypeCanBeIndirect);
256
if (baseType != null && accessor.
Mapping
is StructMapping)
257
MakeDerived((StructMapping)accessor.
Mapping
, baseType, baseTypeCanBeIndirect);
262
member.TypeDesc = accessor.
Mapping
.TypeDesc;
319
if (element.IsMultipleOccurrence && topAccessor.
Mapping
is ArrayMapping)
323
refAccessor.
Mapping
.ReferencedByElement = true;
887
string tdFullName = element.
Mapping
.TypeDesc.FullName;
901
ArrayMapping arrayMapping = element.
Mapping
as ArrayMapping;
909
element.
Mapping
.ReferencedByTopLevelElement = false;
910
element.
Mapping
.ReferencedByElement = true;
924
typeDescs[i] = ((ElementAccessor)enumerator.Current).
Mapping
.TypeDesc;
949
ConstantMapping[] constants = ((EnumMapping)member.ChoiceIdentifier.
Mapping
).Constants;
959
choiceIdentifier.TypeDesc = member.ChoiceIdentifier.
Mapping
.TypeDesc.CreateArrayTypeDesc();
963
choiceIdentifier.TypeDesc = member.ChoiceIdentifier.
Mapping
.TypeDesc;
971
choiceAccessor.Mapping = member.ChoiceIdentifier.
Mapping
;
992
TypeMapping itemMapping = item.
Mapping
;
1000
if (item.
Mapping
.TypeDesc != null)
1002
if (item.IsNullable != item.
Mapping
.TypeDesc.IsNullable)
1005
if (item.
Mapping
.TypeDesc.IsAmbiguousDataType)
1099
if (scopeElement.
Mapping
.TypeDesc != element.
Mapping
.TypeDesc)
1245
member.TypeDesc = accessor.
Mapping
.TypeDesc.CreateArrayTypeDesc();
1251
PrimitiveMapping pm = (PrimitiveMapping)accessor.
Mapping
;
1254
member.TypeDesc = accessor.
Mapping
.TypeDesc.CreateArrayTypeDesc();
1259
member.TypeDesc = accessor.
Mapping
.TypeDesc;
1276
member.TypeDesc = ((TypeMapping)accessors[0].
Mapping
).TypeDesc;
1415
arrayMapping.TypeDesc = ((TypeMapping)itemAccessor.
Mapping
).TypeDesc.CreateArrayTypeDesc();
1416
arrayMapping.TypeName = (type.Name == null || type.Name.Length == 0) ? "ArrayOf" + CodeIdentifier.MakePascal(itemAccessor.
Mapping
.TypeDesc.Name) : type.Name;
1538
if (accessor.
Mapping
.IsList)
1541
member.TypeDesc = accessor.
Mapping
.TypeDesc;
1545
member.TypeDesc = accessor.
Mapping
.TypeDesc;
1553
if (!allowUnboundedElements && accessor.
Mapping
is ArrayMapping)
1555
accessor.Mapping = ((ArrayMapping)accessor.
Mapping
).TopLevelMapping;
1556
accessor.
Mapping
.ReferencedByTopLevelElement = false;
1557
accessor.
Mapping
.ReferencedByElement = true;
1559
member.TypeDesc = accessor.
Mapping
.TypeDesc.CreateArrayTypeDesc();
1584
member.TypeDesc = accessor.IsList ? accessor.
Mapping
.TypeDesc.CreateArrayTypeDesc() : accessor.
Mapping
.TypeDesc;
1608
member.TypeDesc = ((TypeMapping)accessor.
Mapping
).TypeDesc;
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSerializationILGen.cs (2)
306
string serializerName = CodeIdentifier.MakeValid(Accessor.UnescapeName(mapping.Accessor.
Mapping
.TypeDesc.Name));
446
Type type = xmlMappings[i].Accessor.
Mapping
.TypeDesc.Type;
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSerializationWriter.cs (60)
1873
MembersMapping mapping = (MembersMapping)element.
Mapping
;
2016
if (member.ChoiceIdentifier.
Mapping
.TypeDesc.UseReflection)
2082
TypeMapping mapping = element.
Mapping
;
2670
if (attribute.
Mapping
is EnumMapping)
2671
WriteEnumValue((EnumMapping)attribute.
Mapping
, "ai");
2725
if (attribute.
Mapping
is SpecialMapping)
2727
SpecialMapping special = (SpecialMapping)attribute.
Mapping
;
2741
TypeDesc typeDesc = attribute.
Mapping
.TypeDesc;
2743
WritePrimitive("WriteAttribute", attribute.Name, attribute.Form == XmlSchemaForm.Qualified ? attribute.Namespace : "", attribute.Default, source, attribute.
Mapping
, false, false, false);
2750
!(elements.Length == 1 && elements[0].
Mapping
is ArrayMapping))
2772
bool choiceUseReflection = choice.
Mapping
.TypeDesc.UseReflection;
2773
string choiceFullName = choice.
Mapping
.TypeDesc.CSharpName;
2774
WriteArrayLocalDecl(choiceFullName + "[]", "c", choiceSource, choice.
Mapping
.TypeDesc);
2779
WriteQuotedCSharpString(choice.
Mapping
.TypeDesc.FullName);
2884
string choiceFullName = choice.
Mapping
.TypeDesc.CSharpName;
2885
WriteLocalDecl(choiceFullName, choiceName + "i", RaCodeGen.GetStringForArrayMember(choiceName, "i" + arrayName, choice.
Mapping
.TypeDesc), choice.
Mapping
.TypeDesc.UseReflection);
2908
TypeDesc td = elements[0].IsUnbounded ? elements[0].
Mapping
.TypeDesc.CreateArrayTypeDesc() : elements[0].
Mapping
.TypeDesc;
2909
if (!elements[0].Any && !elements[0].
Mapping
.TypeDesc.UseReflection && !elements[0].
Mapping
.TypeDesc.IsOptionalValue)
2927
string enumTypeName = choice == null ? null : choice.
Mapping
.TypeDesc.FullName;
2943
bool useReflection = element.
Mapping
.TypeDesc.UseReflection;
2944
string fullTypeName = element.
Mapping
.TypeDesc.CSharpName;
2945
bool enumUseReflection = choice.
Mapping
.TypeDesc.UseReflection;
2946
string enumFullName = (enumUseReflection ? "" : enumTypeName + ".@") + FindChoiceEnumValue(element, (EnumMapping)choice.
Mapping
, enumUseReflection);
2963
WriteChoiceTypeCheck(source, fullTypeName, useReflection, choice, enumFullName, element.
Mapping
.TypeDesc);
2974
bool useReflection = element.
Mapping
.TypeDesc.UseReflection;
2975
TypeDesc td = element.IsUnbounded ? element.
Mapping
.TypeDesc.CreateArrayTypeDesc() : element.
Mapping
.TypeDesc;
3019
bool useReflection = element.
Mapping
.TypeDesc.UseReflection;
3022
bool enumUseReflection = choice.
Mapping
.TypeDesc.UseReflection;
3023
enumFullName = (enumUseReflection ? "" : enumTypeName + ".@") + FindChoiceEnumValue(element, (EnumMapping)choice.
Mapping
, enumUseReflection);
3088
bool useReflection = text.
Mapping
.TypeDesc.UseReflection;
3089
string fullTypeName = text.
Mapping
.TypeDesc.CSharpName;
3140
if (text.
Mapping
is PrimitiveMapping)
3142
PrimitiveMapping mapping = (PrimitiveMapping)text.
Mapping
;
3144
if (text.
Mapping
is EnumMapping)
3146
WriteEnumValue((EnumMapping)text.
Mapping
, source);
3154
else if (text.
Mapping
is SpecialMapping)
3156
SpecialMapping mapping = (SpecialMapping)text.
Mapping
;
3171
string name = writeAccessor ? element.Name : element.
Mapping
.TypeName;
3172
string ns = element.Any && element.Name.Length == 0 ? null : (element.Form == XmlSchemaForm.Qualified ? (writeAccessor ? element.Namespace : element.
Mapping
.Namespace) : "");
3173
if (element.
Mapping
is NullableMapping)
3179
string fullTypeName = element.
Mapping
.TypeDesc.BaseTypeDesc.CSharpName;
3181
if (!element.
Mapping
.TypeDesc.BaseTypeDesc.UseReflection)
3184
e.Mapping = ((NullableMapping)element.
Mapping
).BaseMapping;
3197
else if (element.
Mapping
is ArrayMapping)
3199
ArrayMapping mapping = (ArrayMapping)element.
Mapping
;
3312
else if (element.
Mapping
is EnumMapping)
3314
if (element.
Mapping
.IsSoap)
3316
string methodName = (string)MethodNames[element.
Mapping
];
3330
WritePrimitive("WriteElementString", name, ns, element.Default, source, element.
Mapping
, false, true, element.IsNullable);
3333
else if (element.
Mapping
is PrimitiveMapping)
3335
PrimitiveMapping mapping = (PrimitiveMapping)element.
Mapping
;
3346
else if (element.
Mapping
is StructMapping)
3348
StructMapping mapping = (StructMapping)element.
Mapping
;
3399
else if (element.
Mapping
is SpecialMapping)
3401
SpecialMapping mapping = (SpecialMapping)element.
Mapping
;
3407
if (element.
Mapping
is SerializableMapping)
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSerializationWriterILGen.cs (58)
358
MembersMapping mapping = (MembersMapping)element.
Mapping
;
557
TypeMapping mapping = element.
Mapping
;
1334
if (attribute.
Mapping
is EnumMapping)
1335
WriteEnumValue((EnumMapping)attribute.
Mapping
, new SourceInfo(aiVar, aiVar, null, arrayElementTypeDesc.Type, ilg), out argType);
1439
if (attribute.
Mapping
is SpecialMapping)
1441
SpecialMapping special = (SpecialMapping)attribute.
Mapping
;
1463
TypeDesc typeDesc = attribute.
Mapping
.TypeDesc;
1465
WritePrimitive("WriteAttribute", attribute.Name, attribute.Form == XmlSchemaForm.Qualified ? attribute.Namespace : "", GetConvertedDefaultValue(source.Type, attribute.Default), source, attribute.
Mapping
, false, false, false);
1488
!(elements.Length == 1 && elements[0].
Mapping
is ArrayMapping))
1513
string choiceFullName = choice.
Mapping
.TypeDesc.CSharpName;
1515
cName = "c" + choice.
Mapping
.TypeDesc.Name;
1516
WriteArrayLocalDecl(choiceFullName + "[]", cName, choiceSourceInfo, choice.
Mapping
.TypeDesc);
1542
ilg.Ldstr(choice.
Mapping
.TypeDesc.FullName);
1636
WriteLocalDecl(choiceName + "i", RaCodeGen.GetStringForArrayMember(choiceName, iPlusArrayName, choice.
Mapping
.TypeDesc), choice.
Mapping
.TypeDesc.Type);
1653
TypeDesc td = elements[0].IsUnbounded ? elements[0].
Mapping
.TypeDesc.CreateArrayTypeDesc() : elements[0].
Mapping
.TypeDesc;
1654
if (!elements[0].Any && !elements[0].
Mapping
.TypeDesc.IsOptionalValue)
1672
string enumTypeName = choice == null ? null : choice.
Mapping
.TypeDesc.FullName;
1688
string fullTypeName = element.
Mapping
.TypeDesc.CSharpName;
1690
string enumFullName = enumTypeName + ".@" + FindChoiceEnumValue(element, (EnumMapping)choice.
Mapping
, out enumValue);
1694
ILGenLoad(enumSource, choice == null ? null : choice.
Mapping
.TypeDesc.Type);
1712
WriteChoiceTypeCheck(source, fullTypeName, choice, enumFullName, element.
Mapping
.TypeDesc);
1715
castedSource = source.CastTo(element.
Mapping
.TypeDesc);
1720
TypeDesc td = element.IsUnbounded ? element.
Mapping
.TypeDesc.CreateArrayTypeDesc() : element.
Mapping
.TypeDesc;
1773
enumFullName = enumTypeName + ".@" + FindChoiceEnumValue(element, (EnumMapping)choice.
Mapping
, out enumValue);
1776
ILGenLoad(enumSource, choice == null ? null : choice.
Mapping
.TypeDesc.Type);
1904
string fullTypeName = text.
Mapping
.TypeDesc.CSharpName;
1908
WriteInstanceOf(source, text.
Mapping
.TypeDesc.Type);
1910
SourceInfo castedSource = source.CastTo(text.
Mapping
.TypeDesc);
1915
SourceInfo castedSource = source.CastTo(text.
Mapping
.TypeDesc);
1955
if (text.
Mapping
is PrimitiveMapping)
1957
PrimitiveMapping mapping = (PrimitiveMapping)text.
Mapping
;
1960
if (text.
Mapping
is EnumMapping)
1962
WriteEnumValue((EnumMapping)text.
Mapping
, source, out argType);
1977
else if (text.
Mapping
is SpecialMapping)
1979
SpecialMapping mapping = (SpecialMapping)text.
Mapping
;
2010
string name = writeAccessor ? element.Name : element.
Mapping
.TypeName;
2011
string ns = element.Any && element.Name.Length == 0 ? null : (element.Form == XmlSchemaForm.Qualified ? (writeAccessor ? element.Namespace : element.
Mapping
.Namespace) : "");
2012
if (element.
Mapping
is NullableMapping)
2014
if (source.Type == element.
Mapping
.TypeDesc.Type)
2016
MethodInfo Nullable_get_HasValue = element.
Mapping
.TypeDesc.Type.GetMethod(
2023
source.LoadAddress(element.
Mapping
.TypeDesc.Type);
2033
string fullTypeName = element.
Mapping
.TypeDesc.BaseTypeDesc.CSharpName;
2034
SourceInfo castedSource = source.CastTo(element.
Mapping
.TypeDesc.BaseTypeDesc);
2036
e.Mapping = ((NullableMapping)element.
Mapping
).BaseMapping;
2045
else if (element.
Mapping
is ArrayMapping)
2047
ArrayMapping mapping = (ArrayMapping)element.
Mapping
;
2087
else if (element.
Mapping
is EnumMapping)
2089
WritePrimitive("WriteElementString", name, ns, element.Default, source, element.
Mapping
, false, true, element.IsNullable);
2091
else if (element.
Mapping
is PrimitiveMapping)
2093
PrimitiveMapping mapping = (PrimitiveMapping)element.
Mapping
;
2103
else if (element.
Mapping
is StructMapping)
2105
StructMapping mapping = (StructMapping)element.
Mapping
;
2135
else if (element.
Mapping
is SpecialMapping)
2137
SpecialMapping mapping = (SpecialMapping)element.
Mapping
;
2142
if (element.
Mapping
is SerializableMapping)
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlTypeMapping.cs (1)
22
get { return Accessor.
Mapping
; }