ETModel_Log_Binding.cs 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266
  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_Log_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(ETModel.Log);
  23. args = new Type[]{typeof(System.String)};
  24. method = type.GetMethod("Trace", flag, null, args, null);
  25. app.RegisterCLRMethodRedirection(method, Trace_0);
  26. args = new Type[]{typeof(System.String), typeof(System.Object[])};
  27. method = type.GetMethod("Trace", flag, null, args, null);
  28. app.RegisterCLRMethodRedirection(method, Trace_1);
  29. args = new Type[]{typeof(System.String)};
  30. method = type.GetMethod("Warning", flag, null, args, null);
  31. app.RegisterCLRMethodRedirection(method, Warning_2);
  32. args = new Type[]{typeof(System.String), typeof(System.Object[])};
  33. method = type.GetMethod("Warning", flag, null, args, null);
  34. app.RegisterCLRMethodRedirection(method, Warning_3);
  35. args = new Type[]{typeof(System.String)};
  36. method = type.GetMethod("Info", flag, null, args, null);
  37. app.RegisterCLRMethodRedirection(method, Info_4);
  38. args = new Type[]{typeof(System.String), typeof(System.Object[])};
  39. method = type.GetMethod("Info", flag, null, args, null);
  40. app.RegisterCLRMethodRedirection(method, Info_5);
  41. args = new Type[]{typeof(System.String)};
  42. method = type.GetMethod("Error", flag, null, args, null);
  43. app.RegisterCLRMethodRedirection(method, Error_6);
  44. args = new Type[]{typeof(System.String), typeof(System.Object[])};
  45. method = type.GetMethod("Error", flag, null, args, null);
  46. app.RegisterCLRMethodRedirection(method, Error_7);
  47. args = new Type[]{typeof(System.String)};
  48. method = type.GetMethod("Debug", flag, null, args, null);
  49. app.RegisterCLRMethodRedirection(method, Debug_8);
  50. args = new Type[]{typeof(System.String), typeof(System.Object[])};
  51. method = type.GetMethod("Debug", flag, null, args, null);
  52. app.RegisterCLRMethodRedirection(method, Debug_9);
  53. args = new Type[]{typeof(System.String), typeof(System.Object[])};
  54. method = type.GetMethod("Fatal", flag, null, args, null);
  55. app.RegisterCLRMethodRedirection(method, Fatal_10);
  56. }
  57. static StackObject* Trace_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
  58. {
  59. ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
  60. StackObject* ptr_of_this_method;
  61. StackObject* __ret = ILIntepreter.Minus(__esp, 1);
  62. ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
  63. System.String @msg = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
  64. __intp.Free(ptr_of_this_method);
  65. ETModel.Log.Trace(@msg);
  66. return __ret;
  67. }
  68. static StackObject* Trace_1(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
  69. {
  70. ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
  71. StackObject* ptr_of_this_method;
  72. StackObject* __ret = ILIntepreter.Minus(__esp, 2);
  73. ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
  74. System.Object[] @args = (System.Object[])typeof(System.Object[]).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
  75. __intp.Free(ptr_of_this_method);
  76. ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
  77. System.String @message = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
  78. __intp.Free(ptr_of_this_method);
  79. ETModel.Log.Trace(@message, @args);
  80. return __ret;
  81. }
  82. static StackObject* Warning_2(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
  83. {
  84. ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
  85. StackObject* ptr_of_this_method;
  86. StackObject* __ret = ILIntepreter.Minus(__esp, 1);
  87. ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
  88. System.String @msg = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
  89. __intp.Free(ptr_of_this_method);
  90. ETModel.Log.Warning(@msg);
  91. return __ret;
  92. }
  93. static StackObject* Warning_3(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
  94. {
  95. ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
  96. StackObject* ptr_of_this_method;
  97. StackObject* __ret = ILIntepreter.Minus(__esp, 2);
  98. ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
  99. System.Object[] @args = (System.Object[])typeof(System.Object[]).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
  100. __intp.Free(ptr_of_this_method);
  101. ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
  102. System.String @message = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
  103. __intp.Free(ptr_of_this_method);
  104. ETModel.Log.Warning(@message, @args);
  105. return __ret;
  106. }
  107. static StackObject* Info_4(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
  108. {
  109. ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
  110. StackObject* ptr_of_this_method;
  111. StackObject* __ret = ILIntepreter.Minus(__esp, 1);
  112. ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
  113. System.String @msg = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
  114. __intp.Free(ptr_of_this_method);
  115. ETModel.Log.Info(@msg);
  116. return __ret;
  117. }
  118. static StackObject* Info_5(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
  119. {
  120. ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
  121. StackObject* ptr_of_this_method;
  122. StackObject* __ret = ILIntepreter.Minus(__esp, 2);
  123. ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
  124. System.Object[] @args = (System.Object[])typeof(System.Object[]).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
  125. __intp.Free(ptr_of_this_method);
  126. ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
  127. System.String @message = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
  128. __intp.Free(ptr_of_this_method);
  129. ETModel.Log.Info(@message, @args);
  130. return __ret;
  131. }
  132. static StackObject* Error_6(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
  133. {
  134. ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
  135. StackObject* ptr_of_this_method;
  136. StackObject* __ret = ILIntepreter.Minus(__esp, 1);
  137. ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
  138. System.String @msg = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
  139. __intp.Free(ptr_of_this_method);
  140. ETModel.Log.Error(@msg);
  141. return __ret;
  142. }
  143. static StackObject* Error_7(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
  144. {
  145. ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
  146. StackObject* ptr_of_this_method;
  147. StackObject* __ret = ILIntepreter.Minus(__esp, 2);
  148. ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
  149. System.Object[] @args = (System.Object[])typeof(System.Object[]).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
  150. __intp.Free(ptr_of_this_method);
  151. ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
  152. System.String @message = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
  153. __intp.Free(ptr_of_this_method);
  154. ETModel.Log.Error(@message, @args);
  155. return __ret;
  156. }
  157. static StackObject* Debug_8(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
  158. {
  159. ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
  160. StackObject* ptr_of_this_method;
  161. StackObject* __ret = ILIntepreter.Minus(__esp, 1);
  162. ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
  163. System.String @msg = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
  164. __intp.Free(ptr_of_this_method);
  165. ETModel.Log.Debug(@msg);
  166. return __ret;
  167. }
  168. static StackObject* Debug_9(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
  169. {
  170. ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
  171. StackObject* ptr_of_this_method;
  172. StackObject* __ret = ILIntepreter.Minus(__esp, 2);
  173. ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
  174. System.Object[] @args = (System.Object[])typeof(System.Object[]).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
  175. __intp.Free(ptr_of_this_method);
  176. ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
  177. System.String @message = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
  178. __intp.Free(ptr_of_this_method);
  179. ETModel.Log.Debug(@message, @args);
  180. return __ret;
  181. }
  182. static StackObject* Fatal_10(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
  183. {
  184. ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
  185. StackObject* ptr_of_this_method;
  186. StackObject* __ret = ILIntepreter.Minus(__esp, 2);
  187. ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
  188. System.Object[] @args = (System.Object[])typeof(System.Object[]).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
  189. __intp.Free(ptr_of_this_method);
  190. ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
  191. System.String @message = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
  192. __intp.Free(ptr_of_this_method);
  193. ETModel.Log.Fatal(@message, @args);
  194. return __ret;
  195. }
  196. }
  197. }