static StackObject *LogError_12(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.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[] args = (System.Object[]) typeof(System.Object[]).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); __intp.Free(ptr_of_this_method); ptr_of_this_method = ILIntepreter.Minus(__esp, 2); System.String format = (System.String) typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); __intp.Free(ptr_of_this_method); ptr_of_this_method = ILIntepreter.Minus(__esp, 3); SGF.ILogTag obj = (SGF.ILogTag) typeof(SGF.ILogTag).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); __intp.Free(ptr_of_this_method); var stacktrace = __domain.DebugService.GetStackTrance(__intp); StackFrame frame = __intp.Stack.Frames.Peek(); var caller = obj.LOG_TAG + "::" + frame.Method.Name + "() "; SGF.Debuger.Internal_LogError(Prefix + caller + string.Format(format, args) + "\n" + stacktrace); return(__ret); }
public static void LaunchDebugService(ILRuntime.Runtime.Enviorment.AppDomain appdomain) { #if DEBUG && (UNITY_EDITOR || UNITY_ANDROID || UNITY_IPHONE) //由于Unity的Profiler接口只允许在主线程使用,为了避免出异常,需要告诉ILRuntime主线程的线程ID才能正确将函数运行耗时报告给Profiler appdomain.UnityMainThreadID = Thread.CurrentThread.ManagedThreadId; appdomain.DebugService.StartDebugService(56000); #endif }
public bool Init(ILRuntime.Runtime.Enviorment.AppDomain app) { if (app == null) { return(false); } App = app; return(true); }
public bool Init(ILRuntime.Runtime.Enviorment.AppDomain app, string type, string method) { if (app == null) { return(false); } TypeName = type; MethodName = method; App = app; return(true); }
/// <summary> /// GetComponent 的实现 /// </summary> /// <param name="__intp"></param> /// <param name="__esp"></param> /// <param name="__mStack"></param> /// <param name="__method"></param> /// <param name="isNewObj"></param> /// <returns></returns> /// <exception cref="NullReferenceException"></exception> unsafe static StackObject *GetComponent(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj) { //CLR重定向的说明请看相关文档和教程,这里不多做解释 ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; var ptr = __esp - 1; //成员方法的第一个参数为this GameObject instance = StackObject.ToObject(ptr, __domain, __mStack) as GameObject; if (instance == null) { throw new System.NullReferenceException(); } __intp.Free(ptr); var genericArgument = __method.GenericArguments; //AddComponent应该有且只有1个泛型参数 if (genericArgument != null && genericArgument.Length == 1) { var type = genericArgument[0]; object res = null; if (type is CLRType) { //Unity主工程的类不需要任何特殊处理,直接调用Unity接口 res = instance.GetComponent(type.TypeForCLR); } else { //因为所有DLL里面的MonoBehaviour实际都是这个Component,所以我们只能全取出来遍历查找 var clrInstances = instance.GetComponents <MonoBehaviourAdapter.Adaptor>(); for (int i = 0; i < clrInstances.Length; i++) { var clrInstance = clrInstances[i]; if (clrInstance.ILInstance != null)//ILInstance为null, 表示是无效的MonoBehaviour,要略过 { if (clrInstance.ILInstance.Type == type) { res = clrInstance.ILInstance;//交给ILRuntime的实例应该为ILInstance break; } } } } return(ILIntepreter.PushObject(ptr, __mStack, res)); } return(__esp); }
/// <summary> /// AddComponent 实现 /// </summary> /// <param name="__intp"></param> /// <param name="__esp"></param> /// <param name="__mStack"></param> /// <param name="__method"></param> /// <param name="isNewObj"></param> /// <returns></returns> /// <exception cref="NullReferenceException"></exception> unsafe static StackObject *AddComponent(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj) { //CLR重定向的说明请看相关文档和教程,这里不多做解释 ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; var ptr = __esp - 1; //成员方法的第一个参数为this GameObject instance = StackObject.ToObject(ptr, __domain, __mStack) as GameObject; if (instance == null) { throw new System.NullReferenceException(); } __intp.Free(ptr); var genericArgument = __method.GenericArguments; //AddComponent应该有且只有1个泛型参数 if (genericArgument != null && genericArgument.Length == 1) { var type = genericArgument[0]; object res; if (type is CLRType) { //Unity主工程的类不需要任何特殊处理,直接调用Unity接口 res = instance.AddComponent(type.TypeForCLR); } else { //热更DLL内的类型比较麻烦。首先我们得自己手动创建实例 var ilInstance = new ILTypeInstance(type as ILType, false);//手动创建实例是因为默认方式会new MonoBehaviour,这在Unity里不允许 //接下来创建Adapter实例 var clrInstance = instance.AddComponent <MonoBehaviourAdapter.Adaptor>(); //unity创建的实例并没有热更DLL里面的实例,所以需要手动赋值 clrInstance.ILInstance = ilInstance; clrInstance.AppDomain = __domain; //这个实例默认创建的CLRInstance不是通过AddComponent出来的有效实例,所以得手动替换 ilInstance.CLRInstance = clrInstance; res = clrInstance.ILInstance; //交给ILRuntime的实例应该为ILInstance clrInstance.Awake(); //因为Unity调用这个方法时还没准备好所以这里补调一次 } return(ILIntepreter.PushObject(ptr, __mStack, res)); } return(__esp); }
private unsafe StackObject *Set_Width(ILIntepreter intp, StackObject *esp, IList <object> mStack, CLRMethod method, bool isnewobj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = intp.AppDomain; var ret = ILIntepreter.Minus(esp, 2); var ptr = ILIntepreter.Minus(esp, 1); System.Single @value = *(float *)&ptr->Value; ptr = ILIntepreter.Minus(esp, 2); UnityEngine.Rect instance_of_this_method; ParseRect(out instance_of_this_method, intp, ptr, mStack); instance_of_this_method.width = @value; WriteBackValue(__domain, ptr, mStack, ref instance_of_this_method); return(ret); }
private unsafe StackObject *AddCompontent(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; var ptr = __esp - 1; GameObject instance = StackObject.ToObject(ptr, __domain, __mStack) as GameObject; if (instance == null) { throw new System.NullReferenceException(); } __intp.Free(ptr); var genericArgument = __method.GenericArguments; if (genericArgument != null && genericArgument.Length == 1) { var type = genericArgument[0]; object res; if (type is CLRType) //CLRType表示这个类型是Unity工程里的类型 //ILType表示是热更dll里面的类型 { //Unity主工程的类,不需要做处理 res = instance.AddComponent(type.TypeForCLR); } else { //创建出来MonoTest var ilInstance = new ILTypeInstance(type as ILType, false); var clrInstance = instance.AddComponent <MonoBehaviourAdapter.Adaptor>(); clrInstance.ILInstance = ilInstance; clrInstance.AppDomain = __domain; //这个实例默认创建的CLRInstance不是通过AddCompontent出来的有效实例,所以要替换 ilInstance.CLRInstance = clrInstance; res = clrInstance.ILInstance; //补掉Awake clrInstance.Awake(); } return(ILIntepreter.PushObject(ptr, __mStack, res)); } return(__esp); }
private unsafe StackObject *GetCompontent(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; var ptr = __esp - 1; GameObject instance = StackObject.ToObject(ptr, __domain, __mStack) as GameObject; if (instance == null) { throw new System.NullReferenceException(); } __intp.Free(ptr); var genericArgument = __method.GenericArguments; if (genericArgument != null && genericArgument.Length == 1) { var type = genericArgument[0]; object res = null; if (type is CLRType) { res = instance.GetComponent(type.TypeForCLR); } else { var clrInstances = instance.GetComponents <MonoBehaviourAdapter.Adaptor>(); foreach (var clrInstance in clrInstances) { if (clrInstance.ILInstance != null) { if (clrInstance.ILInstance.Type == type) { res = clrInstance.ILInstance; break; } } } } return(ILIntepreter.PushObject(ptr, __mStack, res)); } return(__esp); }
static StackObject *Log_1(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.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); System.String message = (System.String) typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); __intp.Free(ptr_of_this_method); StackFrame frame = __intp.Stack.Frames.Peek(); var caller = frame.Method.DeclearingType.Name + "::" + frame.Method.Name + "() "; SGF.Debuger.Internal_Log(Prefix + caller + message); return(__ret); }
public bool Init(string fileName) { _assemblyName = fileName; if (!File.Exists(_assemblyName)) { return(false); } using (var fs = new System.IO.FileStream(_assemblyName, System.IO.FileMode.Open, System.IO.FileAccess.Read)) { _app = new ILRuntime.Runtime.Enviorment.AppDomain(); var path = System.IO.Path.GetDirectoryName(_assemblyName); var name = System.IO.Path.GetFileNameWithoutExtension(_assemblyName); using (var fs2 = new System.IO.FileStream(string.Format("{0}\\{1}.pdb", path, name), System.IO.FileMode.Open)) _app.LoadAssembly(fs, fs2, new Mono.Cecil.Pdb.PdbReaderProvider()); } return(true); }
private unsafe StackObject *Set_Position(ILIntepreter intp, StackObject *esp, IList <object> mStack, CLRMethod method, bool isnewobj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = intp.AppDomain; var ret = ILIntepreter.Minus(esp, 2); var ptr = ILIntepreter.Minus(esp, 1); Vector2 @value = new Vector2(); Vector2Binder.ParseValue(ref @value, intp, ptr, mStack); ptr = ILIntepreter.Minus(esp, 2); UnityEngine.Rect instance_of_this_method; ParseRect(out instance_of_this_method, intp, ptr, mStack); instance_of_this_method.position = @value; WriteBackValue(__domain, ptr, mStack, ref instance_of_this_method); return(ret); }
public static void RegisterCrossBindingAdaptor(ILRuntime.Runtime.Enviorment.AppDomain appdomain) { appdomain.RegisterCrossBindingAdaptor(new MonoBehaviourAdapter()); appdomain.RegisterCrossBindingAdaptor(new CoroutineAdapter()); // appdomain.RegisterCrossBindingAdaptor(new UIControllerILRObjectAdapter()); // appdomain.RegisterCrossBindingAdaptor(new LogicILRObjectAdaptor()); appdomain.RegisterCrossBindingAdaptor(new DynamicMonoILRObjectAdaptor()); // appdomain.RegisterCrossBindingAdaptor(new DataLookupILRObjectAdapter()); appdomain.RegisterCrossBindingAdaptor(new SparxAPIAdapter()); // appdomain.RegisterCrossBindingAdaptor(new GameEventAdapter()); // appdomain.RegisterCrossBindingAdaptor(new IComparableAdapter()); // appdomain.RegisterCrossBindingAdaptor(new IComparerAdapter()); // appdomain.RegisterCrossBindingAdaptor(new IEqualityComparerAdapter()); // appdomain.RegisterCrossBindingAdaptor(new IEqualityComparerIComparableAdapter()); // appdomain.RegisterCrossBindingAdaptor(new IEqualityComparerInt32Adapter()); // appdomain.RegisterCrossBindingAdaptor(new TableAdapter()); // appdomain.RegisterCrossBindingAdaptor(new EventNameAdapter()); appdomain.RegisterCrossBindingAdaptor(new ILRuntime.Runtime.GeneratedAdapter.IEnumerable_1_ILTypeInstanceAdapter()); appdomain.RegisterCrossBindingAdaptor(new ILRuntime.Runtime.GeneratedAdapter.IEnumerator_1_ILTypeInstanceAdapter()); ILRuntime.Runtime.GeneratedAdapter.CrossBindings.Initialize(appdomain); }
public static void InitILRuntime(ILRuntime.Runtime.Enviorment.AppDomain appdomain) { // 注册跨域继承适配器 RegisterCrossBindingAdaptor(appdomain); // 注册重定向函数 RegisterILRuntimeCLRRedirection(appdomain); // 注册委托 RegisterMethodDelegate(appdomain); RegisterFunctionDelegate(appdomain); RegisterDelegateConvertor(appdomain); // 注册值类型绑定 RegisterValueTypeBinder(appdomain); //////////////////////////////////// // CLR绑定的注册,一定要记得将CLR绑定的注册写在CLR重定向的注册后面,因为同一个方法只能被重定向一次,只有先注册的那个才能生效 //////////////////////////////////// Type t = Type.GetType("ILRuntime.Runtime.Generated.CLRBindings"); if (t != null) { t.GetMethod("Initialize")?.Invoke(null, new object[] { appdomain }); } }
public override object CreateCLRInstance(ILRuntime.Runtime.Enviorment.AppDomain appdomain, ILTypeInstance instance) { return(new Adaptor(appdomain, instance));//创建一个新的实例 }
public Adapter(ILRuntime.Runtime.Enviorment.AppDomain appdomain, ILTypeInstance instance) { this.appdomain = appdomain; this.instance = instance; }
public static void InitializeILRuntime(ILRuntime.Runtime.Enviorment.AppDomain appdomain) { //这里做一些ILRuntime的注册 //RegisterCrossBindingAdaptor HotfixILRManager.RegisterCrossBindingAdaptor(appdomain); // value type register appdomain.RegisterValueTypeBinder(typeof(UnityEngine.Vector2), new Vector2Binder()); appdomain.RegisterValueTypeBinder(typeof(UnityEngine.Vector3), new Vector3Binder()); appdomain.RegisterValueTypeBinder(typeof(UnityEngine.Quaternion), new QuaternionBinder()); //DelegateManager.RegisterMethodDelegate appdomain.DelegateManager.RegisterMethodDelegate <Hashtable>(); appdomain.DelegateManager.RegisterMethodDelegate <int[]>(); appdomain.DelegateManager.RegisterMethodDelegate <bool>(); appdomain.DelegateManager.RegisterMethodDelegate <string, string>(); appdomain.DelegateManager.RegisterMethodDelegate <string, int>(); appdomain.DelegateManager.RegisterMethodDelegate <string, int, int>(); appdomain.DelegateManager.RegisterMethodDelegate <GameObject>(); appdomain.DelegateManager.RegisterMethodDelegate <Transform>(); appdomain.DelegateManager.RegisterMethodDelegate <System.Int32>(); appdomain.DelegateManager.RegisterMethodDelegate <GameEvent>(); appdomain.DelegateManager.RegisterMethodDelegate <System.Boolean>(); appdomain.DelegateManager.RegisterMethodDelegate <System.Collections.Generic.KeyValuePair <UIEventTrigger, System.Int32> >(); appdomain.DelegateManager.RegisterMethodDelegate <ILRuntime.Runtime.Intepreter.ILTypeInstance>(); appdomain.DelegateManager.RegisterMethodDelegate <UnityEngine.Object, System.Object>(); appdomain.DelegateManager.RegisterMethodDelegate <EB.Sparx.ChatMessage[]>(); appdomain.DelegateManager.RegisterMethodDelegate <UnityEngine.GameObject, UnityEngine.Vector2>(); appdomain.DelegateManager.RegisterMethodDelegate <System.Collections.Generic.List <EB.Sparx.ChatMessage> >(); appdomain.DelegateManager.RegisterMethodDelegate <UnityEngine.GameObject, System.Boolean>(); appdomain.DelegateManager.RegisterMethodDelegate <System.Int64>(); appdomain.DelegateManager.RegisterMethodDelegate <System.String>(); appdomain.DelegateManager.RegisterMethodDelegate <UIPanel>(); appdomain.DelegateManager.RegisterMethodDelegate <UnityEngine.Texture>(); appdomain.DelegateManager.RegisterMethodDelegate <System.Int32, System.Object>(); appdomain.DelegateManager.RegisterMethodDelegate <EB.Sparx.Response>(); appdomain.DelegateManager.RegisterMethodDelegate <DynamicMonoILRObjectAdaptor.Adaptor>(); appdomain.DelegateManager.RegisterMethodDelegate <System.String, System.String, System.String, System.String>(); appdomain.DelegateManager.RegisterMethodDelegate <System.String, System.Object>(); appdomain.DelegateManager.RegisterMethodDelegate <System.Object>(); appdomain.DelegateManager.RegisterMethodDelegate <System.String, System.Int32>(); appdomain.DelegateManager.RegisterMethodDelegate <System.Int32, System.Boolean>(); appdomain.DelegateManager.RegisterMethodDelegate <System.Int64, System.Action <System.Int64> >(); appdomain.DelegateManager.RegisterMethodDelegate <EB.Sparx.LevelRewardsStatus>(); appdomain.DelegateManager.RegisterMethodDelegate <System.Boolean, System.Boolean>(); appdomain.DelegateManager.RegisterMethodDelegate <System.String, System.Object, System.Boolean>(); appdomain.DelegateManager.RegisterMethodDelegate <string, object, bool>(); appdomain.DelegateManager.RegisterMethodDelegate <ILRuntime.Runtime.Intepreter.ILTypeInstance, UnityEngine.Transform>(); appdomain.DelegateManager.RegisterMethodDelegate <System.Action>(); appdomain.DelegateManager.RegisterMethodDelegate <EB.IAP.Item, EB.IAP.Transaction>(); appdomain.DelegateManager.RegisterMethodDelegate <System.Int32, System.Action <EB.Sparx.Response> >(); appdomain.DelegateManager.RegisterMethodDelegate <ILRuntime.Runtime.GeneratedAdapter.GameEventAdapter.Adapter>(); appdomain.DelegateManager.RegisterMethodDelegate <System.Int64, System.Int32>(); appdomain.DelegateManager.RegisterMethodDelegate <System.Int64, System.Int64>(); appdomain.DelegateManager.RegisterMethodDelegate <System.String, System.Collections.Hashtable>(); appdomain.DelegateManager.RegisterMethodDelegate <System.Int32, System.Int32>(); appdomain.DelegateManager.RegisterMethodDelegate <SceneRootEntry>(); appdomain.DelegateManager.RegisterMethodDelegate <System.Boolean, System.String[]>(); appdomain.DelegateManager.RegisterMethodDelegate <UnityEngine.GameObject, UnityEngine.GameObject>(); appdomain.DelegateManager.RegisterMethodDelegate <UISprite>(); appdomain.DelegateManager.RegisterMethodDelegate <System.String, UnityEngine.GameObject, System.Boolean>(); appdomain.DelegateManager.RegisterMethodDelegate <UIController>(); appdomain.DelegateManager.RegisterMethodDelegate <System.Object, ILRuntime.Runtime.Intepreter.ILTypeInstance>(); appdomain.DelegateManager.RegisterMethodDelegate <System.Single>(); appdomain.DelegateManager.RegisterMethodDelegate <UnityEngine.Object>(); appdomain.DelegateManager.RegisterMethodDelegate <TouchStartEvent>(); appdomain.DelegateManager.RegisterMethodDelegate <TouchEndEvent>(); appdomain.DelegateManager.RegisterMethodDelegate <EnemyController, System.Int32>(); appdomain.DelegateManager.RegisterMethodDelegate <UnityEngine.Vector3>(); appdomain.DelegateManager.RegisterMethodDelegate <System.Int32, System.Int32, System.Boolean>(); appdomain.DelegateManager.RegisterMethodDelegate <System.Nullable <System.Int32> >(); appdomain.DelegateManager.RegisterMethodDelegate <System.Nullable <UnityEngine.Vector3> >(); appdomain.DelegateManager.RegisterMethodDelegate <EB.Sparx.Game, EB.Sparx.Player>(); appdomain.DelegateManager.RegisterMethodDelegate <global::TouchUpdateEvent>(); appdomain.DelegateManager.RegisterMethodDelegate <global::TapEvent>(); appdomain.DelegateManager.RegisterMethodDelegate <global::DoubleTapEvent>(); appdomain.DelegateManager.RegisterMethodDelegate <global::TwoFingerTouchStartEvent>(); appdomain.DelegateManager.RegisterMethodDelegate <global::TwoFingerTouchUpdateEvent>(); appdomain.DelegateManager.RegisterMethodDelegate <global::TwoFingerTouchEndEvent>(); appdomain.DelegateManager.RegisterMethodDelegate <UnityEngine.Vector3, System.Boolean>(); appdomain.DelegateManager.RegisterMethodDelegate <System.String, System.String, System.Object>(); appdomain.DelegateManager.RegisterMethodDelegate <global::eGameState>(); appdomain.DelegateManager.RegisterMethodDelegate <System.String, System.ArraySegment <System.Byte> >(); appdomain.DelegateManager.RegisterMethodDelegate <FlatBuffers.ByteBuffer>(); appdomain.DelegateManager.RegisterMethodDelegate <EB.Sparx.Authenticator[]>(); appdomain.DelegateManager.RegisterMethodDelegate <System.Boolean, System.String>(); appdomain.DelegateManager.RegisterMethodDelegate <EB.Sparx.Authenticator>(); appdomain.DelegateManager.RegisterMethodDelegate <EB.Sparx.Authenticator, ILRuntime.Runtime.Intepreter.ILTypeInstance>(); appdomain.DelegateManager.RegisterMethodDelegate <System.String, System.Boolean>(); appdomain.DelegateManager.RegisterMethodDelegate <global::LevelStartEvent>(); appdomain.DelegateManager.RegisterMethodDelegate <UnityEngine.GameObject, UnityEngine.KeyCode>(); appdomain.DelegateManager.RegisterMethodDelegate <UnityEngine.ParticleSystem>(); appdomain.DelegateManager.RegisterMethodDelegate <Hotfix_LT.Combat.Combatant>(); appdomain.DelegateManager.RegisterMethodDelegate <Hotfix_LT.Combat.CombatHitDamageEvent>(); appdomain.DelegateManager.RegisterMethodDelegate <Hotfix_LT.Combat.CombatDamageEvent>(); appdomain.DelegateManager.RegisterMethodDelegate <Hotfix_LT.Combat.CombatHealEvent>(); appdomain.DelegateManager.RegisterMethodDelegate <global::eUIDialogueButtons, global::UIDialogeOption>(); appdomain.DelegateManager.RegisterMethodDelegate <string, UnityEngine.U2D.SpriteAtlas, bool>(); appdomain.DelegateManager.RegisterMethodDelegate <string, UnityEngine.Texture2D, bool>(); #region For JohnyAction appdomain.DelegateManager.RegisterMethodDelegate <Johny.Action.ActionAlphaChange.FinishStatus>(); appdomain.DelegateManager.RegisterMethodDelegate <Johny.Action.ActionCellBornMove.FinishStatus>(); appdomain.DelegateManager.RegisterMethodDelegate <Johny.Action.ActionCellStampDown.FinishStatus>(); appdomain.DelegateManager.RegisterMethodDelegate <Johny.Action.ActionCellUpAndDownLoop.FinishStatus>(); appdomain.DelegateManager.RegisterMethodDelegate <Johny.Action.ActionModelRotation.FinishStatus>(); appdomain.DelegateManager.RegisterMethodDelegate <Johny.Action.ActionGeneralParticle.FinishStatus>(); #endregion //DelegateManager.RegisterFunctionDelegate appdomain.DelegateManager.RegisterFunctionDelegate <EB.Sparx.Response, bool>(); appdomain.DelegateManager.RegisterFunctionDelegate <UITabController.TabLibEntry, bool>(); appdomain.DelegateManager.RegisterFunctionDelegate <ILRuntime.Runtime.Intepreter.ILTypeInstance, System.Boolean>(); appdomain.DelegateManager.RegisterFunctionDelegate <System.Boolean>(); appdomain.DelegateManager.RegisterFunctionDelegate <EB.IAP.Item, EB.IAP.Item, System.Int32>(); appdomain.DelegateManager.RegisterFunctionDelegate <EB.Sparx.ChatMessage, System.Boolean>(); appdomain.DelegateManager.RegisterFunctionDelegate <System.Collections.DictionaryEntry, System.Boolean>(); appdomain.DelegateManager.RegisterFunctionDelegate <System.Collections.DictionaryEntry, System.Collections.DictionaryEntry, System.Int32>(); appdomain.DelegateManager.RegisterFunctionDelegate <ILRuntime.Runtime.Intepreter.ILTypeInstance, ILRuntime.Runtime.Intepreter.ILTypeInstance, System.Int32>(); appdomain.DelegateManager.RegisterFunctionDelegate <EB.Sparx.Response, EB.Sparx.eResponseCode, System.Boolean>(); appdomain.DelegateManager.RegisterFunctionDelegate <System.String, System.Boolean>(); appdomain.DelegateManager.RegisterFunctionDelegate <System.Object, System.Int32>(); appdomain.DelegateManager.RegisterFunctionDelegate <DynamicMonoILRObjectAdaptor.Adaptor, System.Boolean>(); appdomain.DelegateManager.RegisterFunctionDelegate <EB.Sparx.User, System.Boolean>(); appdomain.DelegateManager.RegisterFunctionDelegate <ParticleSystemUIComponent, System.Boolean>(); appdomain.DelegateManager.RegisterFunctionDelegate <System.Int32, System.Boolean>(); appdomain.DelegateManager.RegisterFunctionDelegate <System.Int32, System.Int32, System.Int32>(); appdomain.DelegateManager.RegisterFunctionDelegate <System.Int32, System.Int32, System.Boolean>(); appdomain.DelegateManager.RegisterFunctionDelegate <System.Int32, System.Int32, System.String>(); appdomain.DelegateManager.RegisterFunctionDelegate <System.Boolean>(); appdomain.DelegateManager.RegisterFunctionDelegate <System.Int32>(); appdomain.DelegateManager.RegisterFunctionDelegate <System.Int32, System.String>(); appdomain.DelegateManager.RegisterFunctionDelegate <System.Int32, System.Object>(); appdomain.DelegateManager.RegisterFunctionDelegate <System.String, System.String, System.Int32>(); appdomain.DelegateManager.RegisterFunctionDelegate <EB.Sparx.ChatMessage, EB.Sparx.ChatMessage, System.Int32>(); appdomain.DelegateManager.RegisterFunctionDelegate <System.String, System.Int32>(); appdomain.DelegateManager.RegisterFunctionDelegate <System.Collections.DictionaryEntry, System.Int32>(); appdomain.DelegateManager.RegisterFunctionDelegate <System.Text.RegularExpressions.Match, System.String>(); appdomain.DelegateManager.RegisterFunctionDelegate <System.Collections.Generic.KeyValuePair <System.Int32, ILRuntime.Runtime.Intepreter.ILTypeInstance>, System.Int32>(); appdomain.DelegateManager.RegisterFunctionDelegate <System.Collections.Generic.KeyValuePair <System.Int32, ILRuntime.Runtime.Intepreter.ILTypeInstance>, ILRuntime.Runtime.Intepreter.ILTypeInstance>(); appdomain.DelegateManager.RegisterFunctionDelegate <System.Collections.Generic.KeyValuePair <System.String, ILRuntime.Runtime.Intepreter.ILTypeInstance>, System.Collections.Generic.KeyValuePair <System.String, ILRuntime.Runtime.Intepreter.ILTypeInstance>, System.Int32>(); appdomain.DelegateManager.RegisterFunctionDelegate <ILRuntime.Runtime.Intepreter.ILTypeInstance, System.Int32>(); appdomain.DelegateManager.RegisterFunctionDelegate <ILRuntime.Runtime.Intepreter.ILTypeInstance, System.String>(); appdomain.DelegateManager.RegisterFunctionDelegate <System.String, System.Single>(); // appdomain.DelegateManager.RegisterFunctionDelegate<System.Collections.Generic.List<global::ObjectManager.ManagedInstance>, System.Collections.IDictionary, global::ObjectManager.ManagedInstance>(); appdomain.DelegateManager.RegisterFunctionDelegate <System.Object, System.Int32, ILRuntime.Runtime.Intepreter.ILTypeInstance>(); appdomain.DelegateManager.RegisterFunctionDelegate <EB.Sparx.MHAuthenticator.UserInfo, System.Boolean>(); appdomain.DelegateManager.RegisterFunctionDelegate <Hotfix_LT.Combat.CombatCharacterSyncData, System.Boolean>(); appdomain.DelegateManager.RegisterFunctionDelegate <UnityEngine.Transform, UnityEngine.Transform, System.Int32>(); appdomain.DelegateManager.RegisterDelegateConvertor <EventDelegate.Callback>((action) => { return(new EventDelegate.Callback(() => { ((System.Action)action)(); })); }); appdomain.DelegateManager.RegisterDelegateConvertor <UICenterOnChild.OnCenterCallback>((act) => { return(new UICenterOnChild.OnCenterCallback((centeredObject) => { ((System.Action <GameObject>)act)(centeredObject); })); }); appdomain.DelegateManager.RegisterDelegateConvertor <System.Predicate <UITabController.TabLibEntry> >((act) => { return(new System.Predicate <UITabController.TabLibEntry>((obj) => { return ((Func <UITabController.TabLibEntry, bool>)act)(obj); })); }); appdomain.DelegateManager.RegisterDelegateConvertor <System.Predicate <ILRuntime.Runtime.Intepreter.ILTypeInstance> >((act) => { return(new System.Predicate <ILRuntime.Runtime.Intepreter.ILTypeInstance>((obj) => { return ((Func <ILRuntime.Runtime.Intepreter.ILTypeInstance, System.Boolean>)act)(obj); })); }); appdomain.DelegateManager.RegisterDelegateConvertor <UIEventListener.VoidDelegate>((act) => { return(new UIEventListener.VoidDelegate((go) => { ((Action <UnityEngine.GameObject>)act)(go); })); }); appdomain.DelegateManager.RegisterDelegateConvertor <System.Comparison <EB.IAP.Item> >((act) => { return(new System.Comparison <EB.IAP.Item>((x, y) => { return ((Func <EB.IAP.Item, EB.IAP.Item, System.Int32>)act)(x, y); })); }); appdomain.DelegateManager.RegisterDelegateConvertor <UIEventListener.VectorDelegate>((act) => { return(new UIEventListener.VectorDelegate((go, delta) => { ((Action <UnityEngine.GameObject, UnityEngine.Vector2>)act)(go, delta); })); }); appdomain.DelegateManager.RegisterDelegateConvertor <UIEventListener.BoolDelegate>((act) => { return(new UIEventListener.BoolDelegate((go, state) => { ((Action <UnityEngine.GameObject, System.Boolean>)act)(go, state); })); }); appdomain.DelegateManager.RegisterDelegateConvertor <System.Predicate <EB.Sparx.ChatMessage> >((act) => { return(new System.Predicate <EB.Sparx.ChatMessage>((obj) => { return ((Func <EB.Sparx.ChatMessage, System.Boolean>)act)(obj); })); }); appdomain.DelegateManager.RegisterDelegateConvertor <UITable.OnReposition>((act) => { return(new UITable.OnReposition(() => { ((Action)act)(); })); }); appdomain.DelegateManager.RegisterDelegateConvertor <System.Comparison <System.Collections.DictionaryEntry> >((act) => { return(new System.Comparison <System.Collections.DictionaryEntry>((x, y) => { return ((Func <System.Collections.DictionaryEntry, System.Collections.DictionaryEntry, System.Int32>)act)(x, y); })); }); appdomain.DelegateManager.RegisterDelegateConvertor <System.Comparison <ILRuntime.Runtime.Intepreter.ILTypeInstance> >((act) => { return(new System.Comparison <ILRuntime.Runtime.Intepreter.ILTypeInstance>((x, y) => { return ((Func <ILRuntime.Runtime.Intepreter.ILTypeInstance, ILRuntime.Runtime.Intepreter.ILTypeInstance, System.Int32>)act)(x, y); })); }); appdomain.DelegateManager.RegisterDelegateConvertor <UIPanel.OnClippingMoved>((act) => { return(new UIPanel.OnClippingMoved((panel) => { ((Action <UIPanel>)act)(panel); })); }); appdomain.DelegateManager.RegisterDelegateConvertor <global::GaussianBlurRT.Callback>((act) => { return(new global::GaussianBlurRT.Callback((tex) => { ((Action <UnityEngine.Texture>)act)(tex); })); }); appdomain.DelegateManager.RegisterDelegateConvertor <System.Predicate <System.String> >((act) => { return(new System.Predicate <System.String>((obj) => { return ((Func <System.String, System.Boolean>)act)(obj); })); }); appdomain.DelegateManager.RegisterDelegateConvertor <System.Predicate <DynamicMonoILRObjectAdaptor.Adaptor> >((act) => { return(new System.Predicate <DynamicMonoILRObjectAdaptor.Adaptor>((obj) => { return ((Func <DynamicMonoILRObjectAdaptor.Adaptor, System.Boolean>)act)(obj); })); }); appdomain.DelegateManager.RegisterDelegateConvertor <System.Predicate <EB.Sparx.User> >((act) => { return(new System.Predicate <EB.Sparx.User>((obj) => { return ((Func <EB.Sparx.User, System.Boolean>)act)(obj); })); }); appdomain.DelegateManager.RegisterDelegateConvertor <EB.Sparx.LevelRewardsManager.LevelRewardsChangeDel>((act) => { return(new EB.Sparx.LevelRewardsManager.LevelRewardsChangeDel((status) => { ((Action <EB.Sparx.LevelRewardsStatus>)act)(status); })); }); appdomain.DelegateManager.RegisterDelegateConvertor <System.Predicate <ParticleSystemUIComponent> >((act) => { return(new System.Predicate <ParticleSystemUIComponent>((obj) => { return ((Func <ParticleSystemUIComponent, System.Boolean>)act)(obj); })); }); appdomain.DelegateManager.RegisterDelegateConvertor <SceneRootEntry.Begin>((act) => { return(new SceneRootEntry.Begin(() => { ((Action)act)(); })); }); appdomain.DelegateManager.RegisterDelegateConvertor <SceneRootEntry.Failed>((act) => { return(new SceneRootEntry.Failed(() => { ((Action)act)(); })); }); appdomain.DelegateManager.RegisterDelegateConvertor <SceneRootEntry.Loading>((act) => { return(new SceneRootEntry.Loading((int loaded, int total) => { ((Action <int, int>)act)(loaded, total); })); }); appdomain.DelegateManager.RegisterDelegateConvertor <SceneRootEntry.Finished>((act) => { return(new SceneRootEntry.Finished((SceneRootEntry entry) => { ((Action <SceneRootEntry>)act)(entry); })); }); appdomain.DelegateManager.RegisterDelegateConvertor <HudLoadManager.HudLoadComplete>((act) => { return(new HudLoadManager.HudLoadComplete((NoError, Show) => { ((Action <System.Boolean, System.String[]>)act)(NoError, Show); })); }); appdomain.DelegateManager.RegisterDelegateConvertor <System.Comparison <System.String> >((act) => { return(new System.Comparison <System.String>((x, y) => { return ((Func <System.String, System.String, System.Int32>)act)(x, y); })); }); appdomain.DelegateManager.RegisterDelegateConvertor <System.Comparison <EB.Sparx.ChatMessage> >((act) => { return(new System.Comparison <EB.Sparx.ChatMessage>((x, y) => { return ((Func <EB.Sparx.ChatMessage, EB.Sparx.ChatMessage, System.Int32>)act)(x, y); })); }); appdomain.DelegateManager.RegisterDelegateConvertor <System.Text.RegularExpressions.MatchEvaluator>((act) => { return(new System.Text.RegularExpressions.MatchEvaluator((match) => { return ((Func <System.Text.RegularExpressions.Match, System.String>)act)(match); })); }); appdomain.DelegateManager.RegisterDelegateConvertor <System.Comparison <System.Int32> >((act) => { return(new System.Comparison <System.Int32>((x, y) => { return ((Func <System.Int32, System.Int32, System.Int32>)act)(x, y); })); }); appdomain.DelegateManager.RegisterDelegateConvertor <System.EventHandler <ILRuntime.Runtime.Intepreter.ILTypeInstance> >((act) => { return(new System.EventHandler <ILRuntime.Runtime.Intepreter.ILTypeInstance>((sender, e) => { ((Action <System.Object, ILRuntime.Runtime.Intepreter.ILTypeInstance>)act)(sender, e); })); }); appdomain.DelegateManager.RegisterDelegateConvertor <EventManager.EventDelegate <ILRuntime.Runtime.GeneratedAdapter.GameEventAdapter.Adapter> >((act) => { return(new EventManager.EventDelegate <ILRuntime.Runtime.GeneratedAdapter.GameEventAdapter.Adapter>((e) => { ((Action <ILRuntime.Runtime.GeneratedAdapter.GameEventAdapter.Adapter>)act)(e); })); }); appdomain.DelegateManager.RegisterDelegateConvertor <EventManager.EventDelegate <TouchStartEvent> >((act) => { return(new EventManager.EventDelegate <TouchStartEvent>((e) => { ((Action <TouchStartEvent>)act)(e); })); }); appdomain.DelegateManager.RegisterDelegateConvertor <EventManager.EventDelegate <TouchEndEvent> >((act) => { return(new EventManager.EventDelegate <TouchEndEvent>((e) => { ((Action <TouchEndEvent>)act)(e); })); }); appdomain.DelegateManager.RegisterDelegateConvertor <System.Comparison <System.Collections.Generic.KeyValuePair <System.String, ILRuntime.Runtime.Intepreter.ILTypeInstance> > >((act) => { return(new System.Comparison <System.Collections.Generic.KeyValuePair <System.String, ILRuntime.Runtime.Intepreter.ILTypeInstance> >((x, y) => { return ((Func <System.Collections.Generic.KeyValuePair <System.String, ILRuntime.Runtime.Intepreter.ILTypeInstance>, System.Collections.Generic.KeyValuePair <System.String, ILRuntime.Runtime.Intepreter.ILTypeInstance>, System.Int32>)act)(x, y); })); }); appdomain.DelegateManager.RegisterDelegateConvertor <global::CharacterTargetingComponent.MovementTargetChangeRequestEventHandler>((act) => { return(new global::CharacterTargetingComponent.MovementTargetChangeRequestEventHandler((requestedTarget, isNull) => { ((Action <UnityEngine.Vector3, bool>)act)(requestedTarget, isNull); })); }); appdomain.DelegateManager.RegisterDelegateConvertor <global::CharacterTargetingComponent.AttackTargetChangedEventHandler>((act) => { return(new global::CharacterTargetingComponent.AttackTargetChangedEventHandler((newAttackTarget) => { ((Action <UnityEngine.GameObject>)act)(newAttackTarget); })); }); appdomain.DelegateManager.RegisterDelegateConvertor <global::GameListenerFusion.PlayerLeftHandler>((act) => { return(new global::GameListenerFusion.PlayerLeftHandler((game, player) => { ((Action <EB.Sparx.Game, EB.Sparx.Player>)act)(game, player); })); }); appdomain.DelegateManager.RegisterDelegateConvertor <global::EventManager.EventDelegate <global::TouchUpdateEvent> >((act) => { return(new global::EventManager.EventDelegate <global::TouchUpdateEvent>((e) => { ((Action <global::TouchUpdateEvent>)act)(e); })); }); appdomain.DelegateManager.RegisterDelegateConvertor <global::EventManager.EventDelegate <global::TapEvent> >((act) => { return(new global::EventManager.EventDelegate <global::TapEvent>((e) => { ((Action <global::TapEvent>)act)(e); })); }); appdomain.DelegateManager.RegisterDelegateConvertor <global::EventManager.EventDelegate <global::DoubleTapEvent> >((act) => { return(new global::EventManager.EventDelegate <global::DoubleTapEvent>((e) => { ((Action <global::DoubleTapEvent>)act)(e); })); }); appdomain.DelegateManager.RegisterDelegateConvertor <global::EventManager.EventDelegate <global::TwoFingerTouchStartEvent> >((act) => { return(new global::EventManager.EventDelegate <global::TwoFingerTouchStartEvent>((e) => { ((Action <global::TwoFingerTouchStartEvent>)act)(e); })); }); appdomain.DelegateManager.RegisterDelegateConvertor <global::EventManager.EventDelegate <global::TwoFingerTouchEndEvent> >((act) => { return(new global::EventManager.EventDelegate <global::TwoFingerTouchEndEvent>((e) => { ((Action <global::TwoFingerTouchEndEvent>)act)(e); })); }); appdomain.DelegateManager.RegisterDelegateConvertor <global::EventManager.EventDelegate <global::TwoFingerTouchUpdateEvent> >((act) => { return(new global::EventManager.EventDelegate <global::TwoFingerTouchUpdateEvent>((e) => { ((Action <global::TwoFingerTouchUpdateEvent>)act)(e); })); }); appdomain.DelegateManager.RegisterDelegateConvertor <EB.Sparx.DataCacheManager.OnFlatBuffersDataCacheUpdated>((act) => { return(new EB.Sparx.DataCacheManager.OnFlatBuffersDataCacheUpdated((name, buffer) => { ((Action <System.String, System.ArraySegment <System.Byte> >)act)(name, buffer); })); }); appdomain.DelegateManager.RegisterDelegateConvertor <global::EventManager.EventDelegate <global::LevelStartEvent> >((act) => { return(new global::EventManager.EventDelegate <global::LevelStartEvent>((e) => { ((Action <global::LevelStartEvent>)act)(e); })); }); appdomain.DelegateManager.RegisterDelegateConvertor <global::UIEventListener.KeyCodeDelegate>((act) => { return(new global::UIEventListener.KeyCodeDelegate((go, key) => { ((Action <UnityEngine.GameObject, UnityEngine.KeyCode>)act)(go, key); })); }); appdomain.DelegateManager.RegisterDelegateConvertor <System.Predicate <EB.Sparx.MHAuthenticator.UserInfo> >((act) => { return(new System.Predicate <EB.Sparx.MHAuthenticator.UserInfo>((obj) => { return ((Func <EB.Sparx.MHAuthenticator.UserInfo, System.Boolean>)act)(obj); })); }); appdomain.DelegateManager.RegisterDelegateConvertor <global::CTimer.OnTimeUpHandler>((act) => { return(new global::CTimer.OnTimeUpHandler((timerSequence) => { ((Action <System.Int32>)act)(timerSequence); })); }); appdomain.DelegateManager.RegisterDelegateConvertor <Hotfix_LT.UI.LTCombatEventReceiver.CombatantCallbackVoid>((act) => { return(new Hotfix_LT.UI.LTCombatEventReceiver.CombatantCallbackVoid((combatant) => { ((Action <Hotfix_LT.Combat.Combatant>)act)(combatant); })); }); appdomain.DelegateManager.RegisterDelegateConvertor <System.Predicate <Hotfix_LT.Combat.CombatCharacterSyncData> >((act) => { return(new System.Predicate <Hotfix_LT.Combat.CombatCharacterSyncData>((obj) => { return ((Func <Hotfix_LT.Combat.CombatCharacterSyncData, System.Boolean>)act)(obj); })); }); appdomain.DelegateManager.RegisterDelegateConvertor <global::OnUIDialogueButtonClick>((act) => { return(new global::OnUIDialogueButtonClick((button, option) => { ((Action <global::eUIDialogueButtons, global::UIDialogeOption>)act)(button, option); })); }); appdomain.DelegateManager.RegisterDelegateConvertor <DG.Tweening.TweenCallback>((act) => { return(new DG.Tweening.TweenCallback(() => { ((Action)act)(); })); }); appdomain.DelegateManager.RegisterDelegateConvertor <System.Comparison <UnityEngine.Transform> >((act) => { return(new System.Comparison <UnityEngine.Transform>((x, y) => { return ((Func <UnityEngine.Transform, UnityEngine.Transform, System.Int32>)act)(x, y); })); }); appdomain.DelegateManager.RegisterDelegateConvertor <DG.Tweening.Core.DOSetter <System.Single> >((act) => { return(new DG.Tweening.Core.DOSetter <System.Single>((pNewValue) => { ((Action <System.Single>)act)(pNewValue); })); }); //这个必须要!!! ILRuntime.Runtime.Generated.CLRBindings.Initialize(appdomain); }
public Adaptor(ILRuntime.Runtime.Enviorment.AppDomain appdomain, ILTypeInstance instance) { m_appdomain = appdomain; ILInstance = instance; }
public override object CreateCLRInstance(ILRuntime.Runtime.Enviorment.AppDomain appdomain, ILTypeInstance instance) { return(new MyContentPage(appdomain, instance)); }
public Adaptor(AppDomain appdomain, ILTypeInstance instance) { this.instance = instance; this.appdomain = appdomain; }