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