93 references to UseReflection
System.Private.Xml (93)
System\Xml\Serialization\ReflectionXmlSerializationReader.cs (1)
297
if (mappings[i].TypeDesc!.IsOptionalValue && mappings[i].TypeDesc!.BaseTypeDesc!.
UseReflection
)
System\Xml\Serialization\ReflectionXmlSerializationWriter.cs (1)
227
bool enumUseReflection = choice.Mapping!.TypeDesc!.
UseReflection
;
System\Xml\Serialization\XmlSerializationReader.cs (31)
2157
bool choiceUseReflection = mapping.ChoiceIdentifier.Mapping!.TypeDesc!.
UseReflection
;
2433
Writer.Write(RaCodeGen.GetStringForTypeof(mapping.TypeDesc.CSharpName, mapping.TypeDesc.
UseReflection
));
2664
if (mappings[i].TypeDesc!.IsOptionalValue && mappings[i].TypeDesc!.BaseTypeDesc!.
UseReflection
)
2670
Writer.Write(RaCodeGen.GetStringForCreateInstance(mappings[i].TypeDesc!.CSharpName, mappings[i].TypeDesc!.
UseReflection
, false, false));
2778
bool useReflection = td.
UseReflection
;
2780
bool arrayElementUseReflection = td.ArrayElementTypeDesc == null ? false : td.ArrayElementTypeDesc.
UseReflection
;
2961
if (!mapping.TypeDesc!.
UseReflection
)
3005
bool useReflection = mapping.TypeDesc!.
UseReflection
;
3100
if (derived.TypeDesc!.
UseReflection
&& isTypedReturn)
3158
if (td.
UseReflection
)
3170
Writer.Write(RaCodeGen.GetStringForCreateInstance(fullTypeName, td.
UseReflection
, false, false));
3189
bool useReflection = nullableMapping.BaseMapping!.TypeDesc!.
UseReflection
;
3243
bool useReflection = structMapping.TypeDesc!.
UseReflection
;
3518
if (anyFixups) WriteFixupMethod(fixupMethodName, members, structMapping.TypeDesc.CSharpName, structMapping.TypeDesc.
UseReflection
, true, "o");
3611
Writer.Write(RaCodeGen.GetStringForCreateInstance(typeDesc.CSharpName, typeDesc.
UseReflection
, typeDesc.CannotNew, true));
3642
bool useReflection = td.
UseReflection
;
3957
bool useReflection = typeDesc.
UseReflection
;
4275
Writer.Write(RaCodeGen.GetStringForTypeof(td.CSharpName, td.
UseReflection
));
4279
Writer.Write(RaCodeGen.GetStringForTypeof(e.Mapping!.TypeDesc!.CSharpName, e.Mapping.TypeDesc.
UseReflection
));
4315
Writer.Write(RaCodeGen.GetStringForCreateInstance(e.Mapping.TypeDesc.CSharpName, e.Mapping.TypeDesc.
UseReflection
, false, true, $"({td.CSharpName}){checkTypeSource}"));
4417
bool useReflection = typeDesc.
UseReflection
;
4421
bool arrayUseReflection = typeDesc.ArrayElementTypeDesc.
UseReflection
;
4464
bool arrayUseReflection = typeDesc.ArrayElementTypeDesc!.
UseReflection
;
4486
bool choiceUseReflection = member.Mapping.ChoiceIdentifier.Mapping!.TypeDesc!.
UseReflection
;
4517
if (typeDesc != null && !typeDesc.
UseReflection
)
4678
Writer.Write(RaCodeGen.GetStringForCreateInstance(element.Mapping.TypeDesc.CSharpName, element.Mapping.TypeDesc.
UseReflection
, false, false));
4877
Writer.Write(RaCodeGen.GetStringForCreateInstance(sm.TypeDesc!.CSharpName, sm.TypeDesc.
UseReflection
, sm.TypeDesc.CannotNew, false));
4914
Writer.Write(RaCodeGen.GetStringForEnumMember(enumTypeName, choice.MemberIds[elementIndex], choice.Mapping.TypeDesc.
UseReflection
));
4940
Writer.Write(RaCodeGen.GetStringForCreateInstance(derived.TypeDesc!.CSharpName, derived.TypeDesc.
UseReflection
, derived.TypeDesc.CannotNew, false));
5089
bool useReflection = mapping.TypeDesc.
UseReflection
;
5140
Writer.Write(RaCodeGen.GetStringForTypeof(typeDesc.CSharpName, typeDesc.
UseReflection
));
System\Xml\Serialization\XmlSerializationWriter.cs (60)
1660
if (typeDesc.
UseReflection
)
1678
if (elementTypeDesc.
UseReflection
)
1718
if (elementTypeDesc.
UseReflection
)
1782
bool elementUseReflection = typeDesc.ArrayElementTypeDesc.
UseReflection
;
1785
WriteDefaultIndexerInit(type, typeFullName, typeDesc.
UseReflection
, elementUseReflection);
1978
if (!typeDesc.
UseReflection
)
1989
if (typeDesc != null && !typeDesc.
UseReflection
)
2024
if (!arrayTypeDesc.
UseReflection
)
2138
if (arrayTypeDesc.
UseReflection
)
2391
Writer.Write(RaCodeGen.GetStringForTypeof(typeMapping.TypeDesc.CSharpName, typeMapping.TypeDesc.
UseReflection
));
2507
if (mapping.TypeDesc!.
UseReflection
)
2508
Writer.Write(ReflectionAwareCodeGen.GetStringForEnumLongValue(source, mapping.TypeDesc.
UseReflection
));
2522
Writer.Write(RaCodeGen.GetStringForEnumCompare((EnumMapping)mapping, values[i], mapping.TypeDesc.
UseReflection
));
2528
Writer.Write(RaCodeGen.GetStringForEnumCompare((EnumMapping)mapping, (string)defaultValue!, mapping.TypeDesc.
UseReflection
));
2796
if (member.ChoiceIdentifier.Mapping!.TypeDesc!.
UseReflection
)
2918
WriteLocalDecl(fullTypeName, "v", "e", mapping.TypeDesc.
UseReflection
);
2925
Writer.Write(mapping.TypeDesc.
UseReflection
? "object" : fullTypeName);
2935
if (mapping.TypeDesc.
UseReflection
)
2936
Writer.WriteLine($"switch ({ReflectionAwareCodeGen.GetStringForEnumLongValue("v", mapping.TypeDesc.
UseReflection
)} ){{");
2945
WriteEnumCase(fullTypeName, c, mapping.TypeDesc.
UseReflection
);
2957
Writer.Write(ReflectionAwareCodeGen.GetStringForEnumLongValue("v", mapping.TypeDesc.
UseReflection
));
2977
if (mapping.TypeDesc.
UseReflection
)
2995
Writer.Write(ReflectionAwareCodeGen.GetStringForEnumLongValue("v", mapping.TypeDesc.
UseReflection
));
3026
WriteTypeCompare("t", fullTypeName, derived.TypeDesc.
UseReflection
);
3039
if (!derived.TypeDesc.
UseReflection
) Writer.Write($"({fullTypeName})");
3065
WriteTypeCompare("t", fullTypeName, mapping.TypeDesc.
UseReflection
);
3084
if (!mapping.TypeDesc.
UseReflection
) Writer.Write($"({fullTypeName})");
3098
WriteArrayTypeCompare("t", fullTypeName, mapping.TypeDesc.ArrayElementTypeDesc!.CSharpName, mapping.TypeDesc.
UseReflection
);
3100
WriteTypeCompare("t", fullTypeName, mapping.TypeDesc.
UseReflection
);
3138
WriteLocalDecl(fullTypeName, "o", "s", mapping.TypeDesc.
UseReflection
);
3143
Writer.Write(mapping.TypeDesc.
UseReflection
? "object" : fullTypeName);
3164
WriteTypeCompare("t", fullTypeName, mapping.TypeDesc.
UseReflection
);
3203
if (mapping.TypeDesc.
UseReflection
)
3240
string methodInvoke = RaCodeGen.GetStringForMethodInvoke("o", fullTypeName, $"ShouldSerialize{m.Name}", mapping.TypeDesc.
UseReflection
);
3241
if (mapping.TypeDesc.
UseReflection
) methodInvoke = $"(({typeof(bool).FullName}){methodInvoke})";
3250
if (mapping.TypeDesc.
UseReflection
) memberGet = $"(({typeof(bool).FullName}){memberGet})";
3281
string methodInvoke = RaCodeGen.GetStringForMethodInvoke("o", fullTypeName, $"ShouldSerialize{m.Name}", mapping.TypeDesc.
UseReflection
);
3282
if (mapping.TypeDesc.
UseReflection
) methodInvoke = $"(({typeof(bool).FullName}){methodInvoke})";
3291
if (mapping.TypeDesc.
UseReflection
) memberGet = $"(({typeof(bool).FullName}){memberGet})";
3389
if (memberTypeDesc.
UseReflection
)
3407
if (memberTypeDesc.
UseReflection
)
3413
Writer.Write(RaCodeGen.GetStringForMethodInvoke("a", memberTypeDesc.CSharpName, "GetEnumerator", memberTypeDesc.
UseReflection
));
3421
WriteLocalDecl(arrayTypeFullName, "ai", "e.Current", arrayElementTypeDesc.
UseReflection
);
3438
WriteLocalDecl(arrayTypeFullName, "ai", RaCodeGen.GetStringForArrayMember("a", "i", memberTypeDesc), arrayElementTypeDesc.
UseReflection
);
3525
if (!typeDesc.
UseReflection
) source = $"(({typeDesc.CSharpName}){source})";
3599
if (arrayTypeDesc.
UseReflection
)
3621
if (arrayTypeDesc.
UseReflection
)
3627
Writer.Write(RaCodeGen.GetStringForMethodInvoke(arrayName, arrayTypeDesc.CSharpName, "GetEnumerator", arrayTypeDesc.
UseReflection
));
3634
WriteLocalDecl(arrayTypeFullName, $"{arrayName}i", "e.Current", arrayElementTypeDesc.
UseReflection
);
3665
WriteLocalDecl(arrayTypeFullName, $"{arrayName}i", RaCodeGen.GetStringForArrayMember(arrayName, $"i{arrayName}", arrayTypeDesc), arrayElementTypeDesc.
UseReflection
);
3669
WriteLocalDecl(choiceFullName, $"{choiceName}i", RaCodeGen.GetStringForArrayMember(choiceName!, $"i{arrayName}", choice.Mapping.TypeDesc), choice.Mapping.TypeDesc.
UseReflection
);
3695
if (!elements[0].Any && !elements[0].Mapping!.TypeDesc!.
UseReflection
&& !elements[0].Mapping!.TypeDesc!.IsOptionalValue)
3733
bool useReflection = element.Mapping!.TypeDesc!.
UseReflection
;
3735
bool enumUseReflection = choice.Mapping!.TypeDesc!.
UseReflection
;
3764
bool useReflection = element.Mapping!.TypeDesc!.
UseReflection
;
3811
bool enumUseReflection = choice.Mapping!.TypeDesc!.
UseReflection
;
3877
bool useReflection = text.Mapping!.TypeDesc!.
UseReflection
;
3969
if (!element.Mapping.TypeDesc.BaseTypeDesc.
UseReflection
)
3998
Writer.Write(RaCodeGen.GetStringForTypeof(arrayMapping.TypeDesc!.CSharpName, arrayMapping.TypeDesc.
UseReflection
));
4145
Writer.Write(RaCodeGen.GetStringForTypeof(structMapping.TypeDesc!.CSharpName, structMapping.TypeDesc.
UseReflection
));