LotSizingDataModel.Instance 2.0.1
Lot-sizing instance representation, descriptors and problem characterization.
Loading...
Searching...
No Matches
LotSizingProblemClassAliasResolution.cs
Go to the documentation of this file.
2
3/// <summary>
4/// Result of resolving a literature/project acronym or canonical code.
5/// </summary>
7{
9 string query,
10 IEnumerable<LotSizingProblemClassDefinition> matches)
11 {
12 Query = query;
13
14 Matches =
15 matches
16 .DistinctBy(definition => definition.Id)
17 .OrderBy(definition => definition.Code, StringComparer.Ordinal)
18 .ToArray();
19
20 Kind =
21 Matches.Count switch
22 {
26 };
27 }
28
29 public string Query { get; }
31 public IReadOnlyList<LotSizingProblemClassDefinition> Matches { get; }
32
35 ? Matches[0]
36 : null;
37}
LotSizingProblemClassAliasResolution(string query, IEnumerable< LotSizingProblemClassDefinition > matches)