1 instantiation of ReflectionAwareILGen
System.Private.Xml (1)
System\Xml\Serialization\XmlSerializationILGen.cs (1)
47_raCodeGen = new ReflectionAwareILGen();
41 references to ReflectionAwareILGen
System.Private.Xml (41)
System\Xml\Serialization\XmlSerializationILGen.cs (3)
26private readonly ReflectionAwareILGen _raCodeGen; 54internal ReflectionAwareILGen RaCodeGen { get { return _raCodeGen; } } 142return ReflectionAwareILGen.GetCSharpString(value);
System\Xml\Serialization\XmlSerializationReaderILGen.cs (21)
96string init = $"{a} = {castString}EnsureArrayIndex({a}, {c}, {ReflectionAwareILGen.GetStringForTypeof(choiceTypeFullName)});"; 97_choiceArraySource = init + ReflectionAwareILGen.GetStringForArrayMember(a, $"{c}++"); 200ReflectionAwareILGen.WriteReflectionInit(scope); 326ilg.Ldstr(ReflectionAwareILGen.GetCSharpString(expectedElement)); 380return ReflectionAwareILGen.GetStringForMember(parent, mapping.ChoiceIdentifier.MemberName); 621ReflectionAwareILGen.ILGenForCreateInstance(ilg, mappings[i].TypeDesc!.Type!, false, false); 1256ReflectionAwareILGen.ILGenForCreateInstance(ilg, td.Type!, false, false); 1541string source = ReflectionAwareILGen.GetStringForMember("o", mapping.Name); 1547member.CheckSpecifiedSource = ReflectionAwareILGen.GetStringForMember("o", $"{mapping.Name}Specified"); 2182ReflectionAwareILGen.ILGenForCreateInstance(ilg, member.Mapping.TypeDesc.Type!, typeDesc.CannotNew, true); 2224return ReflectionAwareILGen.GetQuotedCSharpString(qnames); 2597init = $"{init}{a} = ({arrayTypeFullName}[])EnsureArrayIndex({a}, {c}, {ReflectionAwareILGen.GetStringForTypeof(arrayTypeFullName)});"; 2598string arraySource = ReflectionAwareILGen.GetStringForArrayMember(a, $"{c}++"); 2608return ReflectionAwareILGen.GetStringForMethod(arrayName, "Add"); 3229ReflectionAwareILGen.ILGenForCreateInstance(ilg, sm.TypeDesc!.Type!, sm.TypeDesc.CannotNew, false); 3262ReflectionAwareILGen.ILGenForEnumMember(ilg, choice.Mapping!.TypeDesc!.Type!, choice.MemberIds[elementIndex]); 3300ReflectionAwareILGen.ILGenForCreateInstance(ilg, derived.TypeDesc!.Type!, derived.TypeDesc.CannotNew, false); 3441ReflectionAwareILGen.ILGenForCreateInstance(ilg, mapping.TypeDesc.Type!, mapping.TypeDesc.CannotNew, true); 3480ReflectionAwareILGen.WriteArrayLocalDecl(typeName, variableName, new SourceInfo(initValue, initValue, null, arrayTypeDesc.Type, ilg), arrayTypeDesc); 3485ReflectionAwareILGen.WriteCreateInstance(source, ctorInaccessible, type, ilg); 3490ReflectionAwareILGen.WriteLocalDecl(variableName, initValue);
System\Xml\Serialization\XmlSerializationWriterILGen.cs (17)
44ReflectionAwareILGen.WriteReflectionInit(scope); 653ReflectionAwareILGen.ILGenForEnumLongValue(ilg, "v"); 1028xmlnsSource = ReflectionAwareILGen.GetStringForMember("o", member.Name); 1082string memberGet = ReflectionAwareILGen.GetStringForMember("o", $"{m.Name}Specified"); 1086WriteMember(ReflectionAwareILGen.GetSourceForMember("o", m, ilg), m.Attribute, m.TypeDesc!, "o"); 1115string memberGet = ReflectionAwareILGen.GetStringForMember("o", $"{m.Name}Specified"); 1124choiceSource = ReflectionAwareILGen.GetStringForMember("o", m.ChoiceIdentifier.MemberName); 1127WriteMember(ReflectionAwareILGen.GetSourceForMember("o", m, m.MemberInfo, ilg), choiceSource, m.ElementsSortedByDerivation!, m.Text, m.ChoiceIdentifier, m.TypeDesc!, true); 1212WriteLocalDecl(aiVar, ReflectionAwareILGen.GetStringForArrayMember(aVar, iVar), arrayElementTypeDesc.Type!); 1549WriteLocalDecl(arrayNamePlusI, ReflectionAwareILGen.GetStringForArrayMember(arrayName, iPlusArrayName), arrayElementTypeDesc.Type!); 1552WriteLocalDecl($"{choiceName}i", ReflectionAwareILGen.GetStringForArrayMember(choiceName, iPlusArrayName), choice.Mapping!.TypeDesc!.Type!); 1558WriteElements(new SourceInfo(ReflectionAwareILGen.GetStringForArrayMember(arrayName, iPlusArrayName), null, null, arrayElementTypeDesc.Type, ilg), null, elements, text, choice, arrayNamePlusA, true, arrayElementTypeDesc.IsNullable); 2217ReflectionAwareILGen.WriteLocalDecl(variableName, new SourceInfo(initValue, initValue, null, type, ilg)); 2222ReflectionAwareILGen.WriteArrayLocalDecl(typeName, variableName, initValue, arrayTypeDesc); 2226ReflectionAwareILGen.WriteTypeCompare(variable, type, ilg); 2231ReflectionAwareILGen.WriteInstanceOf(source, type, ilg); 2235ReflectionAwareILGen.WriteArrayTypeCompare(variable, arrayType, ilg);