92 references to UseReflection
System.Private.Xml (92)
System\Xml\Serialization\ReflectionXmlSerializationReader.cs (1)
297
if (mappings[i].TypeDesc!.IsOptionalValue && mappings[i].TypeDesc!.BaseTypeDesc!.
UseReflection
)
System\Xml\Serialization\XmlSerializationReader.cs (31)
2131
bool choiceUseReflection = mapping.ChoiceIdentifier.Mapping!.TypeDesc!.
UseReflection
;
2407
Writer.Write(RaCodeGen.GetStringForTypeof(mapping.TypeDesc.CSharpName, mapping.TypeDesc.
UseReflection
));
2638
if (mappings[i].TypeDesc!.IsOptionalValue && mappings[i].TypeDesc!.BaseTypeDesc!.
UseReflection
)
2644
Writer.Write(RaCodeGen.GetStringForCreateInstance(mappings[i].TypeDesc!.CSharpName, mappings[i].TypeDesc!.
UseReflection
, false, false));
2752
bool useReflection = td.
UseReflection
;
2754
bool arrayElementUseReflection = td.ArrayElementTypeDesc == null ? false : td.ArrayElementTypeDesc.
UseReflection
;
2935
if (!mapping.TypeDesc!.
UseReflection
)
2979
bool useReflection = mapping.TypeDesc!.
UseReflection
;
3074
if (derived.TypeDesc!.
UseReflection
&& isTypedReturn)
3132
if (td.
UseReflection
)
3144
Writer.Write(RaCodeGen.GetStringForCreateInstance(fullTypeName, td.
UseReflection
, false, false));
3163
bool useReflection = nullableMapping.BaseMapping!.TypeDesc!.
UseReflection
;
3217
bool useReflection = structMapping.TypeDesc!.
UseReflection
;
3492
if (anyFixups) WriteFixupMethod(fixupMethodName, members, structMapping.TypeDesc.CSharpName, structMapping.TypeDesc.
UseReflection
, true, "o");
3585
Writer.Write(RaCodeGen.GetStringForCreateInstance(typeDesc.CSharpName, typeDesc.
UseReflection
, typeDesc.CannotNew, true));
3616
bool useReflection = td.
UseReflection
;
3931
bool useReflection = typeDesc.
UseReflection
;
4249
Writer.Write(RaCodeGen.GetStringForTypeof(td.CSharpName, td.
UseReflection
));
4253
Writer.Write(RaCodeGen.GetStringForTypeof(e.Mapping!.TypeDesc!.CSharpName, e.Mapping.TypeDesc.
UseReflection
));
4289
Writer.Write(RaCodeGen.GetStringForCreateInstance(e.Mapping.TypeDesc.CSharpName, e.Mapping.TypeDesc.
UseReflection
, false, true, $"({td.CSharpName}){checkTypeSource}"));
4391
bool useReflection = typeDesc.
UseReflection
;
4395
bool arrayUseReflection = typeDesc.ArrayElementTypeDesc.
UseReflection
;
4438
bool arrayUseReflection = typeDesc.ArrayElementTypeDesc!.
UseReflection
;
4460
bool choiceUseReflection = member.Mapping.ChoiceIdentifier.Mapping!.TypeDesc!.
UseReflection
;
4491
if (typeDesc != null && !typeDesc.
UseReflection
)
4652
Writer.Write(RaCodeGen.GetStringForCreateInstance(element.Mapping.TypeDesc.CSharpName, element.Mapping.TypeDesc.
UseReflection
, false, false));
4842
Writer.Write(RaCodeGen.GetStringForCreateInstance(sm.TypeDesc!.CSharpName, sm.TypeDesc.
UseReflection
, sm.TypeDesc.CannotNew, false));
4879
Writer.Write(RaCodeGen.GetStringForEnumMember(enumTypeName, choice.MemberIds[elementIndex], choice.Mapping.TypeDesc.
UseReflection
));
4905
Writer.Write(RaCodeGen.GetStringForCreateInstance(derived.TypeDesc!.CSharpName, derived.TypeDesc.
UseReflection
, derived.TypeDesc.CannotNew, false));
5054
bool useReflection = mapping.TypeDesc.
UseReflection
;
5105
Writer.Write(RaCodeGen.GetStringForTypeof(typeDesc.CSharpName, typeDesc.
UseReflection
));
System\Xml\Serialization\XmlSerializationWriter.cs (60)
1613
if (typeDesc.
UseReflection
)
1631
if (elementTypeDesc.
UseReflection
)
1671
if (elementTypeDesc.
UseReflection
)
1735
bool elementUseReflection = typeDesc.ArrayElementTypeDesc.
UseReflection
;
1738
WriteDefaultIndexerInit(type, typeFullName, typeDesc.
UseReflection
, elementUseReflection);
1931
if (!typeDesc.
UseReflection
)
1942
if (typeDesc != null && !typeDesc.
UseReflection
)
1977
if (!arrayTypeDesc.
UseReflection
)
2091
if (arrayTypeDesc.
UseReflection
)
2344
Writer.Write(RaCodeGen.GetStringForTypeof(typeMapping.TypeDesc.CSharpName, typeMapping.TypeDesc.
UseReflection
));
2460
if (mapping.TypeDesc!.
UseReflection
)
2461
Writer.Write(ReflectionAwareCodeGen.GetStringForEnumLongValue(source, mapping.TypeDesc.
UseReflection
));
2475
Writer.Write(RaCodeGen.GetStringForEnumCompare((EnumMapping)mapping, values[i], mapping.TypeDesc.
UseReflection
));
2481
Writer.Write(RaCodeGen.GetStringForEnumCompare((EnumMapping)mapping, (string)defaultValue!, mapping.TypeDesc.
UseReflection
));
2749
if (member.ChoiceIdentifier.Mapping!.TypeDesc!.
UseReflection
)
2871
WriteLocalDecl(fullTypeName, "v", "e", mapping.TypeDesc.
UseReflection
);
2878
Writer.Write(mapping.TypeDesc.
UseReflection
? "object" : fullTypeName);
2888
if (mapping.TypeDesc.
UseReflection
)
2889
Writer.WriteLine($"switch ({ReflectionAwareCodeGen.GetStringForEnumLongValue("v", mapping.TypeDesc.
UseReflection
)} ){{");
2898
WriteEnumCase(fullTypeName, c, mapping.TypeDesc.
UseReflection
);
2910
Writer.Write(ReflectionAwareCodeGen.GetStringForEnumLongValue("v", mapping.TypeDesc.
UseReflection
));
2930
if (mapping.TypeDesc.
UseReflection
)
2948
Writer.Write(ReflectionAwareCodeGen.GetStringForEnumLongValue("v", mapping.TypeDesc.
UseReflection
));
2979
WriteTypeCompare("t", fullTypeName, derived.TypeDesc.
UseReflection
);
2992
if (!derived.TypeDesc.
UseReflection
) Writer.Write($"({fullTypeName})");
3018
WriteTypeCompare("t", fullTypeName, mapping.TypeDesc.
UseReflection
);
3037
if (!mapping.TypeDesc.
UseReflection
) Writer.Write($"({fullTypeName})");
3051
WriteArrayTypeCompare("t", fullTypeName, mapping.TypeDesc.ArrayElementTypeDesc!.CSharpName, mapping.TypeDesc.
UseReflection
);
3053
WriteTypeCompare("t", fullTypeName, mapping.TypeDesc.
UseReflection
);
3091
WriteLocalDecl(fullTypeName, "o", "s", mapping.TypeDesc.
UseReflection
);
3096
Writer.Write(mapping.TypeDesc.
UseReflection
? "object" : fullTypeName);
3117
WriteTypeCompare("t", fullTypeName, mapping.TypeDesc.
UseReflection
);
3156
if (mapping.TypeDesc.
UseReflection
)
3193
string methodInvoke = RaCodeGen.GetStringForMethodInvoke("o", fullTypeName, $"ShouldSerialize{m.Name}", mapping.TypeDesc.
UseReflection
);
3194
if (mapping.TypeDesc.
UseReflection
) methodInvoke = $"(({typeof(bool).FullName}){methodInvoke})";
3203
if (mapping.TypeDesc.
UseReflection
) memberGet = $"(({typeof(bool).FullName}){memberGet})";
3234
string methodInvoke = RaCodeGen.GetStringForMethodInvoke("o", fullTypeName, $"ShouldSerialize{m.Name}", mapping.TypeDesc.
UseReflection
);
3235
if (mapping.TypeDesc.
UseReflection
) methodInvoke = $"(({typeof(bool).FullName}){methodInvoke})";
3244
if (mapping.TypeDesc.
UseReflection
) memberGet = $"(({typeof(bool).FullName}){memberGet})";
3342
if (memberTypeDesc.
UseReflection
)
3360
if (memberTypeDesc.
UseReflection
)
3366
Writer.Write(RaCodeGen.GetStringForMethodInvoke("a", memberTypeDesc.CSharpName, "GetEnumerator", memberTypeDesc.
UseReflection
));
3374
WriteLocalDecl(arrayTypeFullName, "ai", "e.Current", arrayElementTypeDesc.
UseReflection
);
3391
WriteLocalDecl(arrayTypeFullName, "ai", RaCodeGen.GetStringForArrayMember("a", "i", memberTypeDesc), arrayElementTypeDesc.
UseReflection
);
3478
if (!typeDesc.
UseReflection
) source = $"(({typeDesc.CSharpName}){source})";
3552
if (arrayTypeDesc.
UseReflection
)
3574
if (arrayTypeDesc.
UseReflection
)
3580
Writer.Write(RaCodeGen.GetStringForMethodInvoke(arrayName, arrayTypeDesc.CSharpName, "GetEnumerator", arrayTypeDesc.
UseReflection
));
3587
WriteLocalDecl(arrayTypeFullName, $"{arrayName}i", "e.Current", arrayElementTypeDesc.
UseReflection
);
3618
WriteLocalDecl(arrayTypeFullName, $"{arrayName}i", RaCodeGen.GetStringForArrayMember(arrayName, $"i{arrayName}", arrayTypeDesc), arrayElementTypeDesc.
UseReflection
);
3622
WriteLocalDecl(choiceFullName, $"{choiceName}i", RaCodeGen.GetStringForArrayMember(choiceName!, $"i{arrayName}", choice.Mapping.TypeDesc), choice.Mapping.TypeDesc.
UseReflection
);
3648
if (!elements[0].Any && !elements[0].Mapping!.TypeDesc!.
UseReflection
&& !elements[0].Mapping!.TypeDesc!.IsOptionalValue)
3686
bool useReflection = element.Mapping!.TypeDesc!.
UseReflection
;
3688
bool enumUseReflection = choice.Mapping!.TypeDesc!.
UseReflection
;
3717
bool useReflection = element.Mapping!.TypeDesc!.
UseReflection
;
3764
bool enumUseReflection = choice.Mapping!.TypeDesc!.
UseReflection
;
3830
bool useReflection = text.Mapping!.TypeDesc!.
UseReflection
;
3922
if (!element.Mapping.TypeDesc.BaseTypeDesc.
UseReflection
)
3951
Writer.Write(RaCodeGen.GetStringForTypeof(arrayMapping.TypeDesc!.CSharpName, arrayMapping.TypeDesc.
UseReflection
));
4098
Writer.Write(RaCodeGen.GetStringForTypeof(structMapping.TypeDesc!.CSharpName, structMapping.TypeDesc.
UseReflection
));