ETModel_Session_Binding.cs 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  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_Session_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.Session);
  23. args = new Type[]{typeof(ETModel.IRequest)};
  24. method = type.GetMethod("Call", flag, null, args, null);
  25. app.RegisterCLRMethodRedirection(method, Call_0);
  26. args = new Type[]{typeof(ETModel.IMessage)};
  27. method = type.GetMethod("Send", flag, null, args, null);
  28. app.RegisterCLRMethodRedirection(method, Send_1);
  29. args = new Type[]{};
  30. method = type.GetMethod("get_Error", flag, null, args, null);
  31. app.RegisterCLRMethodRedirection(method, get_Error_2);
  32. args = new Type[]{};
  33. method = type.GetMethod("get_Network", flag, null, args, null);
  34. app.RegisterCLRMethodRedirection(method, get_Network_3);
  35. args = new Type[]{typeof(System.Byte), typeof(System.UInt16), typeof(System.Object)};
  36. method = type.GetMethod("Send", flag, null, args, null);
  37. app.RegisterCLRMethodRedirection(method, Send_4);
  38. }
  39. static StackObject* Call_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
  40. {
  41. ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
  42. StackObject* ptr_of_this_method;
  43. StackObject* __ret = ILIntepreter.Minus(__esp, 2);
  44. ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
  45. ETModel.IRequest @request = (ETModel.IRequest)typeof(ETModel.IRequest).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
  46. __intp.Free(ptr_of_this_method);
  47. ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
  48. ETModel.Session instance_of_this_method = (ETModel.Session)typeof(ETModel.Session).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
  49. __intp.Free(ptr_of_this_method);
  50. var result_of_this_method = instance_of_this_method.Call(@request);
  51. object obj_result_of_this_method = result_of_this_method;
  52. if(obj_result_of_this_method is CrossBindingAdaptorType)
  53. {
  54. return ILIntepreter.PushObject(__ret, __mStack, ((CrossBindingAdaptorType)obj_result_of_this_method).ILInstance);
  55. }
  56. return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
  57. }
  58. static StackObject* Send_1(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, 2);
  63. ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
  64. ETModel.IMessage @message = (ETModel.IMessage)typeof(ETModel.IMessage).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
  65. __intp.Free(ptr_of_this_method);
  66. ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
  67. ETModel.Session instance_of_this_method = (ETModel.Session)typeof(ETModel.Session).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
  68. __intp.Free(ptr_of_this_method);
  69. instance_of_this_method.Send(@message);
  70. return __ret;
  71. }
  72. static StackObject* get_Error_2(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
  73. {
  74. ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
  75. StackObject* ptr_of_this_method;
  76. StackObject* __ret = ILIntepreter.Minus(__esp, 1);
  77. ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
  78. ETModel.Session instance_of_this_method = (ETModel.Session)typeof(ETModel.Session).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
  79. __intp.Free(ptr_of_this_method);
  80. var result_of_this_method = instance_of_this_method.Error;
  81. __ret->ObjectType = ObjectTypes.Integer;
  82. __ret->Value = result_of_this_method;
  83. return __ret + 1;
  84. }
  85. static StackObject* get_Network_3(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
  86. {
  87. ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
  88. StackObject* ptr_of_this_method;
  89. StackObject* __ret = ILIntepreter.Minus(__esp, 1);
  90. ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
  91. ETModel.Session instance_of_this_method = (ETModel.Session)typeof(ETModel.Session).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
  92. __intp.Free(ptr_of_this_method);
  93. var result_of_this_method = instance_of_this_method.Network;
  94. object obj_result_of_this_method = result_of_this_method;
  95. if(obj_result_of_this_method is CrossBindingAdaptorType)
  96. {
  97. return ILIntepreter.PushObject(__ret, __mStack, ((CrossBindingAdaptorType)obj_result_of_this_method).ILInstance);
  98. }
  99. return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
  100. }
  101. static StackObject* Send_4(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
  102. {
  103. ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
  104. StackObject* ptr_of_this_method;
  105. StackObject* __ret = ILIntepreter.Minus(__esp, 4);
  106. ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
  107. System.Object @message = (System.Object)typeof(System.Object).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
  108. __intp.Free(ptr_of_this_method);
  109. ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
  110. System.UInt16 @opcode = (ushort)ptr_of_this_method->Value;
  111. ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
  112. System.Byte @flag = (byte)ptr_of_this_method->Value;
  113. ptr_of_this_method = ILIntepreter.Minus(__esp, 4);
  114. ETModel.Session instance_of_this_method = (ETModel.Session)typeof(ETModel.Session).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
  115. __intp.Free(ptr_of_this_method);
  116. instance_of_this_method.Send(@flag, @opcode, @message);
  117. return __ret;
  118. }
  119. }
  120. }