ETModel_Log_Binding.cs 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  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("Warning", flag, null, args, null);
  25. app.RegisterCLRMethodRedirection(method, Warning_0);
  26. args = new Type[]{typeof(System.String)};
  27. method = type.GetMethod("Info", flag, null, args, null);
  28. app.RegisterCLRMethodRedirection(method, Info_1);
  29. args = new Type[]{typeof(System.String)};
  30. method = type.GetMethod("Error", flag, null, args, null);
  31. app.RegisterCLRMethodRedirection(method, Error_2);
  32. args = new Type[]{typeof(System.String)};
  33. method = type.GetMethod("Debug", flag, null, args, null);
  34. app.RegisterCLRMethodRedirection(method, Debug_3);
  35. }
  36. static StackObject* Warning_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
  37. {
  38. ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
  39. StackObject* ptr_of_this_method;
  40. StackObject* __ret = ILIntepreter.Minus(__esp, 1);
  41. ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
  42. System.String @msg = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
  43. __intp.Free(ptr_of_this_method);
  44. ETModel.Log.Warning(@msg);
  45. return __ret;
  46. }
  47. static StackObject* Info_1(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
  48. {
  49. ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
  50. StackObject* ptr_of_this_method;
  51. StackObject* __ret = ILIntepreter.Minus(__esp, 1);
  52. ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
  53. System.String @msg = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
  54. __intp.Free(ptr_of_this_method);
  55. ETModel.Log.Info(@msg);
  56. return __ret;
  57. }
  58. static StackObject* Error_2(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
  59. {
  60. ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
  61. StackObject* ptr_of_this_method;
  62. StackObject* __ret = ILIntepreter.Minus(__esp, 1);
  63. ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
  64. System.String @msg = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
  65. __intp.Free(ptr_of_this_method);
  66. ETModel.Log.Error(@msg);
  67. return __ret;
  68. }
  69. static StackObject* Debug_3(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
  70. {
  71. ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
  72. StackObject* ptr_of_this_method;
  73. StackObject* __ret = ILIntepreter.Minus(__esp, 1);
  74. ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
  75. System.String @msg = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
  76. __intp.Free(ptr_of_this_method);
  77. ETModel.Log.Debug(@msg);
  78. return __ret;
  79. }
  80. }
  81. }