Struct BuilderDiagnostic
- Namespace
- Farkle.Diagnostics.Builder
- Assembly
- Farkle.dll
Contains information about actions performed by Farkle's builder.
public readonly struct BuilderDiagnostic : IFormattable
- Implements
- Inherited Members
Constructors
BuilderDiagnostic(DiagnosticSeverity, object, string?)
Creates a BuilderDiagnostic.
public BuilderDiagnostic(DiagnosticSeverity severity, object message, string? code = null)
Parameters
severity
DiagnosticSeverityThe value of Severity.
message
objectThe value of Message.
code
stringThe value of Code. Optional.
Exceptions
- ArgumentNullException
message
is null.
Properties
Code
The code of the diagnostic.
public string? Code { get; }
Property Value
Message
An object that describes the message.
public object Message { get; }
Property Value
Severity
The severity of the diagnostic.
public DiagnosticSeverity Severity { get; }
Property Value
Methods
ToString()
Returns the fully qualified type name of this instance.
public override string ToString()
Returns
- string
The fully qualified type name.
ToString(string?, IFormatProvider?)
Formats the value of the current instance using the specified format.
public string ToString(string? format, IFormatProvider? formatProvider)
Parameters
format
stringThe format to use.
-or-
A null reference (
Nothing
in Visual Basic) to use the default format defined for the type of the IFormattable implementation.formatProvider
IFormatProviderThe provider to use to format the value.
-or-
A null reference (
Nothing
in Visual Basic) to obtain the numeric format information from the current locale setting of the operating system.
Returns
- string
The value of the current instance in the specified format.