Table of Contents

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

string

Exception

public Exception Exception { get; set; }

Property Value

Exception

IsError

public bool IsError { get; set; }

Property Value

bool

IsFailure

public bool IsFailure { get; set; }

Property Value

bool

IsSuccess

public bool IsSuccess { get; set; }

Property Value

bool

Message

public string Message { get; set; }

Property Value

string

StackTrace

public string StackTrace { get; }

Property Value

string

Methods

Fail(Exception, params string[])

public static IResult Fail(Exception e, params string[] failReasons)

Parameters

e Exception
failReasons string[]

Returns

IResult

Fail(string)

public static IResult Fail(string errorMessage = null)

Parameters

errorMessage string

Returns

IResult

Success()

public static IResult Success()

Returns

IResult

Success(string)

public static IResult Success(string message)

Parameters

message string

Returns

IResult