1
0

Utils.cs 674 B

12345678910111213141516171819202122
  1. // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
  2. using System.Linq;
  3. using System.Reactive.Subjects;
  4. using System.Runtime.Versioning;
  5. namespace ReactiveTests
  6. {
  7. static class Utils
  8. {
  9. public static bool IsRunningWithPortableLibraryBinaries()
  10. {
  11. #if DESKTOPCLR20
  12. return false;
  13. #else
  14. var a = typeof(ISubject<int>).Assembly.GetCustomAttributes(typeof(TargetFrameworkAttribute), false).Cast<TargetFrameworkAttribute>().SingleOrDefault();
  15. return a != null && a.FrameworkDisplayName == ".NET Portable Subset";
  16. #endif
  17. }
  18. }
  19. }