using System; using System.Collections.Generic; using System.Linq; 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 Unity_Services_CloudSave_Internal_Http_IDeserializable_Binding { public static void Register(UnityFusion.Runtime.Enviorment.AppDomain app) { MethodBase method; Type[] args; Type type = typeof(Unity.Services.CloudSave.Internal.Http.IDeserializable); Dictionary> genericMethods = new Dictionary>(); List lst = null; foreach(var m in type.GetMethods()) { if(m.IsGenericMethodDefinition) { if (!genericMethods.TryGetValue(m.Name, out lst)) { lst = new List(); genericMethods[m.Name] = lst; } lst.Add(m); } } args = new Type[]{typeof(UnityFusion.Runtime.Intepreter.ILTypeInstance)}; if (genericMethods.TryGetValue("GetAs", out lst)) { foreach(var m in lst) { if(m.MatchGenericParameters(args, typeof(UnityFusion.Runtime.Intepreter.ILTypeInstance), typeof(Unity.Services.CloudSave.Internal.Http.DeserializationSettings))) { method = m.MakeGenericMethod(args); app.RegisterCLRMethodRedirection(method, GetAs_0); break; } } } } static StackObject* GetAs_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, 2); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); Unity.Services.CloudSave.Internal.Http.DeserializationSettings @deserializationSettings = (Unity.Services.CloudSave.Internal.Http.DeserializationSettings)typeof(Unity.Services.CloudSave.Internal.Http.DeserializationSettings).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); Unity.Services.CloudSave.Internal.Http.IDeserializable instance_of_this_method = (Unity.Services.CloudSave.Internal.Http.IDeserializable)typeof(Unity.Services.CloudSave.Internal.Http.IDeserializable).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.GetAs(@deserializationSettings); return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method); } } }