Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
System.Xml.Serialization.XmlSerializationWriterILGen Class Referencesealed

Protected Attributes

TypeBuilder typeBuilder
 
CodeGenerator ilg
 

Package Functions

 XmlSerializationWriterILGen (TypeScope[] scopes, string access, string className)
 
void GenerateBegin ()
 
override void GenerateMethod (TypeMapping mapping)
 
Type GenerateEnd ()
 
string GenerateElement (XmlMapping xmlMapping)
 
MethodBuilder EnsureMethodBuilder (TypeBuilder typeBuilder, string methodName, MethodAttributes attributes, Type returnType, Type[] parameterTypes)
 
MethodBuilderInfo GetMethodBuilder (string methodName)
 
void GenerateReferencedMethods ()
 
string ReferenceMapping (TypeMapping mapping)
 
string GetCSharpString (string value)
 
FieldBuilder GenerateHashtableGetBegin (string privateName, string publicName, TypeBuilder serializerContractTypeBuilder)
 
void GenerateHashtableGetEnd (FieldBuilder fieldBuilder)
 
FieldBuilder GeneratePublicMethods (string privateName, string publicName, string[] methods, XmlMapping[] xmlMappings, TypeBuilder serializerContractTypeBuilder)
 
void GenerateSupportedTypes (Type[] types, TypeBuilder serializerContractTypeBuilder)
 
string GenerateBaseSerializer (string baseSerializer, string readerClass, string writerClass, CodeIdentifiers classes)
 
string GenerateTypedSerializer (string readMethod, string writeMethod, XmlMapping mapping, CodeIdentifiers classes, string baseSerializer, string readerClass, string writerClass)
 
void GenerateSerializerContract (string className, XmlMapping[] xmlMappings, Type[] types, string readerType, string[] readMethods, string writerType, string[] writerMethods, Dictionary< string, string > serializers)
 
void ILGenLoad (string source)
 
void ILGenLoad (string source, Type type)
 

Static Package Functions

static Regex NewRegex (string pattern)
 
static bool IsWildcard (SpecialMapping mapping)
 

Package Attributes

Dictionary< string, TypeCreatedTypes = new Dictionary<string, Type>()
 
Dictionary< string, MemberInfomemberInfos = new Dictionary<string, MemberInfo>()
 

Properties

int NextMethodNumber [get, set]
 
ReflectionAwareILGen RaCodeGen [get]
 
TypeDesc StringTypeDesc [get]
 
TypeDesc QnameTypeDesc [get]
 
string ClassName [get]
 
TypeScope[] Scopes [get]
 
Dictionary< TypeMapping, stringMethodNames [get]
 
HashSet< TypeMappingGeneratedMethods [get]
 
ModuleBuilder ModuleBuilder [get, set]
 
TypeAttributes TypeAttributes [get]
 

Private Member Functions

void GenerateInitCallbacksMethod ()
 
void WriteQualifiedNameElement (string name, string ns, object defaultValue, SourceInfo source, bool nullable, TypeMapping mapping)
 
void WriteEnumValue (EnumMapping mapping, SourceInfo source, out Type returnType)
 
void WritePrimitiveValue (TypeDesc typeDesc, SourceInfo source, out Type returnType)
 
void WritePrimitive (string method, string name, string ns, object defaultValue, SourceInfo source, TypeMapping mapping, bool writeXsiType, bool isElement, bool isNullable)
 
void WriteTag (string methodName, string name, string ns)
 
void WriteTag (string methodName, string name, string ns, bool writePrefixed)
 
void WriteStartElement (string name, string ns, bool writePrefixed)
 
void WriteEndElement ()
 
void WriteEndElement (string source)
 
void WriteLiteralNullTag (string name, string ns)
 
void WriteEmptyTag (string name, string ns)
 
string GenerateMembersElement (XmlMembersMapping xmlMembersMapping)
 
string GenerateTypeElement (XmlTypeMapping xmlTypeMapping)
 
string NextMethodName (string name)
 
void WriteEnumMethod (EnumMapping mapping)
 
