Class RuntimeFramework
RuntimeFramework represents a particular version of a common language runtime implementation.
public sealed class RuntimeFramework
- Inheritance
-
RuntimeFramework
- Inherited Members
Constructors
RuntimeFramework(RuntimeType, 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.
public RuntimeFramework(RuntimeType runtime, Version version)
Parameters
runtime
RuntimeTypeThe runtime type of the framework
version
VersionThe version of the framework
Fields
DefaultVersion
DefaultVersion is an empty Version, used to indicate that NUnit should select the CLR version to use for the test.
public static readonly Version DefaultVersion
Field Value
Properties
AllowAnyVersion
Return true if any CLR version may be used in matching this RuntimeFramework object.
public bool AllowAnyVersion { get; }
Property Value
ClrVersion
The CLR version for this runtime framework
public Version ClrVersion { get; }
Property Value
CurrentFramework
Static method to return a RuntimeFramework object for the framework that is currently in use.
public static RuntimeFramework CurrentFramework { get; }
Property Value
DisplayName
Returns the Display name for this framework
public string DisplayName { get; }
Property Value
FrameworkVersion
The framework version for this runtime framework
public Version FrameworkVersion { get; }
Property Value
Runtime
The type of this runtime framework
public RuntimeType Runtime { get; }
Property Value
Methods
Parse(string)
Parses a string representing a RuntimeFramework. The string may be just a RuntimeType name or just a Version or a hyphentated RuntimeType-Version or a Version prefixed by 'versionString'.
public static RuntimeFramework Parse(string s)
Parameters
s
string
Returns
Supports(RuntimeFramework)
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 bool Supports(RuntimeFramework target)
Parameters
target
RuntimeFrameworkThe RuntimeFramework to be matched.
Returns
- bool
True on match, otherwise false
ToString()
Overridden to return the short name of the framework
public override string ToString()