C# Class NUnit.Framework.Internal.RuntimeFramework

Afficher le fichier Open project: nunit/nunit Class Usage Examples

Méthodes publiques

Свойство Type Description
DefaultVersion System.Version

Méthodes publiques

Méthode 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

Méthode 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 méthode

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
Résultat RuntimeFramework

RuntimeFramework() public méthode

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
Résultat System

Supports() public méthode

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.
Résultat bool

ToString() public méthode

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

Property Details

DefaultVersion public_oe static_oe 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
Résultat System.Version