21 instantiations of SourceInfo
System.Private.Xml (21)
System\Xml\Serialization\SourceInfo.cs (1)
52
return new
SourceInfo
($"(({td.CSharpName}){Source})", Arg, MemberInfo, td.Type!, ILG);
System\Xml\Serialization\XmlSerializationILGen.cs (1)
592
SourceInfo info = new
SourceInfo
(source, null, null, null, ilg!);
System\Xml\Serialization\XmlSerializationReaderILGen.cs (2)
2264
WriteLocalDecl(a, new
SourceInfo
(member.Source, member.Source, member.Mapping.MemberInfo, member.Mapping.TypeDesc.Type, ilg));
3697
ReflectionAwareILGen.WriteArrayLocalDecl(typeName, variableName, new
SourceInfo
(initValue, initValue, null, arrayTypeDesc.Type, ilg), arrayTypeDesc);
System\Xml\Serialization\XmlSerializationWriterILGen.cs (17)
411
SourceInfo source = new
SourceInfo
($"p[{i}]", null, null, pLengthLoc.LocalType.GetElementType()!, ilg);
422
specifiedSource = new
SourceInfo
($"((bool)p[{j}])", null, null, typeof(bool), ilg);
478
specifiedSource = new
SourceInfo
($"((bool)p[{j}])", null, null, typeof(bool), ilg);
524
WriteMember(new
SourceInfo
(source, source, null, null, ilg), enumSource, member.ElementsSortedByDerivation!, member.Text, member.ChoiceIdentifier, member.TypeDesc!, writeAccessors || hasWrapperElement);
585
WriteMember(new
SourceInfo
("o", "o", null, typeof(object), ilg), null, new ElementAccessor[] { element }, null, null, mapping.TypeDesc, true);
892
WriteMember(new
SourceInfo
("o", "o", null, null, ilg), null, mapping.ElementsSortedByDerivation!, null, null, mapping.TypeDesc, true);
1264
WriteEnumValue((EnumMapping)attribute.Mapping, new
SourceInfo
(aiVar, aiVar, null, arrayElementTypeDesc.Type, ilg), out argType);
1266
WritePrimitiveValue(arrayElementTypeDesc, new
SourceInfo
(aiVar, aiVar, null, arrayElementTypeDesc.Type, ilg), out argType);
1278
WriteAttribute(new
SourceInfo
(aiVar, aiVar, null, null, ilg), attribute, parent);
1433
SourceInfo choiceSourceInfo = new
SourceInfo
(choiceSource!, null, choice.MemberInfo, null, ilg);
1545
WriteElements(new
SourceInfo
(arrayNamePlusI, null, null, arrayElementTypeDesc.Type, ilg), $"{choiceName}i", elements, text, choice, arrayNamePlusA, true, true);
1575
WriteElements(new
SourceInfo
(arrayNamePlusI, null, null, arrayElementTypeDesc.Type, ilg), $"{choiceName}i", elements, text, choice, arrayNamePlusA, true, arrayElementTypeDesc.IsNullable);
1587
WriteElements(new
SourceInfo
(ReflectionAwareILGen.GetStringForArrayMember(arrayName, iPlusArrayName), null, null, arrayElementTypeDesc.Type, ilg), null, elements, text, choice, arrayNamePlusA, true, arrayElementTypeDesc.IsNullable);
1784
WriteElement(new
SourceInfo
("elem", null, null, elemLoc.LocalType, ilg), element, arrayName, writeAccessors);
1813
WriteElement(new
SourceInfo
("elem", null, null, elemLoc.LocalType, ilg), unnamedAny, arrayName, writeAccessors);
2260
ReflectionAwareILGen.WriteLocalDecl(variableName, new
SourceInfo
(initValue, initValue, null, type, ilg));
2380
return new
SourceInfo
(GetStringForMember(obj, member.Name), obj, memberInfo, member.TypeDesc!.Type, ilg);
40 references to SourceInfo
System.Private.Xml (40)
System\Xml\Serialization\SourceInfo.cs (8)
50
public
SourceInfo
CastTo(TypeDesc td)
238
public static implicit operator string(
SourceInfo
source)
243
public static bool operator !=(
SourceInfo
? a,
SourceInfo
? b)
250
public static bool operator ==(
SourceInfo
? a,
SourceInfo
? b)
261
SourceInfo
? info = obj as
SourceInfo
;
System\Xml\Serialization\XmlSerializationILGen.cs (1)
592
SourceInfo
info = new SourceInfo(source, null, null, null, ilg!);
System\Xml\Serialization\XmlSerializationReaderILGen.cs (1)
3705
private static void WriteLocalDecl(string variableName,
SourceInfo
initValue)
System\Xml\Serialization\XmlSerializationWriterILGen.cs (30)
94
private void WriteQualifiedNameElement(string name, string? ns, object? defaultValue,
SourceInfo
source, bool nullable, TypeMapping mapping)
121
private void WriteEnumValue(EnumMapping mapping,
SourceInfo
source, out Type returnType)
143
private void WritePrimitiveValue(TypeDesc typeDesc,
SourceInfo
source, out Type returnType)
191
private void WritePrimitive(string method, string name, string? ns, object? defaultValue,
SourceInfo
source, TypeMapping mapping, bool writeXsiType, bool isElement, bool isNullable)
411
SourceInfo
source = new SourceInfo($"p[{i}]", null, null, pLengthLoc.LocalType.GetElementType()!, ilg);
413
SourceInfo
? specifiedSource = null;
468
SourceInfo
? specifiedSource = null;
1152
private void WriteMember(
SourceInfo
source, AttributeAccessor attribute, TypeDesc memberTypeDesc, string parent)
1356
private void WriteAttribute(
SourceInfo
source, AttributeAccessor attribute, string parent)
1404
private void WriteMember(
SourceInfo
source, string? choiceSource, ElementAccessor[] elements, TextAccessor? text, ChoiceIdentifierAccessor? choice, TypeDesc memberTypeDesc, bool writeAccessors)
1414
private void WriteArray(
SourceInfo
source, string? choiceSource, ElementAccessor[] elements, TextAccessor? text, ChoiceIdentifierAccessor? choice, TypeDesc arrayTypeDesc)
1433
SourceInfo
choiceSourceInfo = new SourceInfo(choiceSource!, null, choice.MemberInfo, null, ilg);
1607
private void WriteElements(
SourceInfo
source, string? enumSource, ElementAccessor[] elements, TextAccessor? text, ChoiceIdentifierAccessor? choice, string arrayName, bool writeAccessors, bool isNullable)
1676
SourceInfo
castedSource = source.CastTo(element.Mapping.TypeDesc!);
1687
SourceInfo
castedSource = source.CastTo(td);
1852
SourceInfo
castedSource = source.CastTo(text.Mapping.TypeDesc);
1857
SourceInfo
castedSource = source.CastTo(text.Mapping!.TypeDesc!);
1892
private void WriteText(
SourceInfo
source, TextAccessor text)
1939
private void WriteElement(
SourceInfo
source, ElementAccessor element, string arrayName, bool writeAccessor)
1962
SourceInfo
castedSource = source.CastTo(element.Mapping.TypeDesc.BaseTypeDesc!);
2107
private void WriteElementCall(string func, Type cast,
SourceInfo
source, string? name, string? ns, bool isNullable, bool isAny)
2123
private void WriteCheckDefault(
SourceInfo
source, object value, bool isNullable)
2194
private void WriteChoiceTypeCheck(
SourceInfo
source, ChoiceIdentifierAccessor choice, string enumName, TypeDesc typeDesc)
2263
private static void WriteArrayLocalDecl(string typeName, string variableName,
SourceInfo
initValue, TypeDesc arrayTypeDesc)
2272
private void WriteInstanceOf(
SourceInfo
source, Type type)
2374
internal static
SourceInfo
GetSourceForMember(string obj, MemberMapping member, CodeGenerator ilg)
2378
internal static
SourceInfo
GetSourceForMember(string obj, MemberMapping member, MemberInfo? memberInfo, CodeGenerator ilg)
2530
internal static void WriteLocalDecl(string variableName,
SourceInfo
initValue)
2580
internal static void WriteInstanceOf(
SourceInfo
source, Type type, CodeGenerator ilg)
2590
internal static void WriteArrayLocalDecl(string typeName, string variableName,
SourceInfo
initValue, TypeDesc arrayTypeDesc)