LotSizingDataModel.Instance 2.0.1
Lot-sizing instance representation, descriptors and problem characterization.
Loading...
Searching...
No Matches
ScientificClassificationDiagnostic.cs
Go to the documentation of this file.
2
3/// <summary>
4/// One structured diagnostic emitted by the scientific classification engine.
5/// </summary>
7{
9 string code,
11 string path,
12 string message)
13 {
14 if (string.IsNullOrWhiteSpace(code))
15 {
16 throw new ArgumentException(
17 "A scientific-classification diagnostic code is required.",
18 nameof(code));
19 }
20
21 ArgumentNullException.ThrowIfNull(path);
22 ArgumentNullException.ThrowIfNull(message);
23
24 Code = code.Trim();
25 Severity = severity;
26 Path = path;
27 Message = message;
28 }
29
30 public string Code { get; }
32 public string Path { get; }
33 public string Message { get; }
34
35 public bool IsError =>
36 Severity ==
38
39 public override string ToString() =>
40 $"[{Severity}] {Code} at {Path}: {Message}";
41}
ScientificClassificationDiagnostic(string code, ScientificClassificationDiagnosticSeverity severity, string path, string message)