Class ValidationIssue
- Namespace
- DotCompute.Abstractions.Validation
- Assembly
- DotCompute.Abstractions.dll
Represents a validation issue (error or warning).
public sealed class ValidationIssue
- Inheritance
-
ValidationIssue
- Inherited Members
Remarks
Creates a new validation issue.
Constructors
ValidationIssue(string, string, ValidationSeverity)
Represents a validation issue (error or warning).
public ValidationIssue(string code, string message, ValidationSeverity severity = ValidationSeverity.Error)
Parameters
codestringmessagestringseverityValidationSeverity
Remarks
Creates a new validation issue.
Properties
Code
Gets the error code.
public string Code { get; init; }
Property Value
Column
Gets the column number if applicable.
public int? Column { get; init; }
Property Value
- int?
Line
Gets the line number if applicable.
public int? Line { get; init; }
Property Value
- int?
Message
Gets the error message.
public string Message { get; init; }
Property Value
Severity
Gets the severity level.
public ValidationSeverity Severity { get; init; }
Property Value
Source
Gets the source location if applicable.
public string? Source { get; init; }
Property Value
Methods
Error(string, string)
Creates an error validation issue.
public static ValidationIssue Error(string code, string message)
Parameters
Returns
Warning(string, string)
Creates a warning validation issue.
public static ValidationIssue Warning(string code, string message)