55 writes to TypeDesc
dotnet-svcutil-lib (55)
FrameworkFork\Microsoft.Xml\Xml\Serialization\SchemaImporter.cs (1)
184
mapping.
TypeDesc
= typeDesc;
FrameworkFork\Microsoft.Xml\Xml\Serialization\SoapReflectionImporter.cs (9)
261
mapping.
TypeDesc
= typeDesc;
316
mapping.
TypeDesc
= typeDesc;
342
mapping.
TypeDesc
= model.TypeDesc;
457
mapping.
TypeDesc
= model.TypeDesc;
564
mapping.
TypeDesc
= _typeScope.GetTypeDesc(dataType, XmlSchema.Namespace);
568
mapping.
TypeDesc
= _typeScope.GetTypeDesc(dataType, UrtTypes.Namespace);
577
mapping.
TypeDesc
= model.TypeDesc;
598
mapping.
TypeDesc
= model.TypeDesc;
638
members.
TypeDesc
= _typeScope.GetTypeDesc(typeof(object[]));
FrameworkFork\Microsoft.Xml\Xml\Serialization\SoapSchemaImporter.cs (12)
88
mapping.
TypeDesc
= Scope.GetTypeDesc(typeof(object[]));
141
mapping.
TypeDesc
= Scope.GetTypeDesc(typeof(object[]));
327
structMapping.
TypeDesc
= new TypeDesc(typeName, typeName, TypeKind.Struct, baseTypeDesc, flags);
461
arrayMapping.
TypeDesc
= itemAccessor.Mapping.TypeDesc.CreateArrayTypeDesc();
506
mapping.
TypeDesc
= td;
522
arrayMapping.
TypeDesc
= itemAccessor.Mapping.TypeDesc.CreateArrayTypeDesc();
540
arrayMapping.
TypeDesc
= ((TypeMapping)itemAccessor.Mapping).TypeDesc.CreateArrayTypeDesc();
610
mapping.
TypeDesc
= Scope.GetTypeDesc(typeof(string));
631
enumMapping.
TypeDesc
= new TypeDesc(typeName, typeName, TypeKind.Enum, null, 0);
658
mapping.
TypeDesc
= Scope.GetTypeDesc(typeof(string));
672
mapping.
TypeDesc
= sourceTypeDesc;
687
mapping.
TypeDesc
= typeDesc;
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlReflectionImporter.cs (12)
554
serializableMapping.
TypeDesc
= typeDesc;
562
serializableMapping.
TypeDesc
= typeDesc;
570
mapping.
TypeDesc
= typeDesc;
640
mapping.
TypeDesc
= typeDesc;
685
mapping.
TypeDesc
= typeDesc;
745
mapping.
TypeDesc
= model.TypeDesc;
1092
mapping.
TypeDesc
= model.TypeDesc;
1162
mapping.
TypeDesc
= _typeScope.GetTypeDesc(dataType, XmlSchema.Namespace);
1166
mapping.
TypeDesc
= _typeScope.GetTypeDesc(dataType, UrtTypes.Namespace);
1175
mapping.
TypeDesc
= model.TypeDesc;
1198
mapping.
TypeDesc
= model.TypeDesc;
1245
members.
TypeDesc
= _typeScope.GetTypeDesc(typeof(object[]));
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSchemaImporter.cs (21)
81
mapping.
TypeDesc
= Scope.GetTypeDesc("string", XmlSchema.Namespace, flags);
268
mapping.
TypeDesc
= Scope.GetTypeDesc(typeof(object[]));
469
mapping.
TypeDesc
= mapping.TypeDesc.CreateMappedTypeDesc(new MappedTypeDesc(typeName, qname.Name, qname.Namespace, type, context, typeOwner, mainNamespace, compileUnit.ReferencedAssemblies));
475
top.
TypeDesc
= mapping.TypeDesc;
595
mappings.
TypeDesc
= Scope.GetTypeDesc(typeof(object[]));
663
structMapping.
TypeDesc
= new TypeDesc(typeName, typeName, TypeKind.Struct, baseTypeDesc, flags);
717
structMapping.
TypeDesc
= new TypeDesc(typeName, typeName, TypeKind.Struct, baseTypeDesc, flags);
1283
textMapping.
TypeDesc
= Scope.GetTypeDesc(typeof(XmlNode));
1303
mapping.
TypeDesc
= Scope.GetTypeDesc(makeElement ? typeof(XmlElement) : typeof(XmlNode));
1397
arrayMapping.
TypeDesc
= choiceMember.TypeDesc;
1415
arrayMapping.
TypeDesc
= ((TypeMapping)itemAccessor.Mapping).TypeDesc.CreateArrayTypeDesc();
1486
mapping.
TypeDesc
= Scope.GetTypeDesc(typeof(XmlElement));
1495
mapping.
TypeDesc
= Scope.GetTypeDesc(mixed ? typeof(XmlNode) : typeof(XmlElement));
1507
mapping.
TypeDesc
= mapping.TypeDesc.CreateArrayTypeDesc();
1595
mapping.
TypeDesc
= Scope.GetTypeDesc(typeof(XmlAttribute));
1656
xmlnsMapping.
TypeDesc
= xmlnsTypeDesc;
1692
mapping.
TypeDesc
= Scope.GetTypeDesc(typeof(string));
1846
enumMapping.
TypeDesc
= new TypeDesc(typeName, typeName, TypeKind.Enum, null, 0);
1902
enumMapping.
TypeDesc
= new TypeDesc(typeName, typeName, TypeKind.Enum, null, 0);
1931
mapping.
TypeDesc
= sourceTypeDesc;
1947
mapping.
TypeDesc
= typeDesc;
448 references to TypeDesc
dotnet-svcutil-lib (448)
FrameworkFork\Microsoft.Xml\Xml\Serialization\CodeExporter.cs (7)
192
include.Arguments.Add(new CodeAttributeArgument(new CodeTypeOfExpression(derived.
TypeDesc
.FullName)));
202
if (ShouldInclude(arrayMapping) && !typesIncluded.Contains(arrayMapping.
TypeDesc
.FullName))
205
include.Arguments.Add(new CodeAttributeArgument(new CodeTypeOfExpression(arrayMapping.
TypeDesc
.FullName)));
207
typesIncluded.Add(arrayMapping.
TypeDesc
.FullName, string.Empty);
223
TypeKind kind = arrayMapping.Elements[0].Mapping.
TypeDesc
.Kind;
241
CodeTypeDeclaration codeClass = new CodeTypeDeclaration(mapping.
TypeDesc
.Name);
300
attribute.Arguments.Add(new CodeAttributeArgument(new CodeTypeOfExpression(derived.
TypeDesc
.FullName)));
FrameworkFork\Microsoft.Xml\Xml\Serialization\Mappings.cs (13)
629
if (BaseMapping == null || BaseMapping.
TypeDesc
.IsRoot)
638
throw new InvalidOperationException(string.Format(ResXml.XmlIllegalSimpleContentExtension,
TypeDesc
.FullName, BaseMapping.
TypeDesc
.FullName));
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));
677
if (
TypeDesc
.IsRoot)
683
while (!start.BaseMapping.IsSequence && start.BaseMapping != null && !start.BaseMapping.
TypeDesc
.IsRoot)
695
get { return _isSequence && !
TypeDesc
.IsRoot; }
773
int w1 = a1.Mapping.
TypeDesc
.Weight;
774
int w2 = a2.Mapping.
TypeDesc
.Weight;
846
return element.IsNullable && element.Mapping.
TypeDesc
.IsValueType;
1152
throw new InvalidOperationException(string.Format(ResXml.XmlCircularDerivation,
TypeDesc
.FullName));
FrameworkFork\Microsoft.Xml\Xml\Serialization\SchemaImporter.cs (2)
159
TypeDesc typeDescToChange = structMapping.
TypeDesc
;
168
throw new InvalidOperationException(string.Format(ResXml.XmlInvalidBaseType, structMapping.
TypeDesc
.FullName, baseType.FullName, typeDescToChange.BaseTypeDesc.FullName));
FrameworkFork\Microsoft.Xml\Xml\Serialization\SoapCodeExporter.cs (9)
116
AddTypeMetadata(codeClass.CustomAttributes, typeof(SoapTypeAttribute), mapping.
TypeDesc
.Name, Accessor.UnescapeName(mapping.TypeName), mapping.Namespace, mapping.IncludeInSchema);
124
if (mapping.
TypeDesc
.IsRoot)
132
string className = mapping.
TypeDesc
.Name;
133
string baseName = mapping.
TypeDesc
.BaseTypeDesc == null ? string.Empty : mapping.
TypeDesc
.BaseTypeDesc.Name;
149
if (mapping.
TypeDesc
.IsAbstract)
232
if (!sameName || mapping.
TypeDesc
.IsAmbiguousDataType || element.IsNullable)
234
AddElementMetadata(metadata, sameName ? null : elemName, mapping.
TypeDesc
.IsAmbiguousDataType ? mapping.
TypeDesc
: null, element.IsNullable);
FrameworkFork\Microsoft.Xml\Xml\Serialization\SoapReflectionImporter.cs (17)
283
if (mapping.
TypeDesc
!= typeDesc)
284
throw new InvalidOperationException(string.Format(ResXml.XmlTypesDuplicate, typeDesc.FullName, mapping.
TypeDesc
.FullName, typeName, ns));
290
TypeDesc typeDesc = baseMapping.
TypeDesc
.GetNullableTypeDesc(type);
306
throw new InvalidOperationException(string.Format(ResXml.XmlTypesDuplicate, typeDesc.FullName, existingMapping.
TypeDesc
.FullName, typeDesc.Name, existingMapping.Namespace));
311
throw new InvalidOperationException(string.Format(ResXml.XmlTypesDuplicate, typeDesc.FullName, existingMapping.
TypeDesc
.FullName, typeDesc.Name, existingMapping.Namespace));
454
if (itemTypeMapping.
TypeDesc
.IsValueType && !itemTypeMapping.
TypeDesc
.IsPrimitive && !itemTypeMapping.
TypeDesc
.IsEnum)
471
if (existingMapping.
TypeDesc
== model.TypeDesc)
506
itemTypeNamespace = itemTypeMapping.
TypeDesc
.IsXsdType ? XmlSchema.Namespace : UrtTypes.Namespace;
507
itemTypeName = itemTypeMapping.
TypeDesc
.DataType.Name;
512
if (itemTypeMapping.
TypeDesc
.IsRoot)
531
throw new InvalidOperationException(string.Format(ResXml.XmlInvalidSoapArray, mapping.
TypeDesc
.FullName));
565
if (mapping.
TypeDesc
== null)
569
if (mapping.
TypeDesc
== null)
579
mapping.TypeName = mapping.
TypeDesc
.DataType.Name;
580
mapping.Namespace = mapping.
TypeDesc
.IsXsdType ? XmlSchema.Namespace : UrtTypes.Namespace;
FrameworkFork\Microsoft.Xml\Xml\Serialization\SoapSchemaExporter.cs (8)
182
if (pm.
TypeDesc
.IsXsdType)
203
XmlSchemaType type = mapping.
TypeDesc
.DataType;
212
return new XmlQualifiedName(mapping.
TypeDesc
.DataType.Name, UrtTypes.Namespace);
217
return new XmlQualifiedName(mapping.
TypeDesc
.DataType.Name, XmlSchema.Namespace);
319
if (mapping.
TypeDesc
.IsRoot) return ExportRootMapping(mapping);
323
if (!mapping.IncludeInSchema) throw new InvalidOperationException(string.Format(ResXml.XmlSoapCannotIncludeInSchema, mapping.
TypeDesc
.Name));
329
type.IsAbstract = mapping.
TypeDesc
.IsAbstract;
402
if (derived.IncludeInSchema) ExportStructMapping(derived, mapping.
TypeDesc
.IsRoot ? null : mapping.Namespace);
FrameworkFork\Microsoft.Xml\Xml\Serialization\SoapSchemaImporter.cs (7)
312
baseTypeDesc = ((StructMapping)baseMapping).
TypeDesc
;
461
arrayMapping.TypeDesc = itemAccessor.Mapping.
TypeDesc
.CreateArrayTypeDesc();
522
arrayMapping.TypeDesc = itemAccessor.Mapping.
TypeDesc
.CreateArrayTypeDesc();
540
arrayMapping.TypeDesc = ((TypeMapping)itemAccessor.Mapping).
TypeDesc
.CreateArrayTypeDesc();
566
member.TypeDesc = ((TypeMapping)accessor.Mapping).
TypeDesc
;
611
mapping.TypeName = mapping.
TypeDesc
.DataType.Name;
659
mapping.TypeName = mapping.
TypeDesc
.DataType.Name;
FrameworkFork\Microsoft.Xml\Xml\Serialization\Types.cs (2)
765
if (typeMapping.
TypeDesc
== typeDesc)
1179
if (ShouldBeReplaced(pair.Value, structMapping.
TypeDesc
.Type, out replacedInfo))
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlCodeExporter.cs (60)
135
if (mapping.
TypeDesc
.IsMappedType)
137
codeClass = mapping.
TypeDesc
.ExtendedType.ExportTypeDefinition(CodeNamespace, CodeCompileUnit);
153
if (!mapping.
TypeDesc
.IsMappedType)
164
AddTypeMetadata(codeClass.CustomAttributes, typeof(XmlTypeAttribute), mapping.
TypeDesc
.Name, Accessor.UnescapeName(mapping.TypeName), mapping.Namespace, mapping.IncludeInSchema);
192
if (typeMapping.
TypeDesc
.Name != name)
200
if (typeMapping.
TypeDesc
!= null && typeMapping.
TypeDesc
.IsAmbiguousDataType)
202
attribute.Arguments.Add(new CodeAttributeArgument("DataType", new CodePrimitiveExpression(typeMapping.
TypeDesc
.DataType.Name)));
234
CodeExpression enumRef = new CodeFieldReferenceExpression(new CodeTypeReferenceExpression(mapping.
TypeDesc
.FullName), values[i]);
243
valueExpression = new CodeFieldReferenceExpression(new CodeTypeReferenceExpression(mapping.
TypeDesc
.FullName), (string)value);
286
if (mapping.
TypeDesc
.FormatterName == "Date")
291
else if (mapping.
TypeDesc
.FormatterName == "Time")
313
if (mapping.
TypeDesc
.FullName != type.ToString() && !(mapping is EnumMapping))
316
initExpression = new CodeCastExpression(mapping.
TypeDesc
.FullName, initExpression);
377
return XmlCustomFormatter.FromEnum(val, names, ids, em.
TypeDesc
.FullName);
387
throw new InvalidOperationException(string.Format(ResXml.XmlInvalidDefaultValue, defaultValue, em.
TypeDesc
.FullName));
393
if (!pm.
TypeDesc
.HasCustomFormatter)
395
if (pm.
TypeDesc
.FormatterName == "String")
397
if (pm.
TypeDesc
.FormatterName == "DateTime")
402
MethodInfo format = formatter.GetMethod("To" + pm.
TypeDesc
.FormatterName, new Type[] { typeof(string) });
410
if (pm.
TypeDesc
.HasDefaultSupport)
412
return XmlCustomFormatter.ToDefaultValue(defaultValue, pm.
TypeDesc
.FormatterName);
441
if (mapping.
TypeDesc
.IsMappedType && field != null && defaultValue is string)
443
SchemaImporterExtension extension = mapping.
TypeDesc
.ExtendedType.Extension;
444
CodeExpression init = extension.ImportDefaultValue((string)defaultValue, mapping.
TypeDesc
.FullName);
454
field.InitExpression = extension.ImportDefaultValue((string)defaultValue, mapping.
TypeDesc
.FullName);
459
DropDefaultAttribute(accessor, comments, mapping.
TypeDesc
.FullName);
484
if (comments != null && !pm.
TypeDesc
.HasDefaultSupport && pm.
TypeDesc
.IsMappedType)
487
DropDefaultAttribute(accessor, comments, pm.
TypeDesc
.FullName);
532
if (arguments != null && pm.
TypeDesc
.HasDefaultSupport && accessor.IsOptional && !accessor.IsFixed)
562
if (mapping.
TypeDesc
.IsRoot)
568
string className = mapping.
TypeDesc
.Name;
569
string baseName = mapping.
TypeDesc
.BaseTypeDesc == null || mapping.
TypeDesc
.BaseTypeDesc.IsRoot ? string.Empty : mapping.
TypeDesc
.BaseTypeDesc.FullName;
580
if (mapping.
TypeDesc
.IsAbstract)
593
if (mapping.
TypeDesc
.IsAbstract)
691
bool sameName = arrayElement.Mapping.
TypeDesc
.IsArray ? false : elementName == arrayElement.Mapping.TypeName;
692
bool sameElementType = elementMapping.
TypeDesc
== elementTypeDesc;
694
bool sameNullable = arrayElement.IsNullable == elementMapping.
TypeDesc
.IsNullable;
697
ExportArrayItem(metadata, sameName ? null : elementName, sameElementNs ? null : arrayElement.Namespace, sameElementType ? null : elementMapping.
TypeDesc
, elementMapping.
TypeDesc
, arrayElement.IsNullable, defaultForm ? XmlSchemaForm.None : arrayElement.Form, nestingLevel);
719
bool sameType = mapping.
TypeDesc
== member.TypeDesc ||
720
(member.TypeDesc.IsArrayLike && mapping.
TypeDesc
== member.TypeDesc.ArrayElementTypeDesc);
727
sameType ? null : mapping.
TypeDesc
,
728
mapping.
TypeDesc
,
739
bool sameType = mapping.
TypeDesc
== member.TypeDesc ||
740
(member.TypeDesc.IsArrayLike && mapping.
TypeDesc
== member.TypeDesc.ArrayElementTypeDesc);
741
ExportText(metadata, sameType ? null : mapping.
TypeDesc
, mapping.
TypeDesc
.IsAmbiguousDataType ? mapping.
TypeDesc
.DataType.Name : null);
757
bool sameType = mapping.
TypeDesc
== member.TypeDesc;
761
else if (mapping.
TypeDesc
.ArrayElementTypeDesc == new TypeScope().GetTypeDesc(typeof(byte)))
771
bool sameType = mapping.
TypeDesc
== member.TypeDesc ||
772
(member.TypeDesc.IsArrayLike && mapping.
TypeDesc
== member.TypeDesc.ArrayElementTypeDesc);
775
ExportElement(metadata, sameName ? null : elemName, sameNs ? null : element.Namespace, sameType ? null : mapping.
TypeDesc
, mapping.
TypeDesc
, element.IsNullable, defaultForm ? XmlSchemaForm.None : element.Form, member.SequenceId);
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);
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlReflectionImporter.cs (28)
127
if (mapping.IsAnonymousType && !mapping.
TypeDesc
.IsSpecial)
295
return ((TypeMapping)mapping).
TypeDesc
.FullName;
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
))
508
CheckContext(mapping.
TypeDesc
, context);
650
TypeDesc typeDesc = baseMapping.
TypeDesc
.GetNullableTypeDesc(type);
675
throw new InvalidOperationException(string.Format(ResXml.XmlTypesDuplicate, typeDesc.FullName, existingMapping.
TypeDesc
.FullName, typeDesc.Name, existingMapping.Namespace));
680
throw new InvalidOperationException(string.Format(ResXml.XmlTypesDuplicate, typeDesc.FullName, existingMapping.
TypeDesc
.FullName, typeDesc.Name, existingMapping.Namespace));
721
if (!mapping.IsAnonymousType && mapping.
TypeDesc
!= typeDesc)
722
throw new InvalidOperationException(string.Format(ResXml.XmlTypesDuplicate, typeDesc.FullName, mapping.
TypeDesc
.FullName, typeName, ns));
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));
1040
name = itemTypeMapping.
TypeDesc
.DataType.Name;
1042
else if (itemTypeMapping is StructMapping && itemTypeMapping.
TypeDesc
.IsRoot)
1118
if (existingMapping.
TypeDesc
== model.TypeDesc)
1163
if (mapping.
TypeDesc
== null)
1167
if (mapping.
TypeDesc
== null)
1177
mapping.TypeName = mapping.
TypeDesc
.DataType.Name;
1178
mapping.Namespace = mapping.
TypeDesc
.IsXsdType ? XmlSchema.Namespace : UrtTypes.Namespace;
1180
CheckContext(mapping.
TypeDesc
, context);
1816
if (element.Mapping.
TypeDesc
.Kind == TypeKind.Node)
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));
2228
bool isAny = mapping.
TypeDesc
.Kind == TypeKind.Node;
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSchemaExporter.cs (29)
258
if (!accessor.Mapping.IncludeInSchema && !accessor.Mapping.
TypeDesc
.IsRoot)
439
XmlSchemaSimpleType type = (XmlSchemaSimpleType)mapping.
TypeDesc
.DataType;
448
return new XmlQualifiedName(mapping.
TypeDesc
.DataType.Name, UrtTypes.Namespace);
453
switch (mapping.
TypeDesc
.Kind)
458
type.IsMixed = mapping.
TypeDesc
.IsMixed;
479
type.IsMixed = mapping.
TypeDesc
.IsMixed;
615
if (mapping.
TypeDesc
.IsXsdType)
617
qname = new XmlQualifiedName(mapping.
TypeDesc
.DataType.Name, XmlSchema.Namespace);
768
if (!accessor.HasDefault && !valueTypeOptional && accessor.Mapping.
TypeDesc
.IsValueType)
856
int minOccurs = repeats || accessor.HasDefault || (!accessor.IsNullable && !accessor.Mapping.
TypeDesc
.IsValueType) || valueTypeOptional ? 0 : 1;
936
return val != 0 ? XmlCustomFormatter.FromEnum(val, names, ids, mapping.
TypeDesc
.FullName) : null;
953
if (!pm.
TypeDesc
.HasCustomFormatter)
957
if (pm.
TypeDesc
.Type == null)
959
throw new InvalidOperationException(string.Format(ResXml.XmlInternalErrorDetails, "Mapping for " + pm.
TypeDesc
.Name + " missing type property"));
963
if (pm.
TypeDesc
.FormatterName == "String")
967
System.Reflection.MethodInfo format = formatter.GetMethod("ToString", new Type[] { pm.
TypeDesc
.Type });
973
string defaultValue = XmlCustomFormatter.FromDefaultValue(value, pm.
TypeDesc
.FormatterName);
975
throw new InvalidOperationException(string.Format(ResXml.XmlInvalidDefaultValue, value.ToString(), pm.
TypeDesc
.Name));
978
throw new InvalidOperationException(string.Format(ResXml.XmlInvalidDefaultValue, value.ToString(), pm.
TypeDesc
.Name));
987
if (mapping is StructMapping && mapping.
TypeDesc
.IsRoot)
1004
if (mapping.
TypeDesc
.IsRoot)
1012
throw new InvalidOperationException(string.Format(ResXml.XmlCircularReference2, mapping.
TypeDesc
.Name, "AnonymousType", "false"));
1018
if (!mapping.IncludeInSchema) throw new InvalidOperationException(string.Format(ResXml.XmlCannotIncludeInSchema, mapping.
TypeDesc
.Name));
1027
type.IsAbstract = mapping.
TypeDesc
.IsAbstract;
1033
throw new InvalidOperationException(string.Format(ResXml.XmlAnonymousBaseType, mapping.
TypeDesc
.Name, mapping.BaseMapping.
TypeDesc
.Name, "AnonymousType", "false"));
1139
throw new InvalidOperationException(string.Format(ResXml.XmlAnonymousBaseType, textMapping.
TypeDesc
.Name, pm.
TypeDesc
.Name, "AnonymousType", "false"));
1186
if (!mapping.IncludeInSchema) throw new InvalidOperationException(string.Format(ResXml.XmlCannotIncludeInSchema, mapping.
TypeDesc
.Name));
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSchemaImporter.cs (44)
82
mapping.TypeName = mapping.
TypeDesc
.DataType.Name;
152
accessor.IsNullable = typeMapping.
TypeDesc
.IsNullable;
262
member.TypeDesc = accessor.Mapping.
TypeDesc
;
413
if (!mapping.
TypeDesc
.IsMappedType)
469
mapping.TypeDesc = mapping.
TypeDesc
.CreateMappedTypeDesc(new MappedTypeDesc(typeName, qname.Name, qname.Namespace, type, context, typeOwner, mainNamespace, compileUnit.ReferencedAssemblies));
475
top.TypeDesc = mapping.
TypeDesc
;
611
baseTypeDesc = ((StructMapping)baseMapping).
TypeDesc
;
619
baseTypeDesc = baseMapping.
TypeDesc
;
696
throw new InvalidOperationException(string.Format(ResXml.XmlIllegalOverride, type.Name, baseMember.Name, baseMember.TypeDesc.FullName, structMapping.Members[i].TypeDesc.FullName, declaringMapping.
TypeDesc
.FullName));
887
string tdFullName = element.Mapping.
TypeDesc
.FullName;
924
typeDescs[i] = ((ElementAccessor)enumerator.Current).Mapping.
TypeDesc
;
959
choiceIdentifier.TypeDesc = member.ChoiceIdentifier.Mapping.
TypeDesc
.CreateArrayTypeDesc();
963
choiceIdentifier.TypeDesc = member.ChoiceIdentifier.Mapping.
TypeDesc
;
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
)
1224
if (!(mapping is PrimitiveMapping || mapping.
TypeDesc
.CanBeTextValue))
1245
member.TypeDesc = accessor.Mapping.
TypeDesc
.CreateArrayTypeDesc();
1254
member.TypeDesc = accessor.Mapping.
TypeDesc
.CreateArrayTypeDesc();
1259
member.TypeDesc = accessor.Mapping.
TypeDesc
;
1276
member.TypeDesc = ((TypeMapping)accessors[0].Mapping).
TypeDesc
;
1284
textMapping.TypeName = textMapping.
TypeDesc
.Name;
1285
member.TypeDesc = textMapping.
TypeDesc
;
1304
mapping.TypeName = mapping.
TypeDesc
.Name;
1356
if (arrayMapping.
TypeDesc
.IsNullable)
1399
arrayMapping.TypeName = (type.Name == null || type.Name.Length == 0) ? "ArrayOf" + CodeIdentifier.MakePascal(arrayMapping.
TypeDesc
.Name) : type.Name;
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;
1505
mapping.TypeName = mapping.
TypeDesc
.Name;
1507
mapping.TypeDesc = mapping.
TypeDesc
.CreateArrayTypeDesc();
1541
member.TypeDesc = accessor.Mapping.
TypeDesc
;
1545
member.TypeDesc = accessor.Mapping.
TypeDesc
;
1559
member.TypeDesc = accessor.Mapping.
TypeDesc
.CreateArrayTypeDesc();
1584
member.TypeDesc = accessor.IsList ? accessor.Mapping.
TypeDesc
.CreateArrayTypeDesc() : accessor.Mapping.
TypeDesc
;
1596
mapping.TypeName = mapping.
TypeDesc
.Name;
1608
member.TypeDesc = ((TypeMapping)accessor.Mapping).
TypeDesc
;
1657
xmlnsMapping.TypeName = xmlnsMapping.
TypeDesc
.Name;
1693
mapping.TypeName = mapping.
TypeDesc
.DataType.Name;
1728
if (mapping != null && !mapping.
TypeDesc
.IsMappedType)
1933
mapping.Namespace = mapping.
TypeDesc
.IsXsdType ? XmlSchema.Namespace : UrtTypes.Namespace;
1949
mapping.Namespace = mapping.
TypeDesc
.IsXsdType ? XmlSchema.Namespace : ns;
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSerializationGeneratedCode.cs (1)
216
return mapping.
TypeDesc
.CanBeElementValue;
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSerializationILGen.cs (3)
306
string serializerName = CodeIdentifier.MakeValid(Accessor.UnescapeName(mapping.Accessor.Mapping.
TypeDesc
.Name));
446
Type type = xmlMappings[i].Accessor.Mapping.
TypeDesc
.Type;
562
return mapping.
TypeDesc
.CanBeElementValue;
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSerializationWriter.cs (120)
1543
MethodNames.Add(mapping, NextMethodName(mapping.
TypeDesc
.Name));
1614
!typeMapping.
TypeDesc
.IsRoot)
1618
Writer.Write(RaCodeGen.GetStringForTypeof(typeMapping.
TypeDesc
.CSharpName, typeMapping.
TypeDesc
.UseReflection));
1680
if (methodName == null) throw new InvalidOperationException(string.Format(ResXml.XmlInternalErrorMethod, mapping.
TypeDesc
.Name) + Environment.StackTrace);
1719
TypeDesc typeDesc = mapping.
TypeDesc
;
1720
bool hasDefault = defaultValue != null && defaultValue != DBNull.Value && mapping.
TypeDesc
.HasDefaultSupport;
1731
if (mapping.
TypeDesc
.UseReflection)
1732
Writer.Write(RaCodeGen.GetStringForEnumLongValue(source, mapping.
TypeDesc
.UseReflection));
1746
Writer.Write(RaCodeGen.GetStringForEnumCompare((EnumMapping)mapping, values[i], mapping.
TypeDesc
.UseReflection));
1752
Writer.Write(RaCodeGen.GetStringForEnumCompare((EnumMapping)mapping, (string)defaultValue, mapping.
TypeDesc
.UseReflection));
2016
if (member.ChoiceIdentifier.Mapping.
TypeDesc
.UseReflection)
2107
if (!mapping.IsSoap && !mapping.
TypeDesc
.IsValueType && !mapping.
TypeDesc
.Type.GetTypeInfo().IsPrimitive)
2112
WriteMember("o", null, new ElementAccessor[] { element }, null, null, mapping.
TypeDesc
, !element.IsSoap);
2132
string fullTypeName = mapping.
TypeDesc
.CSharpName;
2138
WriteLocalDecl(fullTypeName, "v", "e", mapping.
TypeDesc
.UseReflection);
2145
Writer.Write(mapping.
TypeDesc
.UseReflection ? "object" : fullTypeName);
2155
if (mapping.
TypeDesc
.UseReflection)
2156
Writer.WriteLine("switch (" + RaCodeGen.GetStringForEnumLongValue("v", mapping.
TypeDesc
.UseReflection) + " ){");
2165
WriteEnumCase(fullTypeName, c, mapping.
TypeDesc
.UseReflection);
2177
Writer.Write(RaCodeGen.GetStringForEnumLongValue("v", mapping.
TypeDesc
.UseReflection));
2197
if (mapping.
TypeDesc
.UseReflection)
2209
WriteQuotedCSharpString(mapping.
TypeDesc
.FullName);
2215
Writer.Write(RaCodeGen.GetStringForEnumLongValue("v", mapping.
TypeDesc
.UseReflection));
2217
WriteQuotedCSharpString(mapping.
TypeDesc
.FullName);
2244
string fullTypeName = derived.
TypeDesc
.CSharpName;
2246
WriteTypeCompare("t", fullTypeName, derived.
TypeDesc
.UseReflection);
2254
if (methodName == null) throw new InvalidOperationException("deriaved from " + mapping.
TypeDesc
.FullName + ", " + string.Format(ResXml.XmlInternalErrorMethod, derived.
TypeDesc
.Name) + Environment.StackTrace);
2259
if (!derived.
TypeDesc
.UseReflection) Writer.Write("(" + fullTypeName + ")");
2261
if (derived.
TypeDesc
.IsNullable)
2282
string fullTypeName = mapping.
TypeDesc
.CSharpName;
2284
WriteTypeCompare("t", fullTypeName, mapping.
TypeDesc
.UseReflection);
2292
if (methodName == null) throw new InvalidOperationException(string.Format(ResXml.XmlInternalErrorMethod, mapping.
TypeDesc
.Name) + Environment.StackTrace);
2303
if (!mapping.
TypeDesc
.UseReflection) Writer.Write("(" + fullTypeName + ")");
2314
string fullTypeName = mapping.
TypeDesc
.CSharpName;
2316
if (mapping.
TypeDesc
.IsArray)
2317
WriteArrayTypeCompare("t", fullTypeName, mapping.
TypeDesc
.ArrayElementTypeDesc.CSharpName, mapping.
TypeDesc
.UseReflection);
2319
WriteTypeCompare("t", fullTypeName, mapping.
TypeDesc
.UseReflection);
2330
WriteMember("o", null, mapping.ElementsSortedByDerivation, null, null, mapping.
TypeDesc
, true);
2343
if (mapping.IsSoap && mapping.
TypeDesc
.IsRoot) return;
2350
string fullTypeName = mapping.
TypeDesc
.CSharpName;
2356
WriteLocalDecl(fullTypeName, "o", "s", mapping.
TypeDesc
.UseReflection);
2361
Writer.Write(mapping.
TypeDesc
.UseReflection ? "object" : fullTypeName);
2363
if (mapping.
TypeDesc
.IsNullable)
2367
if (mapping.
TypeDesc
.IsNullable)
2382
WriteTypeCompare("t", fullTypeName, mapping.
TypeDesc
.UseReflection);
2386
if (mapping.
TypeDesc
.IsRoot)
2391
if (mapping.
TypeDesc
.IsRoot)
2406
if (!mapping.
TypeDesc
.IsAbstract)
2408
if (mapping.
TypeDesc
.Type != null && typeof(XmlSchemaObject).IsAssignableFrom(mapping.
TypeDesc
.Type))
2420
xmlnsSource = RaCodeGen.GetStringForMember("o", member.Name, mapping.
TypeDesc
);
2421
if (mapping.
TypeDesc
.UseReflection)
2436
if (!mapping.
TypeDesc
.IsRoot)
2458
string methodInvoke = RaCodeGen.GetStringForMethodInvoke("o", fullTypeName, "ShouldSerialize" + m.Name, mapping.
TypeDesc
.UseReflection);
2459
if (mapping.
TypeDesc
.UseReflection) methodInvoke = "((" + typeof(bool).FullName + ")" + methodInvoke + ")";
2467
string memberGet = RaCodeGen.GetStringForMember("o", m.Name + "Specified", mapping.
TypeDesc
);
2468
if (mapping.
TypeDesc
.UseReflection) memberGet = "((" + typeof(bool).FullName + ")" + memberGet + ")";
2473
WriteMember(RaCodeGen.GetStringForMember("o", m.Name, mapping.
TypeDesc
), m.Attribute, m.TypeDesc, "o");
2499
string methodInvoke = RaCodeGen.GetStringForMethodInvoke("o", fullTypeName, "ShouldSerialize" + m.Name, mapping.
TypeDesc
.UseReflection);
2500
if (mapping.
TypeDesc
.UseReflection) methodInvoke = "((" + typeof(bool).FullName + ")" + methodInvoke + ")";
2508
string memberGet = RaCodeGen.GetStringForMember("o", m.Name + "Specified", mapping.
TypeDesc
);
2509
if (mapping.
TypeDesc
.UseReflection) memberGet = "((" + typeof(bool).FullName + ")" + memberGet + ")";
2519
choiceSource = RaCodeGen.GetStringForMember("o", m.ChoiceIdentifier.MemberName, mapping.
TypeDesc
);
2521
WriteMember(RaCodeGen.GetStringForMember("o", m.Name, mapping.
TypeDesc
), choiceSource, m.ElementsSortedByDerivation, m.Text, m.ChoiceIdentifier, m.TypeDesc, true);
2728
if (special.
TypeDesc
.Kind == TypeKind.Attribute || special.
TypeDesc
.CanBeAttributeValue)
2741
TypeDesc typeDesc = attribute.Mapping.
TypeDesc
;
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;
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;
3088
bool useReflection = text.Mapping.
TypeDesc
.UseReflection;
3089
string fullTypeName = text.Mapping.
TypeDesc
.CSharpName;
3150
WritePrimitiveValue(mapping.
TypeDesc
, source, false);
3157
switch (mapping.
TypeDesc
.Kind)
3179
string fullTypeName = element.Mapping.
TypeDesc
.BaseTypeDesc.CSharpName;
3181
if (!element.Mapping.
TypeDesc
.BaseTypeDesc.UseReflection)
3211
Writer.Write(RaCodeGen.GetStringForTypeof(mapping.
TypeDesc
.CSharpName, mapping.
TypeDesc
.UseReflection));
3223
TypeDesc td = mapping.
TypeDesc
.CreateArrayTypeDesc();
3229
WriteArrayLocalDecl(fullTypeName, elementArrayName, source, mapping.
TypeDesc
);
3236
if (mapping.
TypeDesc
.IsNullable)
3284
string fullTypeName = mapping.
TypeDesc
.CSharpName;
3287
WriteArrayLocalDecl(fullTypeName, arrayName, source, mapping.
TypeDesc
);
3294
if (mapping.
TypeDesc
.IsNullable)
3304
WriteArrayItems(mapping.ElementsSortedByDerivation, null, null, mapping.
TypeDesc
, arrayName, null);
3336
if (mapping.
TypeDesc
== QnameTypeDesc)
3341
string suffixRaw = mapping.
TypeDesc
.XmlEncodingNotRequired ? "Raw" : "";
3361
Writer.Write(RaCodeGen.GetStringForTypeof(mapping.
TypeDesc
.CSharpName, mapping.
TypeDesc
.UseReflection));
3376
if (methodName == null) throw new InvalidOperationException(string.Format(ResXml.XmlInternalErrorMethod, mapping.
TypeDesc
.Name) + Environment.StackTrace);
3390
if (mapping.
TypeDesc
.IsNullable)
3402
bool useReflection = mapping.
TypeDesc
.UseReflection;
3403
TypeDesc td = mapping.
TypeDesc
;
3700
throw new InvalidOperationException(string.Format(ResXml.XmlChoiceMissingAnyValue, choiceMapping.
TypeDesc
.FullName));
3703
throw new InvalidOperationException(string.Format(ResXml.XmlChoiceMissingValue, choiceMapping.
TypeDesc
.FullName, element.Namespace + ":" + element.Name, element.Name, element.Namespace));
3917
string typeFullName = mapping.
TypeDesc
.CSharpName;
4127
return mapping.
TypeDesc
.CSharpName + ".@" + memberName;
4129
string memberAccess = GetStringForEnumMember(mapping.
TypeDesc
.CSharpName, memberName, useReflection);
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSerializationWriterILGen.cs (96)
39
MethodNames.Add(mapping, NextMethodName(mapping.
TypeDesc
.Name));
108
source.Load(mapping.
TypeDesc
.Type);
109
argTypes.Add(mapping.
TypeDesc
.Type);
132
if (methodName == null) throw new InvalidOperationException(string.Format(ResXml.XmlInternalErrorMethod, mapping.
TypeDesc
.Name) + Environment.StackTrace);
141
new Type[] { mapping.
TypeDesc
.Type });
143
source.Load(mapping.
TypeDesc
.Type);
196
TypeDesc typeDesc = mapping.
TypeDesc
;
197
bool hasDefault = defaultValue != null && defaultValue != DBNull.Value && mapping.
TypeDesc
.HasDefaultSupport;
207
source.Load(mapping.
TypeDesc
.Type);
225
ilg.Ldc(Enum.Parse(mapping.
TypeDesc
.Type, enumDefaultValue, false));
588
if (!mapping.
TypeDesc
.IsValueType && !mapping.
TypeDesc
.Type.GetTypeInfo().IsPrimitive)
601
WriteMember(new SourceInfo("o", "o", null, typeof(object), ilg), null, new ElementAccessor[] { element }, null, null, mapping.
TypeDesc
, true);
617
argTypes.Add(mapping.
TypeDesc
.Type);
639
LocalBuilder localTmp = ilg.DeclareLocal(mapping.
TypeDesc
.Type, "localTmp");
649
ilg.Ldc(Enum.ToObject(mapping.
TypeDesc
.Type, c.Value));
695
ilg.Ldstr(mapping.
TypeDesc
.FullName);
743
ilg.ConvertValue(mapping.
TypeDesc
.Type, typeof(Int64));
750
ilg.Ldstr(mapping.
TypeDesc
.FullName);
765
WriteTypeCompare("t", derived.
TypeDesc
.Type);
772
if (methodName == null) throw new InvalidOperationException("deriaved from " + mapping.
TypeDesc
.FullName + ", " + string.Format(ResXml.XmlInternalErrorMethod, derived.
TypeDesc
.Name) + Environment.StackTrace);
784
ilg.ConvertValue(oType, derived.
TypeDesc
.Type);
785
argTypes.Add(derived.
TypeDesc
.Type);
786
if (derived.
TypeDesc
.IsNullable)
815
WriteTypeCompare("t", mapping.
TypeDesc
.Type);
823
if (methodName == null) throw new InvalidOperationException(string.Format(ResXml.XmlInternalErrorMethod, mapping.
TypeDesc
.Name) + Environment.StackTrace);
859
new Type[] { mapping.
TypeDesc
.Type }
873
ilg.ConvertValue(ilg.GetVariableType(oVar), mapping.
TypeDesc
.Type);
893
if (mapping.
TypeDesc
.IsArray)
894
WriteArrayTypeCompare("t", mapping.
TypeDesc
.Type);
896
WriteTypeCompare("t", mapping.
TypeDesc
.Type);
932
WriteMember(new SourceInfo("o", "o", null, null, ilg), null, mapping.ElementsSortedByDerivation, null, null, mapping.
TypeDesc
, true);
962
argTypes.Add(mapping.
TypeDesc
.Type);
964
if (mapping.
TypeDesc
.IsNullable)
976
if (mapping.
TypeDesc
.IsNullable)
1014
WriteTypeCompare("t", mapping.
TypeDesc
.Type);
1018
if (mapping.
TypeDesc
.IsRoot)
1021
if (mapping.
TypeDesc
.IsRoot)
1056
if (!mapping.
TypeDesc
.IsAbstract)
1058
if (mapping.
TypeDesc
.Type != null && typeof(XmlSchemaObject).IsAssignableFrom(mapping.
TypeDesc
.Type))
1079
xmlnsSource = RaCodeGen.GetStringForMember("o", member.Name, mapping.
TypeDesc
);
1105
if (!mapping.
TypeDesc
.IsRoot)
1137
string memberGet = RaCodeGen.GetStringForMember("o", m.Name + "Specified", mapping.
TypeDesc
);
1141
WriteMember(RaCodeGen.GetSourceForMember("o", m, mapping.
TypeDesc
, ilg), m.Attribute, m.TypeDesc, "o");
1170
string memberGet = RaCodeGen.GetStringForMember("o", m.Name + "Specified", mapping.
TypeDesc
);
1179
choiceSource = RaCodeGen.GetStringForMember("o", m.ChoiceIdentifier.MemberName, mapping.
TypeDesc
);
1182
WriteMember(RaCodeGen.GetSourceForMember("o", m, m.MemberInfo, mapping.
TypeDesc
, ilg), choiceSource, m.ElementsSortedByDerivation, m.Text, m.ChoiceIdentifier, m.TypeDesc, true);
1442
if (special.
TypeDesc
.Kind == TypeKind.Attribute || special.
TypeDesc
.CanBeAttributeValue)
1463
TypeDesc typeDesc = attribute.Mapping.
TypeDesc
;
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;
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
;
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
);
1966
WritePrimitiveValue(mapping.
TypeDesc
, source, out argType);
1980
switch (mapping.
TypeDesc
.Kind)
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);
2055
string fullTypeName = mapping.
TypeDesc
.CSharpName;
2056
WriteArrayLocalDecl(fullTypeName, arrayName, source, mapping.
TypeDesc
);
2063
if (mapping.
TypeDesc
.IsNullable)
2071
WriteArrayItems(mapping.ElementsSortedByDerivation, null, null, mapping.
TypeDesc
, arrayName, null);
2079
if (mapping.
TypeDesc
.IsNullable)
2094
if (mapping.
TypeDesc
== QnameTypeDesc)
2098
string suffixRaw = mapping.
TypeDesc
.XmlEncodingNotRequired ? "Raw" : "";
2111
if (methodName == null) throw new InvalidOperationException(string.Format(ResXml.XmlInternalErrorMethod, mapping.
TypeDesc
.Name) + Environment.StackTrace);
2119
source.Load(mapping.
TypeDesc
.Type);
2120
argTypes.Add(mapping.
TypeDesc
.Type);
2121
if (mapping.
TypeDesc
.IsNullable)
2138
TypeDesc td = mapping.
TypeDesc
;
2388
eValue = Enum.ToObject(choiceMapping.
TypeDesc
.Type, choiceMapping.Constants[i].Value);
2402
eValue = Enum.ToObject(choiceMapping.
TypeDesc
.Type, choiceMapping.Constants[i].Value);
2412
throw new InvalidOperationException(string.Format(ResXml.XmlChoiceMissingAnyValue, choiceMapping.
TypeDesc
.FullName));
2415
throw new InvalidOperationException(string.Format(ResXml.XmlChoiceMissingValue, choiceMapping.
TypeDesc
.FullName, element.Namespace + ":" + element.Name, element.Name, element.Namespace));
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlTypeMapping.cs (2)
31
get { return Mapping.
TypeDesc
.Name; }
40
get { return Mapping.
TypeDesc
.FullName; }