Netstandard15Polyfill.cs 536 B

123456789101112131415161718192021222324
  1. #if NETSTANDARD1_5
  2. using System;
  3. using System.Reflection;
  4. namespace LitJson
  5. {
  6. internal static class Netstandard15Polyfill
  7. {
  8. internal static Type GetInterface(this Type type, string name)
  9. {
  10. return type.GetTypeInfo().GetInterface(name);
  11. }
  12. internal static bool IsClass(this Type type)
  13. {
  14. return type.GetTypeInfo().IsClass;
  15. }
  16. internal static bool IsEnum(this Type type)
  17. {
  18. return type.GetTypeInfo().IsEnum;
  19. }
  20. }
  21. }
  22. #endif