FairyGUI_EventContext_Binding.cs 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  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 FairyGUI_EventContext_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(FairyGUI.EventContext);
  24. args = new Type[]{};
  25. method = type.GetMethod("get_sender", flag, null, args, null);
  26. app.RegisterCLRMethodRedirection(method, get_sender_0);
  27. args = new Type[]{};
  28. method = type.GetMethod("CaptureTouch", flag, null, args, null);
  29. app.RegisterCLRMethodRedirection(method, CaptureTouch_1);
  30. field = type.GetField("data", flag);
  31. app.RegisterCLRFieldGetter(field, get_data_0);
  32. app.RegisterCLRFieldSetter(field, set_data_0);
  33. app.RegisterCLRFieldBinding(field, CopyToStack_data_0, AssignFromStack_data_0);
  34. }
  35. static StackObject* get_sender_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
  36. {
  37. ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
  38. StackObject* ptr_of_this_method;
  39. StackObject* __ret = ILIntepreter.Minus(__esp, 1);
  40. ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
  41. FairyGUI.EventContext instance_of_this_method = (FairyGUI.EventContext)typeof(FairyGUI.EventContext).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
  42. __intp.Free(ptr_of_this_method);
  43. var result_of_this_method = instance_of_this_method.sender;
  44. return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
  45. }
  46. static StackObject* CaptureTouch_1(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
  47. {
  48. ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
  49. StackObject* ptr_of_this_method;
  50. StackObject* __ret = ILIntepreter.Minus(__esp, 1);
  51. ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
  52. FairyGUI.EventContext instance_of_this_method = (FairyGUI.EventContext)typeof(FairyGUI.EventContext).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
  53. __intp.Free(ptr_of_this_method);
  54. instance_of_this_method.CaptureTouch();
  55. return __ret;
  56. }
  57. static object get_data_0(ref object o)
  58. {
  59. return ((FairyGUI.EventContext)o).data;
  60. }
  61. static StackObject* CopyToStack_data_0(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
  62. {
  63. var result_of_this_method = ((FairyGUI.EventContext)o).data;
  64. object obj_result_of_this_method = result_of_this_method;
  65. if(obj_result_of_this_method is CrossBindingAdaptorType)
  66. {
  67. return ILIntepreter.PushObject(__ret, __mStack, ((CrossBindingAdaptorType)obj_result_of_this_method).ILInstance, true);
  68. }
  69. return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method, true);
  70. }
  71. static void set_data_0(ref object o, object v)
  72. {
  73. ((FairyGUI.EventContext)o).data = (System.Object)v;
  74. }
  75. static StackObject* AssignFromStack_data_0(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
  76. {
  77. ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
  78. System.Object @data = (System.Object)typeof(System.Object).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
  79. ((FairyGUI.EventContext)o).data = @data;
  80. return ptr_of_this_method;
  81. }
  82. }
  83. }