Table of Contents

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

code string
message string
severity ValidationSeverity

Remarks

Creates a new validation issue.

Properties

Code

Gets the error code.

public string Code { get; init; }

Property Value

string

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

string

Severity

Gets the severity level.

public ValidationSeverity Severity { get; init; }

Property Value

ValidationSeverity

Source

Gets the source location if applicable.

public string? Source { get; init; }

Property Value

string

Methods

Error(string, string)

Creates an error validation issue.

public static ValidationIssue Error(string code, string message)

Parameters

code string
message string

Returns

ValidationIssue

Warning(string, string)

Creates a warning validation issue.

public static ValidationIssue Warning(string code, string message)

Parameters

code string
message string

Returns

ValidationIssue