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.
1
namespace
LotSizingDataModel.Checker.Pipeline.Scientific
;
2
3
/// <summary>
4
/// Stable structured diagnostic emitted by the end-to-end scientific solve
5
/// pipeline.
6
/// </summary>
7
public
sealed
class
ScientificSolvePipelineDiagnostic
8
{
9
public
ScientificSolvePipelineDiagnostic
(
10
string
code,
11
ScientificSolvePipelineDiagnosticSeverity
severity,
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
; }
29
public
ScientificSolvePipelineDiagnosticSeverity
Severity
{
get
; }
30
public
string
Path
{
get
; }
31
public
string
Message
{
get
; }
32
33
public
bool
IsError
=>
34
Severity
==
35
ScientificSolvePipelineDiagnosticSeverity
.Error;
36
37
public
override
string
ToString
() =>
38
$
"[{Severity}] {Code} at {Path}: {Message}"
;
39
}
LotSizingDataModel.Checker.Pipeline.Scientific.ScientificSolvePipelineDiagnostic.IsError
bool IsError
Definition
ScientificSolvePipelineDiagnostic.cs:33
LotSizingDataModel.Checker.Pipeline.Scientific.ScientificSolvePipelineDiagnostic.Severity
ScientificSolvePipelineDiagnosticSeverity Severity
Definition
ScientificSolvePipelineDiagnostic.cs:29
LotSizingDataModel.Checker.Pipeline.Scientific.ScientificSolvePipelineDiagnostic.Code
string Code
Definition
ScientificSolvePipelineDiagnostic.cs:28
LotSizingDataModel.Checker.Pipeline.Scientific.ScientificSolvePipelineDiagnostic.Path
string Path
Definition
ScientificSolvePipelineDiagnostic.cs:30
LotSizingDataModel.Checker.Pipeline.Scientific.ScientificSolvePipelineDiagnostic.ToString
override string ToString()
Definition
ScientificSolvePipelineDiagnostic.cs:37
LotSizingDataModel.Checker.Pipeline.Scientific.ScientificSolvePipelineDiagnostic.Message
string Message
Definition
ScientificSolvePipelineDiagnostic.cs:31
LotSizingDataModel.Checker.Pipeline.Scientific.ScientificSolvePipelineDiagnostic.ScientificSolvePipelineDiagnostic
ScientificSolvePipelineDiagnostic(string code, ScientificSolvePipelineDiagnosticSeverity severity, string path, string message)
Definition
ScientificSolvePipelineDiagnostic.cs:9
LotSizingDataModel.Checker.Pipeline.Scientific
Definition
IScientificLotSizingSolvePipeline.cs:1
LotSizingDataModel.Checker.Pipeline.Scientific.ScientificSolvePipelineDiagnosticSeverity
ScientificSolvePipelineDiagnosticSeverity
Definition
ScientificSolvePipelineDiagnosticSeverity.cs:4
LotSizingDataModel.Checker
Pipeline
Scientific
ScientificSolvePipelineDiagnostic.cs
Generated by
1.17.0