Class Result
- Namespace
- Glitch9
Represents the base class for result objects, providing success, failure, and error states.
public class Result : IResult
- Inheritance
-
Result
- Implements
- Derived
- Inherited Members
- Extension Methods
Properties
ErrorMessage
public virtual string ErrorMessage { get; set; }
Property Value
Exception
public Exception Exception { get; set; }
Property Value
IsError
public bool IsError { get; set; }
Property Value
IsFailure
public bool IsFailure { get; set; }
Property Value
IsSuccess
public bool IsSuccess { get; set; }
Property Value
Message
public string Message { get; set; }
Property Value
StackTrace
public string StackTrace { get; }
Property Value
Methods
Fail(Exception, params string[])
public static IResult Fail(Exception e, params string[] failReasons)
Parameters
Returns
Fail(string)
public static IResult Fail(string errorMessage = null)
Parameters
errorMessage
string
Returns
Success()
public static IResult Success()
Returns
Success(string)
public static IResult Success(string message)
Parameters
message
string