C# Class NUnit.Framework.Internal.RuntimeFramework

Show file Open project: nunit/nunit Class Usage Examples

Public Properties

Property Type Description
DefaultVersion System.Version

Public Methods

Method Description
Parse ( string s ) : RuntimeFramework

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'.

RuntimeFramework ( RuntimeType runtime, Version version ) : System

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.

Supports ( RuntimeFramework target ) : bool

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.

ToString ( ) : string

Overridden to return the short name of the framework

Private Methods

Method Description
GetDefaultDisplayName ( RuntimeType runtime, System.Version version ) : string
InitFromClrVersion ( Version version ) : void
InitFromFrameworkVersion ( Version version ) : void
IsRuntimeTypeName ( string name ) : bool
ThrowInvalidFrameworkVersion ( Version version ) : void
VersionsMatch ( Version v1, Version v2 ) : bool

Method Details

Parse() public static method

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'.
public static Parse ( string s ) : RuntimeFramework
s string
return RuntimeFramework

RuntimeFramework() public method

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.
public RuntimeFramework ( RuntimeType runtime, Version version ) : System
runtime RuntimeType The runtime type of the framework
version Version The version of the framework
return System

Supports() public method

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.
public Supports ( RuntimeFramework target ) : bool
target RuntimeFramework The RuntimeFramework to be matched.
return bool

ToString() public method

Overridden to return the short name of the framework
public ToString ( ) : string
return string

Property Details

DefaultVersion public static property

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