93 references to UseReflection
System.Private.Xml (93)
System\Xml\Serialization\ReflectionXmlSerializationReader.cs (1)
305
if (mappings[i].TypeDesc!.IsOptionalValue && mappings[i].TypeDesc!.BaseTypeDesc!.
UseReflection
)
System\Xml\Serialization\ReflectionXmlSerializationWriter.cs (1)
385
bool enumUseReflection = choice.Mapping!.TypeDesc!.
UseReflection
;
System\Xml\Serialization\XmlSerializationReader.cs (31)
2182
bool choiceUseReflection = mapping.ChoiceIdentifier.Mapping!.TypeDesc!.
UseReflection
;
2471
Writer.Write(RaCodeGen.GetStringForTypeof(mapping.TypeDesc.CSharpName, mapping.TypeDesc.
UseReflection
));
2702
if (mappings[i].TypeDesc!.IsOptionalValue && mappings[i].TypeDesc!.BaseTypeDesc!.
UseReflection
)
2708
Writer.Write(RaCodeGen.GetStringForCreateInstance(mappings[i].TypeDesc!.CSharpName, mappings[i].TypeDesc!.
UseReflection
, false, false));
2816
bool useReflection = td.
UseReflection
;
2818
bool arrayElementUseReflection = td.ArrayElementTypeDesc == null ? false : td.ArrayElementTypeDesc.
UseReflection
;
2999
if (!mapping.TypeDesc!.
UseReflection
)
3043
bool useReflection = mapping.TypeDesc!.
UseReflection
;
3138
if (derived.TypeDesc!.
UseReflection
&& isTypedReturn)
3196
if (td.
UseReflection
)
3208
Writer.Write(RaCodeGen.GetStringForCreateInstance(fullTypeName, td.
UseReflection
, false, false));
3227
bool useReflection = nullableMapping.BaseMapping!.TypeDesc!.
UseReflection
;
3281
bool useReflection = structMapping.TypeDesc!.
UseReflection
;
3556
if (anyFixups) WriteFixupMethod(fixupMethodName, members, structMapping.TypeDesc.CSharpName, structMapping.TypeDesc.
UseReflection
, true, "o");
3649
Writer.Write(RaCodeGen.GetStringForCreateInstance(typeDesc.CSharpName, typeDesc.
UseReflection
, typeDesc.CannotNew, true));
3680
bool useReflection = td.
UseReflection
;
4002
bool useReflection = typeDesc.
UseReflection
;
4344
Writer.Write(RaCodeGen.GetStringForTypeof(td.CSharpName, td.
UseReflection
));
4348
Writer.Write(RaCodeGen.GetStringForTypeof(e.Mapping!.TypeDesc!.CSharpName, e.Mapping.TypeDesc.
UseReflection
));
4384
Writer.Write(RaCodeGen.GetStringForCreateInstance(e.Mapping.TypeDesc.CSharpName, e.Mapping.TypeDesc.
UseReflection
, false, true, $"({td.CSharpName}){checkTypeSource}"));
4486
bool useReflection = typeDesc.
UseReflection
;
4490
bool arrayUseReflection = typeDesc.ArrayElementTypeDesc.
UseReflection
;
4533
bool arrayUseReflection = typeDesc.ArrayElementTypeDesc!.
UseReflection
;
4555
bool choiceUseReflection = member.Mapping.ChoiceIdentifier.Mapping!.TypeDesc!.
UseReflection
;
4586
if (typeDesc != null && !typeDesc.
UseReflection
)
4771
Writer.Write(RaCodeGen.GetStringForCreateInstance(element.Mapping.TypeDesc.CSharpName, element.Mapping.TypeDesc.
UseReflection
, false, false));
4981
Writer.Write(RaCodeGen.GetStringForCreateInstance(sm.TypeDesc!.CSharpName, sm.TypeDesc.
UseReflection
, sm.TypeDesc.CannotNew, false));
5018
Writer.Write(RaCodeGen.GetStringForEnumMember(enumTypeName, choice.MemberIds[elementIndex], choice.Mapping.TypeDesc.
UseReflection
));
5044
Writer.Write(RaCodeGen.GetStringForCreateInstance(derived.TypeDesc!.CSharpName, derived.TypeDesc.
UseReflection
, derived.TypeDesc.CannotNew, false));
5193
bool useReflection = mapping.TypeDesc.
UseReflection
;
5244
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})";
3604
if (arrayTypeDesc.
UseReflection
)
3626
if (arrayTypeDesc.
UseReflection
)
3632
Writer.Write(RaCodeGen.GetStringForMethodInvoke(arrayName, arrayTypeDesc.CSharpName, "GetEnumerator", arrayTypeDesc.
UseReflection
));
3643
WriteLocalDecl(arrayTypeFullName, $"{arrayName}i", "e.Current", arrayElementTypeDesc.
UseReflection
);
3679
WriteLocalDecl(arrayTypeFullName, $"{arrayName}i", RaCodeGen.GetStringForArrayMember(arrayName, $"i{arrayName}", arrayTypeDesc), arrayElementTypeDesc.
UseReflection
);
3683
WriteLocalDecl(choiceFullName, $"{choiceName}i", RaCodeGen.GetStringForArrayMember(choiceName!, $"i{arrayName}", choice.Mapping.TypeDesc), choice.Mapping.TypeDesc.
UseReflection
);
3713
if (!elements[0].Any && !elements[0].Mapping!.TypeDesc!.
UseReflection
&& !elements[0].Mapping!.TypeDesc!.IsOptionalValue)
3751
bool useReflection = element.Mapping!.TypeDesc!.
UseReflection
;
3753
bool enumUseReflection = choice.Mapping!.TypeDesc!.
UseReflection
;
3782
bool useReflection = element.Mapping!.TypeDesc!.
UseReflection
;
3829
bool enumUseReflection = choice.Mapping!.TypeDesc!.
UseReflection
;
3895
bool useReflection = text.Mapping!.TypeDesc!.
UseReflection
;
3987
if (!element.Mapping.TypeDesc.BaseTypeDesc.
UseReflection
)
4016
Writer.Write(RaCodeGen.GetStringForTypeof(arrayMapping.TypeDesc!.CSharpName, arrayMapping.TypeDesc.
UseReflection
));
4163
Writer.Write(RaCodeGen.GetStringForTypeof(structMapping.TypeDesc!.CSharpName, structMapping.TypeDesc.
UseReflection
));