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

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

+ Collaboration diagram for NUnit.Engine.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 'v'. More...
 
static RuntimeFramework GetBestAvailableFramework (RuntimeFramework target)
 Returns the best available framework that matches a target framework. If the target framework has a build number specified, then an exact match is needed. Otherwise, the matching framework with the highest build number is used. 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...
 
static RuntimeFramework[] AvailableFrameworks [get]
 Gets an array of all available frameworks More...
 
bool IsAvailable [get]
 Returns true if the current RuntimeFramework is available. In the current implementation, only Mono and Microsoft .NET are supported. 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 void AppendMonoFrameworks (List< RuntimeFramework > frameworks)
 
static void AppendAllMonoFrameworks (List< RuntimeFramework > frameworks)
 
static void AppendDefaultMonoFramework (List< RuntimeFramework > frameworks)
 
static void AppendMonoFramework (List< RuntimeFramework > frameworks, string monoPrefix, string version)
 
static void AppendDotNetFrameworks (List< RuntimeFramework > frameworks)
 
static void AppendExtremelyOldDotNetFrameworkVersions (List< RuntimeFramework > frameworks)
 
static void AppendOlderDotNetFrameworkVersion (List< RuntimeFramework > frameworks, RegistryKey versionKey, Version version)
 
static void AppendDotNetFourFrameworkVersions (List< RuntimeFramework > frameworks, RegistryKey versionKey)
 
static bool CheckInstallDword (RegistryKey key)
 

Static Private Attributes

static RuntimeFramework currentFramework
 
static RuntimeFramework[] availableFrameworks
 

Detailed Description

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

Constructor & Destructor Documentation

NUnit.Engine.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.Engine.RuntimeFramework.InitFromFrameworkVersion ( Version  version)
inlineprivate
static void NUnit.Engine.RuntimeFramework.ThrowInvalidFrameworkVersion ( Version  version)
inlinestaticprivate
void NUnit.Engine.RuntimeFramework.InitFromClrVersion ( Version  version)
inlineprivate
static RuntimeFramework NUnit.Engine.RuntimeFramework.Parse ( string  s)
inlinestatic
static RuntimeFramework NUnit.Engine.RuntimeFramework.GetBestAvailableFramework ( RuntimeFramework  target)
inlinestatic

Returns the best available framework that matches a target framework. If the target framework has a build number specified, then an exact match is needed. Otherwise, the matching framework with the highest build number is used.

Parameters
target
Returns

References NUnit.Engine.RuntimeFramework.ClrVersion, and NUnit.Engine.RuntimeFramework.Supports().

Referenced by NUnit.Engine.Services.TestAgency.LaunchAgentProcess().

override string NUnit.Engine.RuntimeFramework.ToString ( )
inline

Overridden to return the short name of the framework

Returns

Referenced by NUnit.Engine.Services.RuntimeFrameworkService.SelectRuntimeFramework().

bool NUnit.Engine.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.Engine.RuntimeFramework.AllowAnyVersion, NUnit.Engine.RuntimeFramework.ClrVersion, NUnit.Engine.RuntimeFramework.FrameworkVersion, and NUnit.Engine.RuntimeFramework.Runtime.

Referenced by NUnit.Engine.RuntimeFramework.GetBestAvailableFramework().

static bool NUnit.Engine.RuntimeFramework.IsRuntimeTypeName ( string  name)
inlinestaticprivate
static string NUnit.Engine.RuntimeFramework.GetDefaultDisplayName ( RuntimeType  runtime,
Version  version 
)
inlinestaticprivate
static bool NUnit.Engine.RuntimeFramework.VersionsMatch ( Version  v1,
Version  v2 
)
inlinestaticprivate
static void NUnit.Engine.RuntimeFramework.AppendMonoFrameworks ( List< RuntimeFramework frameworks)
inlinestaticprivate
static void NUnit.Engine.RuntimeFramework.AppendAllMonoFrameworks ( List< RuntimeFramework frameworks)
inlinestaticprivate
static void NUnit.Engine.RuntimeFramework.AppendDefaultMonoFramework ( List< RuntimeFramework frameworks)
inlinestaticprivate
static void NUnit.Engine.RuntimeFramework.AppendMonoFramework ( List< RuntimeFramework frameworks,
string  monoPrefix,
string  version 
)
inlinestaticprivate
static void NUnit.Engine.RuntimeFramework.AppendDotNetFrameworks ( List< RuntimeFramework frameworks)
inlinestaticprivate
static void NUnit.Engine.RuntimeFramework.AppendExtremelyOldDotNetFrameworkVersions ( List< RuntimeFramework frameworks)
inlinestaticprivate
static void NUnit.Engine.RuntimeFramework.AppendOlderDotNetFrameworkVersion ( List< RuntimeFramework frameworks,
RegistryKey  versionKey,
Version  version 
)
inlinestaticprivate
static void NUnit.Engine.RuntimeFramework.AppendDotNetFourFrameworkVersions ( List< RuntimeFramework frameworks,
RegistryKey  versionKey 
)
inlinestaticprivate
static bool NUnit.Engine.RuntimeFramework.CheckInstallDword ( RegistryKey  key)
inlinestaticprivate

Member Data Documentation

readonly Version NUnit.Engine.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.Engine.Services.RuntimeFrameworkService.SelectRuntimeFramework().

RuntimeFramework NUnit.Engine.RuntimeFramework.currentFramework
staticprivate
RuntimeFramework [] NUnit.Engine.RuntimeFramework.availableFrameworks
staticprivate

Property Documentation

RuntimeFramework [] NUnit.Engine.RuntimeFramework.AvailableFrameworks
staticget

Gets an array of all available frameworks

Referenced by NUnit.Engine.Services.RuntimeFrameworkService.IsAvailable().

bool NUnit.Engine.RuntimeFramework.IsAvailable
get

Returns true if the current RuntimeFramework is available. In the current implementation, only Mono and Microsoft .NET are supported.

Returns
True if it's available, false if not

Referenced by NUnit.Engine.Services.TestAgency.LaunchAgentProcess(), and NUnit.Engine.Services.RuntimeFrameworkService.SelectRuntimeFramework().

bool NUnit.Engine.RuntimeFramework.AllowAnyVersion
get

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

Referenced by NUnit.Engine.RuntimeFramework.Supports().

string NUnit.Engine.RuntimeFramework.DisplayName
getprivate set

Returns the Display name for this framework

Referenced by NUnit.Engine.RuntimeFramework.AppendMonoFramework(), and NUnit.Agent.NUnitTestAgent.Main().


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