FairyGUI_EventDispatcher_Binding.cs 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
  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_EventDispatcher_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. Type[] args;
  22. Type type = typeof(FairyGUI.EventDispatcher);
  23. args = new Type[]{typeof(System.String), typeof(FairyGUI.EventCallback0)};
  24. method = type.GetMethod("AddEventListener", flag, null, args, null);
  25. app.RegisterCLRMethodRedirection(method, AddEventListener_0);
  26. args = new Type[]{typeof(System.String), typeof(FairyGUI.EventCallback1)};
  27. method = type.GetMethod("AddEventListener", flag, null, args, null);
  28. app.RegisterCLRMethodRedirection(method, AddEventListener_1);
  29. args = new Type[]{typeof(System.String), typeof(FairyGUI.EventCallback1)};
  30. method = type.GetMethod("RemoveEventListener", flag, null, args, null);
  31. app.RegisterCLRMethodRedirection(method, RemoveEventListener_2);
  32. args = new Type[]{typeof(System.String), typeof(FairyGUI.EventCallback0)};
  33. method = type.GetMethod("RemoveEventListener", flag, null, args, null);
  34. app.RegisterCLRMethodRedirection(method, RemoveEventListener_3);
  35. args = new Type[]{typeof(System.String)};
  36. method = type.GetMethod("DispatchEvent", flag, null, args, null);
  37. app.RegisterCLRMethodRedirection(method, DispatchEvent_4);
  38. args = new Type[]{typeof(System.String), typeof(System.Object)};
  39. method = type.GetMethod("DispatchEvent", flag, null, args, null);
  40. app.RegisterCLRMethodRedirection(method, DispatchEvent_5);
  41. args = new Type[]{};
  42. method = type.GetConstructor(flag, null, args, null);
  43. app.RegisterCLRMethodRedirection(method, Ctor_0);
  44. }
  45. static StackObject* AddEventListener_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
  46. {
  47. ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
  48. StackObject* ptr_of_this_method;
  49. StackObject* __ret = ILIntepreter.Minus(__esp, 3);
  50. ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
  51. FairyGUI.EventCallback0 @callback = (FairyGUI.EventCallback0)typeof(FairyGUI.EventCallback0).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
  52. __intp.Free(ptr_of_this_method);
  53. ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
  54. System.String @strType = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
  55. __intp.Free(ptr_of_this_method);
  56. ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
  57. FairyGUI.EventDispatcher instance_of_this_method = (FairyGUI.EventDispatcher)typeof(FairyGUI.EventDispatcher).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
  58. __intp.Free(ptr_of_this_method);
  59. instance_of_this_method.AddEventListener(@strType, @callback);
  60. return __ret;
  61. }
  62. static StackObject* AddEventListener_1(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
  63. {
  64. ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
  65. StackObject* ptr_of_this_method;
  66. StackObject* __ret = ILIntepreter.Minus(__esp, 3);
  67. ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
  68. FairyGUI.EventCallback1 @callback = (FairyGUI.EventCallback1)typeof(FairyGUI.EventCallback1).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
  69. __intp.Free(ptr_of_this_method);
  70. ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
  71. System.String @strType = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
  72. __intp.Free(ptr_of_this_method);
  73. ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
  74. FairyGUI.EventDispatcher instance_of_this_method = (FairyGUI.EventDispatcher)typeof(FairyGUI.EventDispatcher).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
  75. __intp.Free(ptr_of_this_method);
  76. instance_of_this_method.AddEventListener(@strType, @callback);
  77. return __ret;
  78. }
  79. static StackObject* RemoveEventListener_2(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
  80. {
  81. ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
  82. StackObject* ptr_of_this_method;
  83. StackObject* __ret = ILIntepreter.Minus(__esp, 3);
  84. ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
  85. FairyGUI.EventCallback1 @callback = (FairyGUI.EventCallback1)typeof(FairyGUI.EventCallback1).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
  86. __intp.Free(ptr_of_this_method);
  87. ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
  88. System.String @strType = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
  89. __intp.Free(ptr_of_this_method);
  90. ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
  91. FairyGUI.EventDispatcher instance_of_this_method = (FairyGUI.EventDispatcher)typeof(FairyGUI.EventDispatcher).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
  92. __intp.Free(ptr_of_this_method);
  93. instance_of_this_method.RemoveEventListener(@strType, @callback);
  94. return __ret;
  95. }
  96. static StackObject* RemoveEventListener_3(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
  97. {
  98. ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
  99. StackObject* ptr_of_this_method;
  100. StackObject* __ret = ILIntepreter.Minus(__esp, 3);
  101. ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
  102. FairyGUI.EventCallback0 @callback = (FairyGUI.EventCallback0)typeof(FairyGUI.EventCallback0).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
  103. __intp.Free(ptr_of_this_method);
  104. ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
  105. System.String @strType = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
  106. __intp.Free(ptr_of_this_method);
  107. ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
  108. FairyGUI.EventDispatcher instance_of_this_method = (FairyGUI.EventDispatcher)typeof(FairyGUI.EventDispatcher).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
  109. __intp.Free(ptr_of_this_method);
  110. instance_of_this_method.RemoveEventListener(@strType, @callback);
  111. return __ret;
  112. }
  113. static StackObject* DispatchEvent_4(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
  114. {
  115. ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
  116. StackObject* ptr_of_this_method;
  117. StackObject* __ret = ILIntepreter.Minus(__esp, 2);
  118. ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
  119. System.String @strType = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
  120. __intp.Free(ptr_of_this_method);
  121. ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
  122. FairyGUI.EventDispatcher instance_of_this_method = (FairyGUI.EventDispatcher)typeof(FairyGUI.EventDispatcher).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
  123. __intp.Free(ptr_of_this_method);
  124. var result_of_this_method = instance_of_this_method.DispatchEvent(@strType);
  125. __ret->ObjectType = ObjectTypes.Integer;
  126. __ret->Value = result_of_this_method ? 1 : 0;
  127. return __ret + 1;
  128. }
  129. static StackObject* DispatchEvent_5(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
  130. {
  131. ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
  132. StackObject* ptr_of_this_method;
  133. StackObject* __ret = ILIntepreter.Minus(__esp, 3);
  134. ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
  135. System.Object @data = (System.Object)typeof(System.Object).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
  136. __intp.Free(ptr_of_this_method);
  137. ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
  138. System.String @strType = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
  139. __intp.Free(ptr_of_this_method);
  140. ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
  141. FairyGUI.EventDispatcher instance_of_this_method = (FairyGUI.EventDispatcher)typeof(FairyGUI.EventDispatcher).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
  142. __intp.Free(ptr_of_this_method);
  143. var result_of_this_method = instance_of_this_method.DispatchEvent(@strType, @data);
  144. __ret->ObjectType = ObjectTypes.Integer;
  145. __ret->Value = result_of_this_method ? 1 : 0;
  146. return __ret + 1;
  147. }
  148. static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
  149. {
  150. ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
  151. StackObject* __ret = ILIntepreter.Minus(__esp, 0);
  152. var result_of_this_method = new FairyGUI.EventDispatcher();
  153. return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
  154. }
  155. }
  156. }