IGLib  1.7.2
The IGLib base library EXTENDED - with other lilbraries and applications.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
NUnit.Framework.Internal.OSPlatform Class Reference

OSPlatform represents a particular operating system platform More...

+ Collaboration diagram for NUnit.Framework.Internal.OSPlatform:

Classes

struct  OSVERSIONINFOEX
 

Public Types

enum  ProductType { ProductType.Unknown, ProductType.WorkStation, ProductType.DomainController, ProductType.Server }
 Product Type Enumeration used for Windows More...
 

Public Member Functions

 OSPlatform (PlatformID platform, Version version)
 Construct from a platform ID and version More...
 
 OSPlatform (PlatformID platform, Version version, ProductType product)
 Construct from a platform ID, version and product type More...
 

Static Public Attributes

static readonly PlatformID UnixPlatformID_Microsoft = (PlatformID)4
 Platform ID for Unix as defined by Microsoft .NET 2.0 and greater More...
 
static readonly PlatformID UnixPlatformID_Mono = (PlatformID)128
 Platform ID for Unix as defined by Mono More...
 
static readonly PlatformID XBoxPlatformID = (PlatformID)5
 Platform ID for XBox as defined by .NET and Mono, but not CF More...
 
static readonly PlatformID MacOSXPlatformID = (PlatformID)6
 Platform ID for MacOSX as defined by .NET and Mono, but not CF More...
 

Properties

static OSPlatform CurrentPlatform [get]
 Get the OSPlatform under which we are currently running More...
 
PlatformID Platform [get]
 Get the platform ID of this instance More...
 
Version Version [get]
 Get the Version of this instance More...
 
ProductType Product [get]
 Get the Product Type of this instance More...
 
bool IsWindows [get]
 Return true if this is a windows platform More...
 
bool IsUnix [get]
 Return true if this is a Unix or Linux platform More...
 
bool IsWin32S [get]
 Return true if the platform is Win32S More...
 
bool IsWin32Windows [get]
 Return true if the platform is Win32Windows More...
 
bool IsWin32NT [get]
 Return true if the platform is Win32NT More...
 
bool IsWinCE [get]
 Return true if the platform is Windows CE More...
 
bool IsXbox [get]
 Return true if the platform is Xbox More...
 
bool IsMacOSX [get]
 Return true if the platform is MacOSX More...
 
bool IsWin95 [get]
 Return true if the platform is Windows 95 More...
 
bool IsWin98 [get]
 Return true if the platform is Windows 98 More...
 
bool IsWinME [get]
 Return true if the platform is Windows ME More...
 
bool IsNT3 [get]
 Return true if the platform is NT 3 More...
 
bool IsNT4 [get]
 Return true if the platform is NT 4 More...
 
bool IsNT5 [get]
 Return true if the platform is NT 5 More...
 
bool IsWin2K [get]
 Return true if the platform is Windows 2000 More...
 
bool IsWinXP [get]
 Return true if the platform is Windows XP More...
 
bool IsWin2003Server [get]
 Return true if the platform is Windows 2003 Server More...
 
bool IsNT6 [get]
 Return true if the platform is NT 6 More...
 
bool IsNT60 [get]
 Return true if the platform is NT 6.0 More...
 
bool IsNT61 [get]
 Return true if the platform is NT 6.1 More...
 
bool IsNT62 [get]
 Return true if the platform is NT 6.2 More...
 
bool IsNT63 [get]
 Return true if the platform is NT 6.3 More...
 
bool IsVista [get]
 Return true if the platform is Vista More...
 
bool IsWin2008Server [get]
 Return true if the platform is Windows 2008 Server (original or R2) More...
 
bool IsWin2008ServerR1 [get]
 Return true if the platform is Windows 2008 Server (original) More...
 
bool IsWin2008ServerR2 [get]
 Return true if the platform is Windows 2008 Server R2 More...
 
bool IsWin2012Server [get]
 Return true if the platform is Windows 2012 Server (original or R2) More...
 
bool IsWin2012ServerR1 [get]
 Return true if the platform is Windows 2012 Server (original) More...
 
bool IsWin2012ServerR2 [get]
 Return true if the platform is Windows 2012 Server R2 More...
 
bool IsWindows7 [get]
 Return true if the platform is Windows 7 More...
 
bool IsWindows8 [get]
 Return true if the platform is Windows 8 More...
 
bool IsWindows81 [get]
 Return true if the platform is Windows 8.1 More...
 
bool IsWindows10 [get]
 Return true if the platform is Windows 10 More...
 
bool IsWindowsServer10 [get]
 Return true if the platform is Windows Server. This is named Windows Server 10 to distinguish it from previous versions of Windows Server. More...
 

Private Member Functions

static bool GetVersionEx (ref OSVERSIONINFOEX osvi)
 
static int uname (IntPtr buf)
 

Static Private Member Functions

