LotSizingDataModel.Checker 2.0.1
Reusable validation engine for structural, mathematical and objective consistency checks.
Loading...
Searching...
No Matches
ScientificSolvePipelineDiagnostic.cs
Go to the documentation of this file.
2
3/// <summary>
4/// Stable structured diagnostic emitted by the end-to-end scientific solve
5/// pipeline.
6/// </summary>
8{
10 string code,
12 string path,
13 string message)
14 {
15 if (string.IsNullOrWhiteSpace(code))
16 {
17 throw new ArgumentException(
18 "A scientific solve-pipeline diagnostic code is required.",
19 nameof(code));
20 }
21
22 Code = code.Trim();
23 Severity = severity;
24 Path = path ?? string.Empty;
25 Message = message ?? string.Empty;
26 }
27
28 public string Code { get; }
30 public string Path { get; }
31 public string Message { get; }
32
33 public bool IsError =>
34 Severity ==
36
37 public override string ToString() =>
38 $"[{Severity}] {Code} at {Path}: {Message}";
39}
ScientificSolvePipelineDiagnostic(string code, ScientificSolvePipelineDiagnosticSeverity severity, string path, string message)