Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ WriteQualifiedNameElement()

void System.Xml.Serialization.XmlSerializationWriterILGen.WriteQualifiedNameElement ( string name,
string ns,
object defaultValue,
SourceInfo source,
bool nullable,
TypeMapping mapping )
inlineprivate

Definition at line 94 of file XmlSerializationWriterILGen.cs.

95 {
96 bool flag = defaultValue != null && defaultValue != DBNull.Value;
97 if (flag)
98 {
99 throw Globals.NotSupported("XmlQualifiedName DefaultValue not supported. Fail in WriteValue()");
100 }
101 List<Type> list = new List<Type>();
102 ilg.Ldarg(0);
104 list.Add(typeof(string));
105 if (ns != null)
106 {
108 list.Add(typeof(string));
109 }
110 source.Load(mapping.TypeDesc.Type);
111 list.Add(mapping.TypeDesc.Type);
112 MethodInfo method = typeof(XmlSerializationWriter).GetMethod(nullable ? "WriteNullableQualifiedNameLiteral" : "WriteElementQualifiedName", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic, list.ToArray());
113 ilg.Call(method);
114 if (flag)
115 {
116 throw Globals.NotSupported("XmlQualifiedName DefaultValue not supported. Fail in WriteValue()");
117 }
118 }
void Add(TKey key, TValue value)
void Call(MethodInfo methodInfo)

References System.Collections.Generic.Dictionary< TKey, TValue >.Add(), System.Xml.Serialization.CodeGenerator.Call(), System.Xml.Dictionary, System.Xml.Serialization.XmlSerializationILGen.GetCSharpString(), System.Xml.Serialization.XmlSerializationILGen.ilg, System.Xml.Serialization.CodeGenerator.Ldarg(), System.Xml.Serialization.CodeGenerator.Ldstr(), System.list, System.Xml.Serialization.Globals.NotSupported(), System.source, and System.DBNull.Value.

Referenced by System.Xml.Serialization.XmlSerializationWriterILGen.WriteElement().