ETModel_Hotfix_Binding.cs 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Reflection;
  5. using System.Runtime.InteropServices;
  6. using ILRuntime.CLR.TypeSystem;
  7. using ILRuntime.CLR.Method;
  8. using ILRuntime.Runtime.Enviorment;
  9. using ILRuntime.Runtime.Intepreter;
  10. using ILRuntime.Runtime.Stack;
  11. using ILRuntime.Reflection;
  12. using ILRuntime.CLR.Utils;
  13. namespace ILRuntime.Runtime.Generated
  14. {
  15. unsafe class ETModel_Hotfix_Binding
  16. {
  17. public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
  18. {
  19. BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
  20. MethodBase method;
  21. FieldInfo field;
  22. Type[] args;
  23. Type type = typeof(ETModel.Hotfix);
  24. args = new Type[]{};
  25. method = type.GetMethod("GetHotfixTypes", flag, null, args, null);
  26. app.RegisterCLRMethodRedirection(method, GetHotfixTypes_0);
  27. field = type.GetField("Update", flag);
  28. app.RegisterCLRFieldGetter(field, get_Update_0);
  29. app.RegisterCLRFieldSetter(field, set_Update_0);
  30. field = type.GetField("LateUpdate", flag);
  31. app.RegisterCLRFieldGetter(field, get_LateUpdate_1);
  32. app.RegisterCLRFieldSetter(field, set_LateUpdate_1);
  33. field = type.GetField("OnApplicationQuit", flag);
  34. app.RegisterCLRFieldGetter(field, get_OnApplicationQuit_2);
  35. app.RegisterCLRFieldSetter(field, set_OnApplicationQuit_2);
  36. }
  37. static StackObject* GetHotfixTypes_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
  38. {
  39. ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
  40. StackObject* ptr_of_this_method;
  41. StackObject* __ret = ILIntepreter.Minus(__esp, 1);
  42. ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
  43. ETModel.Hotfix instance_of_this_method = (ETModel.Hotfix)typeof(ETModel.Hotfix).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
  44. __intp.Free(ptr_of_this_method);
  45. var result_of_this_method = instance_of_this_method.GetHotfixTypes();
  46. object obj_result_of_this_method = result_of_this_method;
  47. if(obj_result_of_this_method is CrossBindingAdaptorType)
  48. {
  49. return ILIntepreter.PushObject(__ret, __mStack, ((CrossBindingAdaptorType)obj_result_of_this_method).ILInstance);
  50. }
  51. return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
  52. }
  53. static object get_Update_0(ref object o)
  54. {
  55. return ((ETModel.Hotfix)o).Update;
  56. }
  57. static void set_Update_0(ref object o, object v)
  58. {
  59. ((ETModel.Hotfix)o).Update = (System.Action)v;
  60. }
  61. static object get_LateUpdate_1(ref object o)
  62. {
  63. return ((ETModel.Hotfix)o).LateUpdate;
  64. }
  65. static void set_LateUpdate_1(ref object o, object v)
  66. {
  67. ((ETModel.Hotfix)o).LateUpdate = (System.Action)v;
  68. }
  69. static object get_OnApplicationQuit_2(ref object o)
  70. {
  71. return ((ETModel.Hotfix)o).OnApplicationQuit;
  72. }
  73. static void set_OnApplicationQuit_2(ref object o, object v)
  74. {
  75. ((ETModel.Hotfix)o).OnApplicationQuit = (System.Action)v;
  76. }
  77. }
  78. }