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