Class ResultProblem
Represents a problem encountered during an operation.
public class ResultProblem
- Inheritance
-
ResultProblem
- Inherited Members
Constructors
ResultProblem(Exception, string, params object[])
Initializes a new instance of the ResultProblem class from an Exception.
public ResultProblem(Exception exception, string message, params object[] args)
Parameters
exceptionExceptionThe exception that caused the problem, if any.
messagestringThe message describing the problem.
argsobject[]Optional arguments providing additional details about the problem.
ResultProblem(string, params object[])
Initializes a new instance of the ResultProblem class.
public ResultProblem(string message, params object[] args)
Parameters
messagestringThe message describing the problem.
argsobject[]Optional arguments providing additional details about the problem.
Fields
DefaultPrintDebug
Gets or sets the default value indicating whether to print debug information.
public static bool DefaultPrintDebug
Field Value
DefaultSeverity
Gets or sets the default severity level of the problem.
public static int DefaultSeverity
Field Value
DefaultSource
Gets or sets the default source of the problem, if any.
public static string? DefaultSource
Field Value
DefaultTags
Gets or sets the default tags categorizing the problem.
public static string[] DefaultTags
Field Value
- string[]
Properties
Args
Gets the optional arguments providing additional details about the problem.
public object[] Args { get; }
Property Value
- object[]
Exception
Gets the exception that caused the problem, if any.
public Exception? Exception { get; }
Property Value
Message
Gets the message describing the problem.
public string Message { get; }
Property Value
OriginInformation
Gets the origin information of the problem.
public ProblemOriginInformation OriginInformation { get; }
Property Value
Severity
Gets the severity level of the problem, where higher values indicate more severe problems. The default value can be set using DefaultSeverity.
public int Severity { get; init; }
Property Value
Source
Gets the source of the problem, if any. The default value can be set using DefaultSource.
public string? Source { get; init; }
Property Value
Tags
Gets the optional tags categorizing the problem. The default value can be set using DefaultTags.
public string[] Tags { get; init; }
Property Value
- string[]
Methods
ToBriefString()
Formats the problem as a string for brief display, omitting references to code locations.
public string ToBriefString()
Returns
- string
The formatted string.
ToDebugString()
Formats the problem as a string for debugging purposes.
public string ToDebugString()
Returns
- string
The formatted string.
ToString()
Formats the problem as a string. If DefaultPrintDebug is true, ToDebugString() is used; otherwise, ToBriefString() is used.
public override string ToString()
Returns
- string
The formatted string.