void WriteDerivedTypes (StructMapping mapping)
 
void WriteEnumAndArrayTypes ()
 
void WriteStructMethod (StructMapping mapping)
 
bool CanOptimizeWriteListSequence (TypeDesc listElementTypeDesc)
 
void WriteMember (SourceInfo source, AttributeAccessor attribute, TypeDesc memberTypeDesc, string parent)
 
void WriteAttribute (SourceInfo source, AttributeAccessor attribute, string parent)
 
void WriteMember (SourceInfo source, string choiceSource, ElementAccessor[] elements, TextAccessor text, ChoiceIdentifierAccessor choice, TypeDesc memberTypeDesc, bool writeAccessors)
 
void WriteArray (SourceInfo source, string choiceSource, ElementAccessor[] elements, TextAccessor text, ChoiceIdentifierAccessor choice, TypeDesc arrayTypeDesc)
 
void WriteArrayItems (ElementAccessor[] elements, TextAccessor text, ChoiceIdentifierAccessor choice, TypeDesc arrayTypeDesc, string arrayName, string choiceName)
 
void WriteElements (SourceInfo source, string enumSource, ElementAccessor[] elements, TextAccessor text, ChoiceIdentifierAccessor choice, string arrayName, bool writeAccessors, bool isNullable)
 
void WriteText (SourceInfo source, TextAccessor text)
 
void WriteElement (SourceInfo source, ElementAccessor element, string arrayName, bool writeAccessor)
 
void WriteElementCall (string func, Type cast, SourceInfo source, string name, string ns, bool isNullable, bool isAny)
 
void WriteCheckDefault (SourceInfo source, object value, bool isNullable)
 
void WriteChoiceTypeCheck (SourceInfo source, string fullTypeName, ChoiceIdentifierAccessor choice, string enumName, TypeDesc typeDesc)
 
void WriteNullCheckBegin (string source, ElementAccessor element)
 
void WriteNamespaces (string source)
 
int FindXmlnsIndex (MemberMapping[] members)
 
void WriteLocalDecl (string variableName, string initValue, Type type)
 
void WriteArrayLocalDecl (string typeName, string variableName, SourceInfo initValue, TypeDesc arrayTypeDesc)
 
void WriteTypeCompare (string variable, Type type)
 
void WriteInstanceOf (SourceInfo source, Type type)
 
void WriteArrayTypeCompare (string variable, Type arrayType)
 
string FindChoiceEnumValue (ElementAccessor element, EnumMapping choiceMapping, out object eValue)
 
TypeMapping[] EnsureArrayIndex (TypeMapping[] a, int index)
 
FieldBuilder GenerateTypedSerializers (Dictionary< string, string > serializers, TypeBuilder serializerContractTypeBuilder)
 
void GenerateGetSerializer (Dictionary< string, string > serializers, XmlMapping[] xmlMappings, TypeBuilder serializerContractTypeBuilder)
 

Static Private Member Functions

static object GetConvertedDefaultValue ([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicMethods)] Type targetType, object rawDefaultValue)
 

Private Attributes

int _nextMethodNumber
 
readonly Dictionary< TypeMapping, string_methodNames = new Dictionary<TypeMapping, string>()
 
readonly Dictionary< string, MethodBuilderInfo_methodBuilders = new Dictionary<string, MethodBuilderInfo>()
 
readonly ReflectionAwareILGen _raCodeGen
 
readonly TypeScope[] _scopes
 
readonly TypeDesc _stringTypeDesc
 
readonly TypeDesc _qnameTypeDesc
 
readonly string _className
 
TypeMapping[] _referencedMethods
 
int _references
 
readonly HashSet< TypeMapping_generatedMethods = new HashSet<TypeMapping>()
 
ModuleBuilder _moduleBuilder
 
readonly TypeAttributes _typeAttributes
 

Static Private Attributes

static readonly Dictionary< string, Regexs_regexs = new Dictionary<string, Regex>()
 

Detailed Description

Definition at line 13 of file XmlSerializationWriterILGen.cs.


The documentation for this class was generated from the following file: