Interface IResult<TValue>
- Namespace
- LightResults
- Assembly
- LightResults.dll
Defines a result with a value.
public interface IResult<TValue> : IResultType Parameters
TValue-
The type of value.
Implements
Methods
IsFailure(out IError, out TValue)
Determines whether the result is a failure.
bool IsFailure(out IError error, out TValue value)Parameters
errorIError-
The error of the result.
valueTValue-
The value of the result.
Returns
- bool
-
trueif the result is a failure; otherwise,false.
IsSuccess(out TValue)
Determines whether the result was successful.
bool IsSuccess(out TValue value)Parameters
valueTValue-
The value of the result.
Returns
- bool
-
trueif the result was successful; otherwise,false.
IsSuccess(out TValue, out IError)
Determines whether the result was successful.
bool IsSuccess(out TValue value, out IError error)Parameters
valueTValue-
The value of the result.
errorIError-
The error of the result.
Returns
- bool
-
trueif the result was successful; otherwise,false.