IGLib
1.7.2
The IGLib base library EXTENDED - with other lilbraries and applications.
|
PlatformHelper class is used by the PlatformAttribute class to determine whether a platform is supported. More...
Public Member Functions | |
PlatformHelper () | |
Default constructor uses the operating system and common language runtime of the system. More... | |
PlatformHelper (OSPlatform os, RuntimeFramework rt) | |
Construct a PlatformHelper for a particular operating system and common language runtime. Used in testing. More... | |
bool | IsPlatformSupported (string[] platforms) |
Test to determine if one of a collection of platforms is being used currently. More... | |
bool | IsPlatformSupported (PlatformAttribute platformAttribute) |
Tests to determine if the current platform is supported based on a platform attribute. More... | |
bool | IsPlatformSupported (TestCaseAttribute testCaseAttribute) |
Tests to determine if the current platform is supported based on a platform attribute. More... | |
bool | IsPlatformSupported (string platform) |
Test to determine if the a particular platform or comma- delimited set of platforms is in use. More... | |
Public Attributes | |
const string | OSPlatforms = CommonOSPlatforms + ",Xbox,MacOSX" |
Comma-delimited list of all supported OS platform constants More... | |
Static Public Attributes | |
static readonly string | RuntimePlatforms |
Comma-delimited list of all supported Runtime platform constants More... | |
Properties | |
string | Reason [get] |
Return the last failure reason. Results are not defined if called before IsSupported( Attribute ) is called. More... | |
Private Member Functions | |
bool | IsPlatformSupported (string include, string exclude) |
bool | IsRuntimeSupported (string platformName) |
bool | IsRuntimeSupported (RuntimeType runtime, string versionSpecification) |
Private Attributes | |
OSPlatform | os |
RuntimeFramework | rt |
string | reason = string.Empty |
const string | CommonOSPlatforms |
PlatformHelper class is used by the PlatformAttribute class to determine whether a platform is supported.
|
inline |
Default constructor uses the operating system and common language runtime of the system.
References NUnit.Framework.Internal.RuntimeFramework.CurrentFramework, and NUnit.Framework.Internal.OSPlatform.CurrentPlatform.
|
inline |
Construct a PlatformHelper for a particular operating system and common language runtime. Used in testing.
os | OperatingSystem to be used |
rt | RuntimeFramework to be used |
|
inline |
Test to determine if one of a collection of platforms is being used currently.
platforms |
Referenced by NUnit.Framework.PlatformAttribute.ApplyToTest(), NUnit.Framework.TestCaseAttribute.BuildFrom(), and NUnit.Framework.Internal.PlatformDetectionTests.PlatformAttribute_ProcessBitNess().
|
inline |
Tests to determine if the current platform is supported based on a platform attribute.
platformAttribute | The attribute to examine |
References NUnit.Framework.IncludeExcludeAttribute.Exclude, and NUnit.Framework.IncludeExcludeAttribute.Include.
|
inline |
Tests to determine if the current platform is supported based on a platform attribute.
testCaseAttribute | The attribute to examine |
References NUnit.Framework.TestCaseAttribute.ExcludePlatform, and NUnit.Framework.TestCaseAttribute.IncludePlatform.
|
inlineprivate |
|
inline |
Test to determine if the a particular platform or comma- delimited set of platforms is in use.
platform | Name of the platform or comma-separated list of platform ids |
References NUnit.Framework.Internal.OSPlatform.IsMacOSX, NUnit.Framework.Internal.OSPlatform.IsNT3, NUnit.Framework.Internal.OSPlatform.IsNT4, NUnit.Framework.Internal.OSPlatform.IsNT5, NUnit.Framework.Internal.OSPlatform.IsNT6, NUnit.Framework.Internal.OSPlatform.IsUnix, NUnit.Framework.Internal.OSPlatform.IsVista, NUnit.Framework.Internal.OSPlatform.IsWin2003Server, NUnit.Framework.Internal.OSPlatform.IsWin2008Server, NUnit.Framework.Internal.OSPlatform.IsWin2008ServerR2, NUnit.Framework.Internal.OSPlatform.IsWin2012ServerR1, NUnit.Framework.Internal.OSPlatform.IsWin2012ServerR2, NUnit.Framework.Internal.OSPlatform.IsWin2K, NUnit.Framework.Internal.OSPlatform.IsWin32NT, NUnit.Framework.Internal.OSPlatform.IsWin32S, NUnit.Framework.Internal.OSPlatform.IsWin32Windows, NUnit.Framework.Internal.OSPlatform.IsWin95, NUnit.Framework.Internal.OSPlatform.IsWin98, NUnit.Framework.Internal.OSPlatform.IsWinCE, NUnit.Framework.Internal.OSPlatform.IsWindows, NUnit.Framework.Internal.OSPlatform.IsWindows10, NUnit.Framework.Internal.OSPlatform.IsWindows7, NUnit.Framework.Internal.OSPlatform.IsWindows8, NUnit.Framework.Internal.OSPlatform.IsWindows81, NUnit.Framework.Internal.OSPlatform.IsWindowsServer10, NUnit.Framework.Internal.OSPlatform.IsWinME, NUnit.Framework.Internal.OSPlatform.IsWinXP, and NUnit.Framework.Internal.OSPlatform.IsXbox.
|
inlineprivate |
|
inlineprivate |
|
private |
|
private |
|
private |
|
private |
const string NUnit.Framework.Internal.PlatformHelper.OSPlatforms = CommonOSPlatforms + ",Xbox,MacOSX" |
Comma-delimited list of all supported OS platform constants
Referenced by NUnit.Framework.Internal.PlatformDetectionTests.CheckOSPlatforms().
|
static |
Comma-delimited list of all supported Runtime platform constants
Referenced by NUnit.Framework.Internal.PlatformDetectionTests.CheckRuntimePlatforms().
|
get |
Return the last failure reason. Results are not defined if called before IsSupported( Attribute ) is called.
Referenced by NUnit.Framework.PlatformAttribute.ApplyToTest(), and NUnit.Framework.TestCaseAttribute.BuildFrom().