92 if (scopes.Length != 0)
124 return value.MethodBuilder;
316 if (writeMethod !=
null)
335 if (readMethod !=
null)
425 GenerateSupportedTypes(
types, typeBuilder);
452 return mapping.TypeDesc.CanBeElementValue;
static unsafe void Copy(Array sourceArray, Array destinationArray, int length)
bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
bool ICollection< KeyValuePair< TKey, TValue > >. Contains(KeyValuePair< TKey, TValue > keyValuePair)
void Add(TKey key, TValue value)
ConstructorBuilder DefineDefaultConstructor(MethodAttributes attributes)
static int DefineMethod(QCallModule module, int tkParent, string name, byte[] signature, int sigLength, MethodAttributes attributes)
TypeInfo? CreateTypeInfo()
static int DefineProperty(QCallModule module, int tkParent, string name, PropertyAttributes attributes, byte[] signature, int sigLength)
static readonly Type[] EmptyTypes
static string UnescapeName(string name)
void MarkLabel(Label label)
MethodBuilder MethodBuilder
void ConvertValue(Type source, Type target)
MethodBuilder EndMethod()
LocalBuilder DeclareLocal(Type type, string name)
void StoreMember(MemberInfo memberInfo)
void New(ConstructorInfo constructorInfo)
void BeginMethod(Type returnType, string methodName, Type[] argTypes, string[] argNames, MethodAttributes methodAttributes)
static TypeBuilder CreateTypeBuilder(ModuleBuilder moduleBuilder, string name, TypeAttributes attributes, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type parent, Type[] interfaces)
object GetVariable(string name)
ArgBuilder GetArg(string name)
Type LoadMember(object obj, MemberInfo memberInfo)
void Call(MethodInfo methodInfo)
void Stloc(Type type, string name)
void Ldstr(string strVar)
void Castclass(Type target)
void Ldloc(LocalBuilder localBuilder)
static string MakeValid(string identifier)
static string GetCSharpName(string name)
static string GetCSharpString(string value)
TypeDesc GetTypeDesc(string name, string ns)
ModuleBuilder _moduleBuilder
void ILGenLoad(string source)
void GenerateHashtableGetEnd(FieldBuilder fieldBuilder)
readonly TypeDesc _stringTypeDesc
static Regex NewRegex(string pattern)
void GenerateSupportedTypes(Type[] types, TypeBuilder serializerContractTypeBuilder)
void GenerateSerializerContract(string className, XmlMapping[] xmlMappings, Type[] types, string readerType, string[] readMethods, string writerType, string[] writerMethods, Dictionary< string, string > serializers)
readonly string _className
readonly TypeDesc _qnameTypeDesc
virtual void GenerateMethod(TypeMapping mapping)
readonly TypeAttributes _typeAttributes
XmlSerializationILGen(TypeScope[] scopes, string access, string className)
string ReferenceMapping(TypeMapping mapping)
string GenerateTypedSerializer(string readMethod, string writeMethod, XmlMapping mapping, CodeIdentifiers classes, string baseSerializer, string readerClass, string writerClass)
readonly Dictionary< string, MethodBuilderInfo > _methodBuilders
string GenerateBaseSerializer(string baseSerializer, string readerClass, string writerClass, CodeIdentifiers classes)
readonly HashSet< TypeMapping > _generatedMethods
static readonly Dictionary< string, Regex > s_regexs
ReflectionAwareILGen RaCodeGen
TypeMapping[] EnsureArrayIndex(TypeMapping[] a, int index)
FieldBuilder GeneratePublicMethods(string privateName, string publicName, string[] methods, XmlMapping[] xmlMappings, TypeBuilder serializerContractTypeBuilder)
MethodBuilder EnsureMethodBuilder(TypeBuilder typeBuilder, string methodName, MethodAttributes attributes, Type returnType, Type[] parameterTypes)
Dictionary< string, MemberInfo > memberInfos
static bool IsWildcard(SpecialMapping mapping)
void GenerateGetSerializer(Dictionary< string, string > serializers, XmlMapping[] xmlMappings, TypeBuilder serializerContractTypeBuilder)
FieldBuilder GenerateTypedSerializers(Dictionary< string, string > serializers, TypeBuilder serializerContractTypeBuilder)
readonly Dictionary< TypeMapping, string > _methodNames
FieldBuilder GenerateHashtableGetBegin(string privateName, string publicName, TypeBuilder serializerContractTypeBuilder)
TypeMapping[] _referencedMethods
readonly ReflectionAwareILGen _raCodeGen
MethodBuilderInfo GetMethodBuilder(string methodName)
string GetCSharpString(string value)
void ILGenLoad(string source, Type type)
Dictionary< TypeMapping, string > MethodNames
HashSet< TypeMapping > GeneratedMethods
readonly TypeScope[] _scopes
Dictionary< string, Type > CreatedTypes
void GenerateReferencedMethods()