static Version GetWindows81PlusVersion (Version version)
 Gets the actual OS Version, not the incorrect value that might be returned for Win 8.1 and Win 10 More...
 
static bool CheckIfIsMacOSX (PlatformID platform)
 

Private Attributes

PlatformID platform
 
Version version
 
ProductType product
 

Static Private Attributes

static OSPlatform currentPlatform
 

Detailed Description

OSPlatform represents a particular operating system platform

Member Enumeration Documentation

Product Type Enumeration used for Windows

Enumerator
Unknown 

Product type is unknown or unspecified

WorkStation 

Product type is Workstation

DomainController 

Product type is Domain Controller

Server 

Product type is Server

Constructor & Destructor Documentation

NUnit.Framework.Internal.OSPlatform.OSPlatform ( PlatformID  platform,
Version  version 
)
inline

Construct from a platform ID and version

NUnit.Framework.Internal.OSPlatform.OSPlatform ( PlatformID  platform,
Version  version,
ProductType  product 
)
inline

Construct from a platform ID, version and product type

Member Function Documentation

static Version NUnit.Framework.Internal.OSPlatform.GetWindows81PlusVersion ( Version  version)
inlinestaticprivate

Gets the actual OS Version, not the incorrect value that might be returned for Win 8.1 and Win 10

If an application is not manifested as Windows 8.1 or Windows 10, the version returned from Environment.OSVersion will not be 6.3 and 10.0 respectively, but will be 6.2 and 6.3. The correct value can be found in the registry.

Parameters
versionThe original version
Returns
The correct OS version
static bool NUnit.Framework.Internal.OSPlatform.GetVersionEx ( ref OSVERSIONINFOEX  osvi)
private
static int NUnit.Framework.Internal.OSPlatform.uname ( IntPtr  buf)
private
static bool NUnit.Framework.Internal.OSPlatform.CheckIfIsMacOSX ( PlatformID  platform)
inlinestaticprivate

Member Data Documentation

PlatformID NUnit.Framework.Internal.OSPlatform.platform
private
Version NUnit.Framework.Internal.OSPlatform.version
private
ProductType NUnit.Framework.Internal.OSPlatform.product
private
OSPlatform NUnit.Framework.Internal.OSPlatform.currentPlatform
staticprivate
readonly PlatformID NUnit.Framework.Internal.OSPlatform.UnixPlatformID_Microsoft = (PlatformID)4
static

Platform ID for Unix as defined by Microsoft .NET 2.0 and greater

Referenced by NUnit.Framework.Internal.PlatformDetectionTests.DetectUnixUnderMicrosoftDotNet().

readonly PlatformID NUnit.Framework.Internal.OSPlatform.UnixPlatformID_Mono = (PlatformID)128
static

Platform ID for Unix as defined by Mono

Referenced by NUnit.Framework.Internal.PlatformDetectionTests.DetectUnixUnderMono().

readonly PlatformID NUnit.Framework.Internal.OSPlatform.XBoxPlatformID = (PlatformID)5
static

Platform ID for XBox as defined by .NET and Mono, but not CF

readonly PlatformID NUnit.Framework.Internal.OSPlatform.MacOSXPlatformID = (PlatformID)6
static

Platform ID for MacOSX as defined by .NET and Mono, but not CF

Property Documentation

PlatformID NUnit.Framework.Internal.OSPlatform.Platform
get

Get the platform ID of this instance

Version NUnit.Framework.Internal.OSPlatform.Version
get

Get the Version of this instance

ProductType NUnit.Framework.Internal.OSPlatform.Product
get

Get the Product Type of this instance

bool NUnit.Framework.Internal.OSPlatform.IsWindows
get

Return true if this is a windows platform

Referenced by NUnit.Framework.Internal.PlatformHelper.IsPlatformSupported().

bool NUnit.Framework.Internal.OSPlatform.IsWin32S
get

Return true if the platform is Win32S

Referenced by NUnit.Framework.Internal.PlatformHelper.IsPlatformSupported().

bool NUnit.Framework.Internal.OSPlatform.IsWin32Windows
get

Return true if the platform is Win32Windows

Referenced by NUnit.Framework.Internal.PlatformHelper.IsPlatformSupported().

bool NUnit.Framework.Internal.OSPlatform.IsWin32NT
get

Return true if the platform is Win32NT

Referenced by NUnit.Framework.Internal.PlatformHelper.IsPlatformSupported().

bool NUnit.Framework.Internal.OSPlatform.IsWinCE
get

Return true if the platform is Windows CE

Referenced by NUnit.Framework.Internal.PlatformHelper.IsPlatformSupported().

bool NUnit.Framework.Internal.OSPlatform.IsXbox
get

Return true if the platform is Xbox

Referenced by NUnit.Framework.Internal.PlatformHelper.IsPlatformSupported().

bool NUnit.Framework.Internal.OSPlatform.IsWin95
get

Return true if the platform is Windows 95

Referenced by NUnit.Framework.Internal.PlatformHelper.IsPlatformSupported().

