#if FUSION2 && XRMOD_INSTALL using System; using System.Collections.Generic; using System.Reflection; using System.Runtime.InteropServices; using UnityFusion.CLR.TypeSystem; using UnityFusion.CLR.Method; using UnityFusion.Runtime.Enviorment; using UnityFusion.Runtime.Intepreter; using UnityFusion.Runtime.Stack; using UnityFusion.Reflection; using UnityFusion.CLR.Utils; #if DEBUG && !DISABLE_UNITYFUSION_DEBUG using AutoList = System.Collections.Generic.List; #else using AutoList = UnityFusion.Other.UncheckedList; #endif namespace UnityFusion.Runtime.Generated { unsafe class EPPZ_Persistence_JSONSerializer_Binding { public static void Register(UnityFusion.Runtime.Enviorment.AppDomain app) { BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly; MethodBase method; FieldInfo field; Type[] args; Type type = typeof(EPPZ.Persistence.JSONSerializer); args = new Type[]{}; method = type.GetMethod("Pretty", flag, null, args, null); app.RegisterCLRMethodRedirection(method, Pretty_0); args = new Type[]{}; method = type.GetMethod("Default", flag, null, args, null); app.RegisterCLRMethodRedirection(method, Default_1); args = new Type[]{typeof(System.String), typeof(System.Object)}; method = type.GetMethod("ApplyStringTo", flag, null, args, null); app.RegisterCLRMethodRedirection(method, ApplyStringTo_2); args = new Type[]{typeof(System.String), typeof(System.Object)}; method = type.GetMethod("ApplyFileTo", flag, null, args, null); app.RegisterCLRMethodRedirection(method, ApplyFileTo_3); args = new Type[]{typeof(System.String), typeof(System.Object)}; method = type.GetMethod("ApplyResourceTo", flag, null, args, null); app.RegisterCLRMethodRedirection(method, ApplyResourceTo_4); args = new Type[]{}; method = type.GetMethod("get_FileExtensions", flag, null, args, null); app.RegisterCLRMethodRedirection(method, get_FileExtensions_5); args = new Type[]{typeof(System.Object)}; method = type.GetMethod("SerializeObjectToString", flag, null, args, null); app.RegisterCLRMethodRedirection(method, SerializeObjectToString_6); args = new Type[]{typeof(System.String), typeof(System.Object)}; method = type.GetMethod("ApplyDeserializedStringToObject", flag, null, args, null); app.RegisterCLRMethodRedirection(method, ApplyDeserializedStringToObject_7); args = new Type[]{typeof(System.Object), typeof(System.String)}; method = type.GetMethod("SerializeObjectToFile", flag, null, args, null); app.RegisterCLRMethodRedirection(method, SerializeObjectToFile_8); args = new Type[]{typeof(System.String), typeof(System.Object)}; method = type.GetMethod("ApplyDeserializedFileToObject", flag, null, args, null); app.RegisterCLRMethodRedirection(method, ApplyDeserializedFileToObject_9); args = new Type[]{typeof(System.String), typeof(System.Object)}; method = type.GetMethod("ApplyDeserializedResourceToObject", flag, null, args, null); app.RegisterCLRMethodRedirection(method, ApplyDeserializedResourceToObject_10); field = type.GetField("mode", flag); app.RegisterCLRFieldGetter(field, get_mode_0); app.RegisterCLRFieldSetter(field, set_mode_0); app.RegisterCLRFieldBinding(field, CopyToStack_mode_0, AssignFromStack_mode_0); app.RegisterCLRCreateDefaultInstance(type, () => new EPPZ.Persistence.JSONSerializer()); app.RegisterCLRCreateArrayInstance(type, s => new EPPZ.Persistence.JSONSerializer[s]); args = new Type[]{}; method = type.GetConstructor(flag, null, args, null); app.RegisterCLRMethodRedirection(method, Ctor_0); } static StackObject* Pretty_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { UnityFusion.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; StackObject* __ret = ILIntepreter.Minus(__esp, 1); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); EPPZ.Persistence.JSONSerializer instance_of_this_method = (EPPZ.Persistence.JSONSerializer)typeof(EPPZ.Persistence.JSONSerializer).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0); __intp.Free(ptr_of_this_method); var result_of_this_method = instance_of_this_method.Pretty(); object obj_result_of_this_method = result_of_this_method; if(obj_result_of_this_method is CrossBindingAdaptorType) { return ILIntepreter.PushObject(__ret, __mStack, ((CrossBindingAdaptorType)obj_result_of_this_method).ILInstance); } return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } static StackObject* Default_1(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { UnityFusion.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; StackObject* __ret = ILIntepreter.Minus(__esp, 1); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); EPPZ.Persistence.JSONSerializer instance_of_this_method = (EPPZ.Persistence.JSONSerializer)typeof(EPPZ.Persistence.JSONSerializer).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0); __intp.Free(ptr_of_this_method); var result_of_this_method = instance_of_this_method.Default(); object obj_result_of_this_method = result_of_this_method; if(obj_result_of_this_method is CrossBindingAdaptorType) { return ILIntepreter.PushObject(__ret, __mStack, ((CrossBindingAdaptorType)obj_result_of_this_method).ILInstance); } return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } static StackObject* ApplyStringTo_2(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { UnityFusion.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; StackObject* __ret = ILIntepreter.Minus(__esp, 3); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); System.Object @_object = (System.Object)typeof(System.Object).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0); __intp.Free(ptr_of_this_method); ptr_of_this_method = ILIntepreter.Minus(__esp, 2); System.String @_string = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0); __intp.Free(ptr_of_this_method); ptr_of_this_method = ILIntepreter.Minus(__esp, 3); EPPZ.Persistence.JSONSerializer instance_of_this_method = (EPPZ.Persistence.JSONSerializer)typeof(EPPZ.Persistence.JSONSerializer).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0); __intp.Free(ptr_of_this_method); instance_of_this_method.ApplyStringTo(@_string, @_object); return __ret; } static StackObject* ApplyFileTo_3(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { UnityFusion.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; StackObject* __ret = ILIntepreter.Minus(__esp, 3); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); System.Object @_object = (System.Object)typeof(System.Object).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0); __intp.Free(ptr_of_this_method); ptr_of_this_method = ILIntepreter.Minus(__esp, 2); System.String @filePath = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0); __intp.Free(ptr_of_this_method); ptr_of_this_method = ILIntepreter.Minus(__esp, 3); EPPZ.Persistence.JSONSerializer instance_of_this_method = (EPPZ.Persistence.JSONSerializer)typeof(EPPZ.Persistence.JSONSerializer).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0); __intp.Free(ptr_of_this_method); instance_of_this_method.ApplyFileTo(@filePath, @_object); return __ret; } static StackObject* ApplyResourceTo_4(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { UnityFusion.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; StackObject* __ret = ILIntepreter.Minus(__esp, 3); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); System.Object @_object = (System.Object)typeof(System.Object).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0); __intp.Free(ptr_of_this_method); ptr_of_this_method = ILIntepreter.Minus(__esp, 2); System.String @resourcePath = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0); __intp.Free(ptr_of_this_method); ptr_of_this_method = ILIntepreter.Minus(__esp, 3); EPPZ.Persistence.JSONSerializer instance_of_this_method = (EPPZ.Persistence.JSONSerializer)typeof(EPPZ.Persistence.JSONSerializer).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0); __intp.Free(ptr_of_this_method); instance_of_this_method.ApplyResourceTo(@resourcePath, @_object); return __ret; } static StackObject* get_FileExtensions_5(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { UnityFusion.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; StackObject* __ret = ILIntepreter.Minus(__esp, 1); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); EPPZ.Persistence.JSONSerializer instance_of_this_method = (EPPZ.Persistence.JSONSerializer)typeof(EPPZ.Persistence.JSONSerializer).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0); __intp.Free(ptr_of_this_method); var result_of_this_method = instance_of_this_method.FileExtensions; return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } static StackObject* SerializeObjectToString_6(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { UnityFusion.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; StackObject* __ret = ILIntepreter.Minus(__esp, 2); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); System.Object @_object = (System.Object)typeof(System.Object).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0); __intp.Free(ptr_of_this_method); ptr_of_this_method = ILIntepreter.Minus(__esp, 2); EPPZ.Persistence.JSONSerializer instance_of_this_method = (EPPZ.Persistence.JSONSerializer)typeof(EPPZ.Persistence.JSONSerializer).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0); __intp.Free(ptr_of_this_method); var result_of_this_method = instance_of_this_method.SerializeObjectToString(@_object); return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } static StackObject* ApplyDeserializedStringToObject_7(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { UnityFusion.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; StackObject* __ret = ILIntepreter.Minus(__esp, 3); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); System.Object @_object = (System.Object)typeof(System.Object).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0); __intp.Free(ptr_of_this_method); ptr_of_this_method = ILIntepreter.Minus(__esp, 2); System.String @_string = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0); __intp.Free(ptr_of_this_method); ptr_of_this_method = ILIntepreter.Minus(__esp, 3); EPPZ.Persistence.JSONSerializer instance_of_this_method = (EPPZ.Persistence.JSONSerializer)typeof(EPPZ.Persistence.JSONSerializer).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0); __intp.Free(ptr_of_this_method); instance_of_this_method.ApplyDeserializedStringToObject(@_string, @_object); return __ret; } static StackObject* SerializeObjectToFile_8(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { UnityFusion.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; StackObject* __ret = ILIntepreter.Minus(__esp, 3); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); System.String @filePath = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0); __intp.Free(ptr_of_this_method); ptr_of_this_method = ILIntepreter.Minus(__esp, 2); System.Object @_object = (System.Object)typeof(System.Object).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0); __intp.Free(ptr_of_this_method); ptr_of_this_method = ILIntepreter.Minus(__esp, 3); EPPZ.Persistence.JSONSerializer instance_of_this_method = (EPPZ.Persistence.JSONSerializer)typeof(EPPZ.Persistence.JSONSerializer).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0); __intp.Free(ptr_of_this_method); instance_of_this_method.SerializeObjectToFile(@_object, @filePath); return __ret; } static StackObject* ApplyDeserializedFileToObject_9(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { UnityFusion.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; StackObject* __ret = ILIntepreter.Minus(__esp, 3); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); System.Object @_object = (System.Object)typeof(System.Object).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0); __intp.Free(ptr_of_this_method); ptr_of_this_method = ILIntepreter.Minus(__esp, 2); System.String @filePath = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0); __intp.Free(ptr_of_this_method); ptr_of_this_method = ILIntepreter.Minus(__esp, 3); EPPZ.Persistence.JSONSerializer instance_of_this_method = (EPPZ.Persistence.JSONSerializer)typeof(EPPZ.Persistence.JSONSerializer).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0); __intp.Free(ptr_of_this_method); instance_of_this_method.ApplyDeserializedFileToObject(@filePath, @_object); return __ret; } static StackObject* ApplyDeserializedResourceToObject_10(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { UnityFusion.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* ptr_of_this_method; StackObject* __ret = ILIntepreter.Minus(__esp, 3); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); System.Object @_object = (System.Object)typeof(System.Object).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0); __intp.Free(ptr_of_this_method); ptr_of_this_method = ILIntepreter.Minus(__esp, 2); System.String @resourcePath = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0); __intp.Free(ptr_of_this_method); ptr_of_this_method = ILIntepreter.Minus(__esp, 3); EPPZ.Persistence.JSONSerializer instance_of_this_method = (EPPZ.Persistence.JSONSerializer)typeof(EPPZ.Persistence.JSONSerializer).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0); __intp.Free(ptr_of_this_method); instance_of_this_method.ApplyDeserializedResourceToObject(@resourcePath, @_object); return __ret; } static object get_mode_0(ref object o) { return ((EPPZ.Persistence.JSONSerializer)o).mode; } static StackObject* CopyToStack_mode_0(ref object o, ILIntepreter __intp, StackObject* __ret, AutoList __mStack) { var result_of_this_method = ((EPPZ.Persistence.JSONSerializer)o).mode; return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } static void set_mode_0(ref object o, object v) { ((EPPZ.Persistence.JSONSerializer)o).mode = (EPPZ.Persistence.JSONSerializer.Mode)v; } static StackObject* AssignFromStack_mode_0(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, AutoList __mStack) { UnityFusion.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; EPPZ.Persistence.JSONSerializer.Mode @mode = (EPPZ.Persistence.JSONSerializer.Mode)typeof(EPPZ.Persistence.JSONSerializer.Mode).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)20); ((EPPZ.Persistence.JSONSerializer)o).mode = @mode; return ptr_of_this_method; } static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, AutoList __mStack, CLRMethod __method, bool isNewObj) { UnityFusion.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject* __ret = ILIntepreter.Minus(__esp, 0); var result_of_this_method = new EPPZ.Persistence.JSONSerializer(); return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } } } #endif