ETModel_ResourcesComponent_Binding.cs 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  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_ResourcesComponent_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.ResourcesComponent);
  23. args = new Type[]{typeof(System.String)};
  24. method = type.GetMethod("LoadBundle", flag, null, args, null);
  25. app.RegisterCLRMethodRedirection(method, LoadBundle_0);
  26. args = new Type[]{typeof(System.String)};
  27. method = type.GetMethod("UnloadBundle", flag, null, args, null);
  28. app.RegisterCLRMethodRedirection(method, UnloadBundle_1);
  29. args = new Type[]{typeof(System.String), typeof(System.String)};
  30. method = type.GetMethod("GetAsset", flag, null, args, null);
  31. app.RegisterCLRMethodRedirection(method, GetAsset_2);
  32. args = new Type[]{typeof(System.String)};
  33. method = type.GetMethod("LoadBundleAsync", flag, null, args, null);
  34. app.RegisterCLRMethodRedirection(method, LoadBundleAsync_3);
  35. }
  36. static StackObject* LoadBundle_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, 2);
  41. ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
  42. System.String @assetBundleName = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
  43. __intp.Free(ptr_of_this_method);
  44. ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
  45. ETModel.ResourcesComponent instance_of_this_method = (ETModel.ResourcesComponent)typeof(ETModel.ResourcesComponent).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
  46. __intp.Free(ptr_of_this_method);
  47. instance_of_this_method.LoadBundle(@assetBundleName);
  48. return __ret;
  49. }
  50. static StackObject* UnloadBundle_1(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
  51. {
  52. ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
  53. StackObject* ptr_of_this_method;
  54. StackObject* __ret = ILIntepreter.Minus(__esp, 2);
  55. ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
  56. System.String @assetBundleName = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
  57. __intp.Free(ptr_of_this_method);
  58. ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
  59. ETModel.ResourcesComponent instance_of_this_method = (ETModel.ResourcesComponent)typeof(ETModel.ResourcesComponent).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
  60. __intp.Free(ptr_of_this_method);
  61. instance_of_this_method.UnloadBundle(@assetBundleName);
  62. return __ret;
  63. }
  64. static StackObject* GetAsset_2(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
  65. {
  66. ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
  67. StackObject* ptr_of_this_method;
  68. StackObject* __ret = ILIntepreter.Minus(__esp, 3);
  69. ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
  70. System.String @prefab = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
  71. __intp.Free(ptr_of_this_method);
  72. ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
  73. System.String @bundleName = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
  74. __intp.Free(ptr_of_this_method);
  75. ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
  76. ETModel.ResourcesComponent instance_of_this_method = (ETModel.ResourcesComponent)typeof(ETModel.ResourcesComponent).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
  77. __intp.Free(ptr_of_this_method);
  78. var result_of_this_method = instance_of_this_method.GetAsset(@bundleName, @prefab);
  79. object obj_result_of_this_method = result_of_this_method;
  80. if(obj_result_of_this_method is CrossBindingAdaptorType)
  81. {
  82. return ILIntepreter.PushObject(__ret, __mStack, ((CrossBindingAdaptorType)obj_result_of_this_method).ILInstance);
  83. }
  84. return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
  85. }
  86. static StackObject* LoadBundleAsync_3(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
  87. {
  88. ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
  89. StackObject* ptr_of_this_method;
  90. StackObject* __ret = ILIntepreter.Minus(__esp, 2);
  91. ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
  92. System.String @assetBundleName = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
  93. __intp.Free(ptr_of_this_method);
  94. ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
  95. ETModel.ResourcesComponent instance_of_this_method = (ETModel.ResourcesComponent)typeof(ETModel.ResourcesComponent).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
  96. __intp.Free(ptr_of_this_method);
  97. var result_of_this_method = instance_of_this_method.LoadBundleAsync(@assetBundleName);
  98. return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
  99. }
  100. }
  101. }