ETModel_PlayerComponent_Binding.cs 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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_PlayerComponent_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. FieldInfo field;
  22. Type[] args;
  23. Type type = typeof(ETModel.PlayerComponent);
  24. args = new Type[]{};
  25. method = type.GetMethod("get_Instance", flag, null, args, null);
  26. app.RegisterCLRMethodRedirection(method, get_Instance_0);
  27. field = type.GetField("MyPlayer", flag);
  28. app.RegisterCLRFieldGetter(field, get_MyPlayer_0);
  29. app.RegisterCLRFieldSetter(field, set_MyPlayer_0);
  30. }
  31. static StackObject* get_Instance_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
  32. {
  33. ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
  34. StackObject* __ret = ILIntepreter.Minus(__esp, 0);
  35. var result_of_this_method = ETModel.PlayerComponent.Instance;
  36. object obj_result_of_this_method = result_of_this_method;
  37. if(obj_result_of_this_method is CrossBindingAdaptorType)
  38. {
  39. return ILIntepreter.PushObject(__ret, __mStack, ((CrossBindingAdaptorType)obj_result_of_this_method).ILInstance);
  40. }
  41. return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
  42. }
  43. static object get_MyPlayer_0(ref object o)
  44. {
  45. return ((ETModel.PlayerComponent)o).MyPlayer;
  46. }
  47. static void set_MyPlayer_0(ref object o, object v)
  48. {
  49. ((ETModel.PlayerComponent)o).MyPlayer = (ETModel.Player)v;
  50. }
  51. }
  52. }