bool NUnit.Framework.Internal.OSPlatform.IsWin98
get

Return true if the platform is Windows 98

Referenced by NUnit.Framework.Internal.PlatformHelper.IsPlatformSupported().

bool NUnit.Framework.Internal.OSPlatform.IsWinME
get

Return true if the platform is Windows ME

Referenced by NUnit.Framework.Internal.PlatformHelper.IsPlatformSupported().

bool NUnit.Framework.Internal.OSPlatform.IsNT3
get

Return true if the platform is NT 3

Referenced by NUnit.Framework.Internal.PlatformHelper.IsPlatformSupported().

bool NUnit.Framework.Internal.OSPlatform.IsNT4
get

Return true if the platform is NT 4

Referenced by NUnit.Framework.Internal.PlatformHelper.IsPlatformSupported().

bool NUnit.Framework.Internal.OSPlatform.IsNT5
get

Return true if the platform is NT 5

Referenced by NUnit.Framework.Internal.PlatformHelper.IsPlatformSupported().

bool NUnit.Framework.Internal.OSPlatform.IsWin2K
get

Return true if the platform is Windows 2000

Referenced by NUnit.Framework.Internal.PlatformHelper.IsPlatformSupported().

bool NUnit.Framework.Internal.OSPlatform.IsWinXP
get

Return true if the platform is Windows XP

Referenced by NUnit.Framework.Internal.PlatformHelper.IsPlatformSupported().

bool NUnit.Framework.Internal.OSPlatform.IsWin2003Server
get

Return true if the platform is Windows 2003 Server

Referenced by NUnit.Framework.Internal.PlatformHelper.IsPlatformSupported().

bool NUnit.Framework.Internal.OSPlatform.IsNT6
get

Return true if the platform is NT 6

Referenced by NUnit.Framework.Internal.PlatformHelper.IsPlatformSupported().

bool NUnit.Framework.Internal.OSPlatform.IsNT60
get

Return true if the platform is NT 6.0

bool NUnit.Framework.Internal.OSPlatform.IsNT61
get

Return true if the platform is NT 6.1

bool NUnit.Framework.Internal.OSPlatform.IsNT62
get

Return true if the platform is NT 6.2

bool NUnit.Framework.Internal.OSPlatform.IsNT63
get

Return true if the platform is NT 6.3

bool NUnit.Framework.Internal.OSPlatform.IsVista
get

Return true if the platform is Vista

Referenced by NUnit.Framework.Internal.PlatformHelper.IsPlatformSupported().

bool NUnit.Framework.Internal.OSPlatform.IsWin2008Server
get

Return true if the platform is Windows 2008 Server (original or R2)

Referenced by NUnit.Framework.Internal.PlatformHelper.IsPlatformSupported().

bool NUnit.Framework.Internal.OSPlatform.IsWin2008ServerR1
get

Return true if the platform is Windows 2008 Server (original)

bool NUnit.Framework.Internal.OSPlatform.IsWin2008ServerR2
get

Return true if the platform is Windows 2008 Server R2

Referenced by NUnit.Framework.Internal.PlatformHelper.IsPlatformSupported().

bool NUnit.Framework.Internal.OSPlatform.IsWin2012Server
get

Return true if the platform is Windows 2012 Server (original or R2)

bool NUnit.Framework.Internal.OSPlatform.IsWin2012ServerR1
get

Return true if the platform is Windows 2012 Server (original)

Referenced by NUnit.Framework.Internal.PlatformHelper.IsPlatformSupported().

bool NUnit.Framework.Internal.OSPlatform.IsWin2012ServerR2
get

Return true if the platform is Windows 2012 Server R2

Referenced by NUnit.Framework.Internal.PlatformHelper.IsPlatformSupported().

bool NUnit.Framework.Internal.OSPlatform.IsWindows7
get

Return true if the platform is Windows 7

Referenced by NUnit.Framework.Internal.PlatformHelper.IsPlatformSupported().

bool NUnit.Framework.Internal.OSPlatform.IsWindows8
get

Return true if the platform is Windows 8

Referenced by NUnit.Framework.Internal.PlatformHelper.IsPlatformSupported().

bool NUnit.Framework.Internal.OSPlatform.IsWindows81
get

Return true if the platform is Windows 8.1

Referenced by NUnit.Framework.Internal.PlatformHelper.IsPlatformSupported().

bool NUnit.Framework.Internal.OSPlatform.IsWindows10
get

Return true if the platform is Windows 10

Referenced by NUnit.Framework.Internal.PlatformHelper.IsPlatformSupported().

bool NUnit.Framework.Internal.OSPlatform.IsWindowsServer10
get

Return true if the platform is Windows Server. This is named Windows Server 10 to distinguish it from previous versions of Windows Server.

Referenced by NUnit.Framework.Internal.PlatformHelper.IsPlatformSupported().


The documentation for this class was generated from the following file: