2using System.Collections.Generic;
3using System.Xml.Serialization;
14[XmlType(TypeName =
"solverSelectionResult")]
17 private readonly List<string> _diagnostics =
41 [XmlAttribute(
"requestedSolver")]
52 [XmlAttribute(
"selectedSolver")]
62 [XmlElement(
"adapterId")]
72 [XmlElement(
"adapterName")]
97 [XmlElement(
"availability")]
107 [XmlArray(
"diagnostics")]
108 [XmlArrayItem(
"diagnostic")]
137 if (
string.IsNullOrWhiteSpace(
140 throw new ArgumentException(
141 "A solver-selection diagnostic cannot be empty.",
168 ArgumentNullException.ThrowIfNull(
171 ArgumentNullException.ThrowIfNull(
Describes the availability and detected installation details of a mathematical optimization solver.
void SetSelection(ISolverAdapter adapter, SolverAvailabilityInfo availability)
Sets the selected adapter and copies its identity information into this result.
SolverSelectionResult()
Initializes an empty solver-selection result.
void AddDiagnostic(string message)
Adds a diagnostic message.
List< string > Diagnostics
Gets the diagnostics produced during solver selection.
SolverKind RequestedSolver
Gets or sets the solver requested by the caller.
string AdapterName
Gets or sets the display name of the selected adapter.
SolverKind SelectedSolver
Gets or sets the solver selected by the selection service.
string AdapterId
Gets or sets the identifier of the selected adapter.
ISolverAdapter? Adapter
Gets or sets the selected live adapter instance.
bool IsSuccessful
Gets a value indicating whether a usable adapter was selected.
SolverAvailabilityInfo? Availability
Gets or sets the availability information associated with the selected solver.
SolverKind SolverKind
Gets the solver kind implemented by this adapter.
Defines the metadata and capabilities exposed by a solver adapter plugin.
string AdapterId
Gets the unique adapter identifier.
string AdapterName
Gets the adapter display name.
SolverKind
Identifies a supported mathematical optimization solver.
@ Automatic
The solver is selected automatically from the adapters available on the current computer.
@ Unknown
No solver has been specified.