public Supports ( RuntimeFramework target ) : bool | ||
target | RuntimeFramework | The RuntimeFramework to be matched. |
return | bool |
public bool Supports(RuntimeFramework target)
{
if (Runtime != RuntimeType.Any
&& target.Runtime != RuntimeType.Any
&& Runtime != target.Runtime)
return false;
if (AllowAnyVersion || target.AllowAnyVersion)
return true;
if (!VersionsMatch(ClrVersion, target.ClrVersion))
return false;
return FrameworkVersion.Major >= target.FrameworkVersion.Major && FrameworkVersion.Minor >= target.FrameworkVersion.Minor;
}
private bool IsRuntimeSupported(RuntimeType runtime, string versionSpecification) { Version version = versionSpecification == null ? RuntimeFramework.DefaultVersion : new Version(versionSpecification); RuntimeFramework target = new RuntimeFramework(runtime, version); return(_rt.Supports(target)); }