8 private readonly
string[] _diagnostics;
9 private readonly
string[] _limitations;
17 string solverName =
"",
18 string solverVersion =
"",
19 string installationPath =
"",
20 string managedAssemblyPath =
"",
21 string nativeLibraryPath =
"",
22 string licenseInformation =
"",
23 IEnumerable<string>? diagnostics =
null,
24 IEnumerable<string>? limitations =
null)
28 throw new ArgumentOutOfRangeException(
30 "Availability information must target a concrete solver.");
41 _diagnostics = CopyNonBlank(diagnostics);
42 _limitations = CopyNonBlank(limitations);
81 private static string[] CopyNonBlank(IEnumerable<string>? values)
89 .Where(
static value => !
string.IsNullOrWhiteSpace(value))
90 .Select(
static value => value.Trim())
IReadOnlyList< string > Limitations
Gets detected functional limitations.
SolverAvailabilityStatus Status
Gets the detected availability status.
SolverKind SolverKind
Gets the concrete solver kind.
SolverAvailabilityInfo(SolverKind solverKind, SolverAvailabilityStatus status, string solverName="", string solverVersion="", string installationPath="", string managedAssemblyPath="", string nativeLibraryPath="", string licenseInformation="", IEnumerable< string >? diagnostics=null, IEnumerable< string >? limitations=null)
Initializes an availability result.
string InstallationPath
Gets the detected installation root.
string SolverName
Gets the solver display name.
string SolverVersion
Gets the detected solver version.
string NativeLibraryPath
Gets the native library or executable path, when applicable.
string LicenseInformation
Gets detected licensing information.
IReadOnlyList< string > Diagnostics
Gets diagnostics produced during availability detection.
string ManagedAssemblyPath
Gets the managed assembly path, when applicable.
bool IsUsable
Gets whether the solver can be selected for use.
SolverAvailabilityStatus
Describes whether a solver can currently be used on the current computer.
@ Available
The solver is installed, loadable and usable.