2016-05-05 03:14:32 +03:00
|
|
|
//
|
|
|
|
// Mac-specific Helpers
|
|
|
|
//
|
|
|
|
// Authors:
|
|
|
|
// Sebastien Pouliot <sebastien@xamarin.com>
|
|
|
|
// Aaron Bockover <abock@xamarin.com>
|
|
|
|
//
|
2016-06-22 02:46:07 +03:00
|
|
|
// Copyright 2012-2015 Xamarin Inc. All rights reserved.
|
2016-05-05 03:14:32 +03:00
|
|
|
//
|
|
|
|
|
|
|
|
using System;
|
|
|
|
|
2016-06-22 02:46:07 +03:00
|
|
|
namespace Xamarin.Tests {
|
2016-05-05 03:14:32 +03:00
|
|
|
public static class Mac {
|
|
|
|
public static readonly Version Version_10_7 = new Version (10, 7);
|
|
|
|
public static readonly Version Version_10_8 = new Version (10, 8);
|
|
|
|
public static readonly Version Version_10_9 = new Version (10, 9);
|
|
|
|
public static readonly Version Version_10_10 = new Version (10, 10);
|
|
|
|
public static readonly Version Version_10_11 = new Version (10, 11);
|
|
|
|
|
|
|
|
static PlatformInfo host => PlatformInfo.Host;
|
|
|
|
|
|
|
|
public static bool CheckSystemVersion (int major, int minor) => host.Version >= new Version (major, minor);
|
2017-11-23 04:52:10 +03:00
|
|
|
public static bool CheckSystemVersion (int major, int minor, int build) => host.Version >= new Version (major, minor, build);
|
2016-05-05 03:14:32 +03:00
|
|
|
public static bool Is32BitMavericks => host.IsArch32 && IsAtLeast (Version_10_9);
|
|
|
|
public static bool IsYosemiteOrHigher => IsAtLeast (Version_10_10);
|
|
|
|
public static bool IsElCapitanOrHigher => IsAtLeast (Version_10_11);
|
|
|
|
public static bool IsAtLeast (int major, int minor) => IsAtLeast (new Version (major, minor));
|
|
|
|
public static bool IsAtLeast (Version version) => host.IsMac && host.Version >= version;
|
|
|
|
}
|
|
|
|
}
|