Features.cs 785 B

123456789101112131415161718192021222324252627282930313233343536
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using XUnity.AutoTranslator.Plugin.Core.Constants;
  6. namespace XUnity.AutoTranslator.Plugin.Core
  7. {
  8. public static class Features
  9. {
  10. public static readonly bool SupportsClipboard = false;
  11. public static readonly bool SupportsCustomYieldInstruction = false;
  12. static Features()
  13. {
  14. try
  15. {
  16. SupportsClipboard = Types.TextEditor?.GetProperty( "text" )?.GetSetMethod() != null;
  17. }
  18. catch( Exception )
  19. {
  20. }
  21. try
  22. {
  23. SupportsCustomYieldInstruction = Types.CustomYieldInstruction != null;
  24. }
  25. catch( Exception )
  26. {
  27. }
  28. }
  29. }
  30. }