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