Property.cpp 1008 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #include "il2cpp-config.h"
  2. #include "vm/Property.h"
  3. #include "il2cpp-class-internals.h"
  4. namespace il2cpp
  5. {
  6. namespace vm
  7. {
  8. uint32_t Property::GetFlags(const PropertyInfo* prop)
  9. {
  10. return prop->attrs;
  11. }
  12. const MethodInfo* Property::GetGetMethod(const PropertyInfo* prop)
  13. {
  14. return prop->get;
  15. }
  16. const MethodInfo* Property::GetSetMethod(const PropertyInfo* prop)
  17. {
  18. return prop->set;
  19. }
  20. const char* Property::GetName(const PropertyInfo* prop)
  21. {
  22. return prop->name;
  23. }
  24. Il2CppClass* Property::GetParent(const PropertyInfo* prop)
  25. {
  26. return prop->parent;
  27. }
  28. uint32_t Property::GetToken(const PropertyInfo* prop)
  29. {
  30. return prop->token;
  31. }
  32. const Il2CppType* Property::GetType(const PropertyInfo* prop)
  33. {
  34. if (prop->get)
  35. return prop->get->return_type;
  36. return prop->set->parameters[prop->set->parameters_count - 1];
  37. }
  38. } /* namespace vm */
  39. } /* namespace il2cpp */