31 writes to TypeDesc
System.Xml (31)
System\Xml\Serialization\SoapReflectionImporter.cs (1)
635
accessor.
TypeDesc
= typeScope.GetTypeDesc(accessorType);
System\Xml\Serialization\SoapSchemaImporter.cs (2)
504
member.
TypeDesc
= ((TypeMapping)accessor.Mapping).TypeDesc;
507
member.
TypeDesc
= member.TypeDesc.CreateArrayTypeDesc();
System\Xml\Serialization\XmlReflectionImporter.cs (2)
1331
accessor.
TypeDesc
= typeScope.GetTypeDesc(accessorType);
1346
accessor.
TypeDesc
= typeScope.GetArrayTypeDesc(accessorType);
System\Xml\Serialization\XmlSchemaImporter.cs (20)
240
member.
TypeDesc
= accessor.Mapping.TypeDesc;
797
member.
TypeDesc
= Scope.GetTypeDesc(typeof(object));
808
member.
TypeDesc
= TypeDesc.FindCommonBaseTypeDesc(typeDescs);
809
if (member.TypeDesc == null) member.
TypeDesc
= Scope.GetTypeDesc(typeof(object));
813
member.
TypeDesc
= member.TypeDesc.CreateArrayTypeDesc();
836
choiceIdentifier.
TypeDesc
= member.ChoiceIdentifier.Mapping.TypeDesc.CreateArrayTypeDesc();
839
choiceIdentifier.
TypeDesc
= member.ChoiceIdentifier.Mapping.TypeDesc;
1075
member.
TypeDesc
= accessor.Mapping.TypeDesc.CreateArrayTypeDesc();
1082
member.
TypeDesc
= accessor.Mapping.TypeDesc.CreateArrayTypeDesc();
1086
member.
TypeDesc
= accessor.Mapping.TypeDesc;
1102
member.
TypeDesc
= ((TypeMapping)accessors[0].Mapping).TypeDesc;
1110
member.
TypeDesc
= textMapping.TypeDesc;
1119
member.
TypeDesc
= member.TypeDesc.CreateArrayTypeDesc();
1345
member.
TypeDesc
= accessor.Mapping.TypeDesc;
1348
member.
TypeDesc
= accessor.Mapping.TypeDesc;
1360
member.
TypeDesc
= accessor.Mapping.TypeDesc.CreateArrayTypeDesc();
1382
member.
TypeDesc
= accessor.IsList ? accessor.Mapping.TypeDesc.CreateArrayTypeDesc() : accessor.Mapping.TypeDesc;
1404
member.
TypeDesc
= ((TypeMapping)accessor.Mapping).TypeDesc;
1405
member.
TypeDesc
= member.TypeDesc.CreateArrayTypeDesc();
1457
member.
TypeDesc
= xmlnsTypeDesc;
System\Xml\Serialization\XmlSerializationReader.cs (3)
2626
member.
TypeDesc
= mapping.TypeDesc;
2925
memberMapping.
TypeDesc
= mapping.TypeDesc;
4194
memberMapping.
TypeDesc
= arrayMapping.TypeDesc;
System\Xml\Serialization\XmlSerializationReaderILGen.cs (3)
658
member.
TypeDesc
= mapping.TypeDesc;
1278
memberMapping.
TypeDesc
= mapping.TypeDesc;
2878
memberMapping.
TypeDesc
= arrayMapping.TypeDesc;
163 references to TypeDesc
System.Xml (163)
System\Xml\Serialization\Mappings.cs (6)
511
if (members[i].
TypeDesc
!= member.
TypeDesc
)
512
throw new InvalidOperationException(Res.GetString(Res.XmlHiddenMember, parent, member.Name, member.
TypeDesc
.FullName, this.TypeName, members[i].Name, members[i].
TypeDesc
.FullName));
883
return GetNullableType(
TypeDesc
);
885
return
TypeDesc
.FullName;
System\Xml\Serialization\SoapReflectionImporter.cs (9)
384
if (!member.
TypeDesc
.IsPrimitive && !member.
TypeDesc
.IsEnum && !member.
TypeDesc
.IsOptionalValue) {
387
if (member.
TypeDesc
.IsValueType)
388
throw new NotSupportedException(Res.GetString(Res.XmlRpcNestedValueType, member.
TypeDesc
.FullName));
636
if (accessor.
TypeDesc
.IsVoid) {
642
if (!accessor.
TypeDesc
.IsPrimitive && !accessor.
TypeDesc
.IsEnum)
643
throw new InvalidOperationException(Res.GetString(Res.XmlIllegalSoapAttribute, accessorName, accessor.
TypeDesc
.FullName));
System\Xml\Serialization\SoapSchemaExporter.cs (1)
325
bool valueTypeOptional = member.CheckSpecified != SpecifiedAccessor.None || member.CheckShouldPersist || !member.
TypeDesc
.IsValueType;
System\Xml\Serialization\SoapSchemaImporter.cs (3)
507
member.TypeDesc = member.
TypeDesc
.CreateArrayTypeDesc();
509
if (element.MinOccurs == 0 && member.
TypeDesc
.IsValueType && !member.
TypeDesc
.HasIsEmpty) {
System\Xml\Serialization\Types.cs (1)
966
if (propertyInfo != null && !CanWriteProperty(propertyInfo, memberMapping.
TypeDesc
)) {
System\Xml\Serialization\XmlCodeExporter.cs (14)
625
bool sameType = mapping.TypeDesc == member.
TypeDesc
||
626
(member.
TypeDesc
.IsArrayLike && mapping.TypeDesc == member.
TypeDesc
.ArrayElementTypeDesc);
637
AddDefaultValueAttribute(field, metadata, attribute.Default, mapping, comments, member.
TypeDesc
, attribute, ctor);
643
bool sameType = mapping.TypeDesc == member.
TypeDesc
||
644
(member.
TypeDesc
.IsArrayLike && mapping.TypeDesc == member.
TypeDesc
.ArrayElementTypeDesc);
659
bool sameType = mapping.TypeDesc == member.
TypeDesc
;
668
ExportArrayElements(metadata, array, element.Namespace, member.
TypeDesc
.ArrayElementTypeDesc, 0);
671
bool sameType = mapping.TypeDesc == member.
TypeDesc
||
672
(member.
TypeDesc
.IsArrayLike && mapping.TypeDesc == member.
TypeDesc
.ArrayElementTypeDesc);
673
if (member.
TypeDesc
.IsArrayLike)
677
AddDefaultValueAttribute(field, metadata, element.Default, mapping, comments, member.
TypeDesc
, element, ctor);
System\Xml\Serialization\XmlMemberMapping.cs (1)
90
get { return mapping.
TypeDesc
.FullName; }
System\Xml\Serialization\XmlMembersMapping.cs (2)
27
if (mapping.Members[i].
TypeDesc
.Type != null) {
28
key.Append(GenerateKey(mapping.Members[i].
TypeDesc
.Type, null, null));
System\Xml\Serialization\XmlReflectionImporter.cs (23)
1356
if (accessor.
TypeDesc
.IsArrayLike) {
1363
if (a.XmlAttribute != null && !accessor.
TypeDesc
.ArrayElementTypeDesc.IsPrimitive && !accessor.
TypeDesc
.ArrayElementTypeDesc.IsEnum) {
1365
if (accessor.
TypeDesc
.ArrayElementTypeDesc.Kind == TypeKind.Serializable) {
1366
throw new InvalidOperationException(Res.GetString(Res.XmlIllegalAttrOrTextInterface, accessorName, accessor.
TypeDesc
.ArrayElementTypeDesc.FullName, typeof(IXmlSerializable).Name));
1369
throw new InvalidOperationException(Res.GetString(Res.XmlIllegalAttrOrText, accessorName, accessor.
TypeDesc
.ArrayElementTypeDesc.FullName));
1373
bool isList = a.XmlAttribute != null && (accessor.
TypeDesc
.ArrayElementTypeDesc.IsPrimitive || accessor.
TypeDesc
.ArrayElementTypeDesc.IsEnum);
1418
a.XmlElements.Add(CreateElementAttribute(accessor.
TypeDesc
));
1507
a.XmlArray = CreateArrayAttribute(accessor.
TypeDesc
);
1520
CheckNullable(arrayElement.IsNullable, accessor.
TypeDesc
, arrayElement.Mapping);
1532
else if (!accessor.
TypeDesc
.IsVoid) {
1537
if (accessor.
TypeDesc
.IsPrimitive || accessor.
TypeDesc
.IsEnum) {
1538
if (a.XmlAnyElements.Count > 0) throw new InvalidOperationException(Res.GetString(Res.XmlIllegalAnyElement, accessor.
TypeDesc
.FullName));
1572
a.XmlElements.Add(CreateElementAttribute(accessor.
TypeDesc
));
1578
if (typeScope.GetTypeDesc(xmlElement.Type) != accessor.
TypeDesc
)
1596
CheckNullable(element.IsNullable, accessor.
TypeDesc
, element.Mapping);
1623
if (accessor.
TypeDesc
.Kind == TypeKind.Serializable) {
1624
throw new InvalidOperationException(Res.GetString(Res.XmlIllegalAttrOrTextInterface, accessorName, accessor.
TypeDesc
.FullName, typeof(IXmlSerializable).Name));
1627
throw new InvalidOperationException(Res.GetString(Res.XmlIllegalAttrOrText, accessorName, accessor.
TypeDesc
));
1631
a.XmlElements.Add(CreateElementAttribute(accessor.
TypeDesc
));
1720
if (accessor.
TypeDesc
.IsArrayLike && accessor.Elements.Length > 0 && !(accessor.Elements[0].Mapping is ArrayMapping))
System\Xml\Serialization\XmlSchemaExporter.cs (7)
99
if (member.
TypeDesc
.IsArrayLike && !(member.Elements[0].Mapping is ArrayMapping))
176
bool isUnbounded = member.Mapping.
TypeDesc
.IsArrayLike;
177
bool isMixed = isUnbounded && member.Mapping.
TypeDesc
.ArrayElementTypeDesc != null ? member.Mapping.
TypeDesc
.ArrayElementTypeDesc.IsMixed : member.Mapping.
TypeDesc
.IsMixed;
179
if (isMixed && member.Mapping.
TypeDesc
.IsMixed)
937
bool repeats = member.
TypeDesc
.IsArrayLike &&
System\Xml\Serialization\XmlSchemaImporter.cs (13)
609
if (baseMember != null && baseMember.
TypeDesc
!= structMapping.Members[i].
TypeDesc
)
610
throw new InvalidOperationException(Res.GetString(Res.XmlIllegalOverride, type.Name, baseMember.Name, baseMember.
TypeDesc
.FullName, structMapping.Members[i].
TypeDesc
.FullName, declaringMapping.TypeDesc.FullName));
809
if (member.
TypeDesc
== null) member.TypeDesc = Scope.GetTypeDesc(typeof(object));
813
member.TypeDesc = member.
TypeDesc
.CreateArrayTypeDesc();
1119
member.TypeDesc = member.
TypeDesc
.CreateArrayTypeDesc();
1212
arrayMapping.TypeDesc = choiceMember.
TypeDesc
;
1363
if (element.MinOccurs == 0 && member.
TypeDesc
.IsValueType && !element.HasDefault && !member.
TypeDesc
.HasIsEmpty) {
1384
if ((attribute.Use == XmlSchemaUse.Optional || attribute.Use == XmlSchemaUse.None) && member.
TypeDesc
.IsValueType && !attribute.HasDefault && !member.
TypeDesc
.HasIsEmpty) {
1405
member.TypeDesc = member.
TypeDesc
.CreateArrayTypeDesc();
System\Xml\Serialization\XmlSerializationReader.cs (31)
2024
if (mapping.
TypeDesc
.IsArrayLike) {
2028
this.arraySource = outerClass.GetArraySource(mapping.
TypeDesc
, this.arrayName, multiRef);
2029
isArray = mapping.
TypeDesc
.IsArray;
2032
this.choiceArraySource = outerClass.GetArraySource(mapping.
TypeDesc
, this.choiceArrayName, multiRef);
2367
arraySource = "((" + mapping.
TypeDesc
.CSharpName + ")" + source + ")";
2405
else if (mapping.
TypeDesc
.IsArrayLike && !(mapping.Elements.Length == 1 && mapping.Elements[0].Mapping is ArrayMapping)) {
2410
if (mapping.
TypeDesc
.IsArrayLike && !mapping.
TypeDesc
.IsArray)
2471
if (!mappings[i].
TypeDesc
.IsValueType)
2478
if (mappings[i].
TypeDesc
.IsOptionalValue && mappings[i].
TypeDesc
.BaseTypeDesc.UseReflection) {
2482
Writer.Write(RaCodeGen.GetStringForCreateInstance(mappings[i].
TypeDesc
.CSharpName, mappings[i].
TypeDesc
.UseReflection, false, false));
2526
arraySource = "((" + mapping.
TypeDesc
.CSharpName + ")" + source + ")";
3103
member.IsNullable = mapping.
TypeDesc
.IsNullable;
3133
if (mapping.
TypeDesc
.IsArrayLike) {
3135
if (mapping.
TypeDesc
.IsArrayLike && !(mapping.Elements.Length == 1 && mapping.Elements[0].Mapping is ArrayMapping)) {
3141
else if (!mapping.
TypeDesc
.IsArray) {
3285
TypeDesc td = member.Mapping.
TypeDesc
;
3293
WriteSourceBeginTyped(memberSource, member.Mapping.
TypeDesc
);
3308
WriteCatchCastException(member.Mapping.
TypeDesc
, targetSource, "ids[" + fixupIndex + "]");
3486
Writer.Write(xmlnsMember.Mapping.
TypeDesc
.CSharpName);
3490
Writer.Write("(("+xmlnsMember.Mapping.
TypeDesc
.CSharpName+")"+ xmlnsMember.ArraySource+")");
3574
string attributeSource = GetArraySource(member.Mapping.
TypeDesc
, member.ArrayName);
3640
TypeDesc typeDesc = member.Mapping.
TypeDesc
;
3643
if (member.Mapping.
TypeDesc
.IsArray) {
3672
if (member.IsList && !member.Mapping.ReadOnly && member.Mapping.
TypeDesc
.IsNullable) {
3677
if (!member.Mapping.
TypeDesc
.HasDefaultConstructor) {
3679
WriteQuotedCSharpString(member.Mapping.
TypeDesc
.CSharpName);
3982
WriteElement(member.ArraySource, member.ArrayName, member.ChoiceArraySource, e, choice, member.Mapping.CheckSpecified == SpecifiedAccessor.ReadWrite ? member.CheckSpecifiedSource : null, member.IsList && member.Mapping.
TypeDesc
.IsNullable, member.Mapping.ReadOnly, member.FixupIndex, j);
4069
TypeDesc typeDesc = member.Mapping.
TypeDesc
;
System\Xml\Serialization\XmlSerializationReaderILGen.cs (40)
92
if (mapping.
TypeDesc
.IsArrayLike) {
96
this.arraySource = outerClass.GetArraySource(mapping.
TypeDesc
, this.arrayName, multiRef);
97
isArray = mapping.
TypeDesc
.IsArray;
100
this.choiceArraySource = outerClass.GetArraySource(mapping.
TypeDesc
, this.choiceArrayName, multiRef);
458
arraySource = "((" + mapping.
TypeDesc
.CSharpName + ")" + source + ")";
496
else if (mapping.
TypeDesc
.IsArrayLike && !(mapping.Elements.Length == 1 && mapping.Elements[0].Mapping is ArrayMapping)) {
501
if (mapping.
TypeDesc
.IsArrayLike && !mapping.
TypeDesc
.IsArray)
631
if (!mappings[i].
TypeDesc
.IsValueType)
636
RaCodeGen.ILGenForCreateInstance(ilg, mappings[i].
TypeDesc
.Type, false, false);
637
ilg.ConvertValue(mappings[i].
TypeDesc
.Type, typeof(object));
1577
member.IsNullable = mapping.
TypeDesc
.IsNullable;
1607
if (mapping.
TypeDesc
.IsArrayLike) {
1609
if (mapping.
TypeDesc
.IsArrayLike && !(mapping.Elements.Length == 1 && mapping.Elements[0].Mapping is ArrayMapping)) {
1615
else if (!mapping.
TypeDesc
.IsArray) {
1946
ConstructorInfo ctor = xmlnsMember.Mapping.
TypeDesc
.Type.GetConstructor(
1953
WriteSourceEnd(xmlnsMember.Source, xmlnsMember.Mapping.
TypeDesc
.Type);
1958
MethodInfo Add = xmlnsMember.Mapping.
TypeDesc
.Type.GetMethod(
1972
ILGenLoad(xmlnsMember.ArraySource, xmlnsMember.Mapping.
TypeDesc
.Type);
2101
WriteSourceEnd(member.ArraySource, member.Mapping.
TypeDesc
.IsArrayLike ? member.Mapping.
TypeDesc
.ArrayElementTypeDesc.Type : member.Mapping.
TypeDesc
.Type);
2117
WriteSourceEnd(member.ArraySource, member.Mapping.
TypeDesc
.IsArrayLike ? member.Mapping.
TypeDesc
.ArrayElementTypeDesc.Type : member.Mapping.
TypeDesc
.Type);
2159
string attributeSource = GetArraySource(member.Mapping.
TypeDesc
, member.ArrayName);
2163
WriteSourceEnd(attributeSource, member.Mapping.
TypeDesc
.ArrayElementTypeDesc.Type);
2169
WriteSourceEnd(member.ArraySource, member.Mapping.
TypeDesc
.IsArrayLike ? member.Mapping.
TypeDesc
.ArrayElementTypeDesc.Type : member.Mapping.
TypeDesc
.Type);
2189
TypeDesc typeDesc = member.Mapping.
TypeDesc
;
2191
if (member.Mapping.
TypeDesc
.IsArray) {
2214
if (member.IsList && !member.Mapping.ReadOnly && member.Mapping.
TypeDesc
.IsNullable) {
2219
if (!member.Mapping.
TypeDesc
.HasDefaultConstructor) {
2228
ilg.Ldstr(member.Mapping.
TypeDesc
.CSharpName);
2234
RaCodeGen.ILGenForCreateInstance(ilg, member.Mapping.
TypeDesc
.Type, typeDesc.CannotNew, true);
2235
WriteSourceEnd(member.Source, member.Mapping.
TypeDesc
.Type);
2239
WriteLocalDecl(a, new SourceInfo(member.Source, member.Source, member.Mapping.MemberInfo, member.Mapping.
TypeDesc
.Type, ilg));
2578
WriteElement(member.ArraySource, member.ArrayName, member.ChoiceArraySource, e, choice, member.Mapping.CheckSpecified == SpecifiedAccessor.ReadWrite ? member.CheckSpecifiedSource : null, member.IsList && member.Mapping.
TypeDesc
.IsNullable, member.Mapping.ReadOnly, member.FixupIndex, j);
2659
TypeDesc typeDesc = member.Mapping.
TypeDesc
;
System\Xml\Serialization\XmlSerializationWriter.cs (6)
1677
WriteMember(source, member.Attribute, member.
TypeDesc
, "p");
1733
enumSource = "((" + mapping.Members[j].
TypeDesc
.CSharpName + ")p[" + j.ToString(CultureInfo.InvariantCulture) + "]" + ")";
1754
WriteMember(source, enumSource, member.ElementsSortedByDerivation, member.Text, member.ChoiceIdentifier, member.
TypeDesc
, writeAccessors || hasWrapperElement);
2097
xmlnsSource = "(("+member.
TypeDesc
.CSharpName+")"+xmlnsSource+")";
2140
WriteMember(RaCodeGen.GetStringForMember("o", m.Name, mapping.TypeDesc), m.Attribute, m.
TypeDesc
, "o");
2182
WriteMember(RaCodeGen.GetStringForMember("o", m.Name, mapping.TypeDesc), choiceSource, m.ElementsSortedByDerivation, m.Text, m.ChoiceIdentifier, m.
TypeDesc
, true);
System\Xml\Serialization\XmlSerializationWriterILGen.cs (6)
416
WriteMember(source, member.Attribute, member.
TypeDesc
, "p");
471
enumSource = "((" + mapping.Members[j].
TypeDesc
.CSharpName + ")p[" + j.ToString(CultureInfo.InvariantCulture) + "]" + ")";
484
WriteMember(new SourceInfo(source, source, null, null, ilg), enumSource, member.ElementsSortedByDerivation, member.Text, member.ChoiceIdentifier, member.
TypeDesc
, writeAccessors || hasWrapperElement);
1051
WriteMember(RaCodeGen.GetSourceForMember("o", m, mapping.TypeDesc, ilg), m.Attribute, m.
TypeDesc
, "o");
1086
WriteMember(RaCodeGen.GetSourceForMember("o", m, m.MemberInfo, mapping.TypeDesc, ilg), choiceSource, m.ElementsSortedByDerivation, m.Text, m.ChoiceIdentifier, m.
TypeDesc
, true);
2259
return new SourceInfo(GetStringForMember(obj, member.Name, typeDesc), obj, memberInfo, member.
TypeDesc
.Type, ilg);