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

◆ InitTheFirstTime()

void System.Xml.Serialization.ReflectionAwareCodeGen.InitTheFirstTime ( )
inlineprivate

Definition at line 98 of file ReflectionAwareCodeGen.cs.

99 {
100 if (_reflectionVariables == null)
101 {
103 _writer.Write(string.Format(CultureInfo.InvariantCulture, "\r\n sealed class XSFieldInfo {{\r\n {3} fieldInfo;\r\n public XSFieldInfo({2} t, {1} memberName){{\r\n fieldInfo = t.GetField(memberName);\r\n }}\r\n public {0} this[{0} o] {{\r\n get {{\r\n return fieldInfo.GetValue(o);\r\n }}\r\n set {{\r\n fieldInfo.SetValue(o, value);\r\n }}\r\n }}\r\n\r\n }}\r\n sealed class XSPropInfo {{\r\n {4} propInfo;\r\n public XSPropInfo({2} t, {1} memberName){{\r\n propInfo = t.GetProperty(memberName);\r\n }}\r\n public {0} this[{0} o] {{\r\n get {{\r\n return propInfo.GetValue(o, null);\r\n }}\r\n set {{\r\n propInfo.SetValue(o, value, null);\r\n }}\r\n }}\r\n }}\r\n sealed class XSArrayInfo {{\r\n {4} propInfo;\r\n public XSArrayInfo({4} propInfo){{\r\n this.propInfo = propInfo;\r\n }}\r\n public {0} this[{0} a, int i] {{\r\n get {{\r\n return propInfo.GetValue(a, new {0}[]{{i}});\r\n }}\r\n set {{\r\n propInfo.SetValue(a, value, new {0}[]{{i}});\r\n }}\r\n }}\r\n }}\r\n", "object", "string", typeof(Type).FullName, typeof(FieldInfo).FullName, typeof(PropertyInfo).FullName));
105 }
106 }
static CultureInfo InvariantCulture
string WriteDefaultIndexerInit([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors|DynamicallyAccessedMemberTypes.PublicMethods|DynamicallyAccessedMemberTypes.PublicFields|DynamicallyAccessedMemberTypes.PublicNestedTypes|DynamicallyAccessedMemberTypes.PublicProperties|DynamicallyAccessedMemberTypes.PublicEvents)] Type type, string escapedName, bool collectionUseReflection, bool elementUseReflection)

References System.Xml.Serialization.ReflectionAwareCodeGen._reflectionVariables, System.Xml.Serialization.ReflectionAwareCodeGen._writer, System.Xml.Dictionary, System.Format, System.FullName, System.Globalization.CultureInfo.InvariantCulture, System.Xml.Serialization.IndentedWriter.Write(), and System.Xml.Serialization.ReflectionAwareCodeGen.WriteDefaultIndexerInit().

Referenced by System.Xml.Serialization.ReflectionAwareCodeGen.WriteTypeInfo().