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.RuntimeFramework Class Reference

RuntimeFramework represents a particular version of a common language runtime implementation. More...

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

Public Member Functions

 RuntimeFramework (RuntimeType runtime, Version version)
 Construct from a runtime type and version. If the version has two parts, it is taken as a framework version. If it has three or more, it is taken as a CLR version. In either case, the other version is deduced based on the runtime type and provided version. More...
 
override string ToString ()
 Overridden to return the short name of the framework More...
 
bool Supports (RuntimeFramework target)
 Returns true if the current framework matches the one supplied as an argument. Two frameworks match if their runtime types are the same or either one is RuntimeType.Any and all specified version components are equal. Negative (i.e. unspecified) version components are ignored. More...
 

Static Public Member Functions

static RuntimeFramework Parse (string s)
 Parses a string representing a RuntimeFramework. The string may be just a RuntimeType name or just a Version or a hyphenated RuntimeType-Version or a Version prefixed by 'versionString'. More...
 

Static Public Attributes

static readonly Version DefaultVersion = new Version(0,0)
 DefaultVersion is an empty Version, used to indicate that NUnit should select the CLR version to use for the test. More...
 

Properties

static RuntimeFramework CurrentFramework [get]
 Static method to return a RuntimeFramework object for the framework that is currently in use. More...
 
RuntimeType Runtime [get, private set]
 The type of this runtime framework More...
 
Version FrameworkVersion [get, private set]
 The framework version for this runtime framework More...
 
Version ClrVersion [get, private set]
 The CLR version for this runtime framework More...
 
bool AllowAnyVersion [get]
 Return true if any CLR version may be used in matching this RuntimeFramework object. More...
 
string DisplayName [get, private set]
 Returns the Display name for this framework More...
 

Private Member Functions

void InitFromFrameworkVersion (Version version)
 
void InitFromClrVersion (Version version)
 

Static Private Member Functions

static void ThrowInvalidFrameworkVersion (Version version)
 
static bool IsRuntimeTypeName (string name)
 
static string GetDefaultDisplayName (RuntimeType runtime, Version version)
 
static bool VersionsMatch (Version v1, Version v2)
 

Static Private Attributes

static RuntimeFramework currentFramework
 

Detailed Description

RuntimeFramework represents a particular version of a common language runtime implementation.

Constructor & Destructor Documentation

NUnit.Framework.Internal.RuntimeFramework.RuntimeFramework ( RuntimeType  runtime,
Version  version 
)
inline

Construct from a runtime type and version. If the version has two parts, it is taken as a framework version. If it has three or more, it is taken as a CLR version. In either case, the other version is deduced based on the runtime type and provided version.

Parameters
runtimeThe runtime type of the framework
versionThe version of the framework

Member Function Documentation

void NUnit.Framework.Internal.RuntimeFramework.InitFromFrameworkVersion ( Version  version)
inlineprivate
static void NUnit.Framework.Internal.RuntimeFramework.ThrowInvalidFrameworkVersion ( Version  version)
inlinestaticprivate
void NUnit.Framework.Internal.RuntimeFramework.InitFromClrVersion ( Version  version)
inlineprivate
static RuntimeFramework NUnit.Framework.Internal.RuntimeFramework.Parse ( string  s)
inlinestatic

Parses a string representing a RuntimeFramework. The string may be just a RuntimeType name or just a Version or a hyphenated RuntimeType-Version or a Version prefixed by 'versionString'.

Parameters
s
Returns

Referenced by NUnit.Engine.Tests.RuntimeFrameworkTests.CanParseRuntimeFramework(), and NUnit.Framework.Internal.RuntimeFrameworkTests.CanParseRuntimeFramework().

override string NUnit.Framework.Internal.RuntimeFramework.ToString ( )
inline
bool NUnit.Framework.Internal.RuntimeFramework.Supports ( RuntimeFramework  target)
inline

Returns true if the current framework matches the one supplied as an argument. Two frameworks match if their runtime types are the same or either one is RuntimeType.Any and all specified version components are equal. Negative (i.e. unspecified) version components are ignored.

Parameters
targetThe RuntimeFramework to be matched.
Returns
True on match, otherwise false

References NUnit.Framework.Internal.RuntimeFramework.AllowAnyVersion, NUnit.Framework.Internal.RuntimeFramework.ClrVersion, NUnit.Framework.Internal.RuntimeFramework.FrameworkVersion, and NUnit.Framework.Internal.RuntimeFramework.Runtime.

Referenced by NUnit.Engine.Tests.RuntimeFrameworkTests.CanListAvailableFrameworks(), NUnit.Engine.Tests.RuntimeFrameworkTests.CanMatchRuntimes(), NUnit.Framework.Internal.RuntimeFrameworkTests.CanMatchRuntimes(), and NUnit.Framework.Internal.PlatformHelper.IsRuntimeSupported().

static bool NUnit.Framework.Internal.RuntimeFramework.IsRuntimeTypeName ( string  name)
inlinestaticprivate
static string NUnit.Framework.Internal.RuntimeFramework.GetDefaultDisplayName ( RuntimeType  runtime,
Version  version 
)
inlinestaticprivate
static bool NUnit.Framework.Internal.RuntimeFramework.VersionsMatch ( Version  v1,
Version  v2 
)
inlinestaticprivate

Member Data Documentation

readonly Version NUnit.Framework.Internal.RuntimeFramework.DefaultVersion = new Version(0,0)
static

DefaultVersion is an empty Version, used to indicate that NUnit should select the CLR version to use for the test.

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

RuntimeFramework NUnit.Framework.Internal.RuntimeFramework.currentFramework
staticprivate

Property Documentation

bool NUnit.Framework.Internal.RuntimeFramework.AllowAnyVersion
get

Return true if any CLR version may be used in matching this RuntimeFramework object.

Referenced by NUnit.Framework.Internal.RuntimeFramework.Supports().

string NUnit.Framework.Internal.RuntimeFramework.DisplayName
getprivate set

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