Interface IResult
- Namespace
- LightResults
- Assembly
- LightResults.dll
Defines a result.
public interface IResultProperties
Errors
Gets a read-only collection of errors associated with the result.
IReadOnlyCollection<IError> Errors { get; }Property Value
Methods
HasError<TError>()
Checks if the result contains an error of the specified type.
bool HasError<TError>() where TError : IErrorReturns
- bool
-
trueif an error of the specified type exists; otherwise,false.
Type Parameters
TError-
The type of error to check for.
HasError<TError>(out TError)
Checks if the result contains an error of the specified type.
bool HasError<TError>(out TError error) where TError : IErrorParameters
errorTError-
The error of the specified type.
Returns
- bool
-
trueif an error of the specified type exists; otherwise,false.
Type Parameters
TError-
The type of error to check for.
IsFailure()
Determines whether the result is a failure.
bool IsFailure()Returns
- bool
-
trueif the result is a failure; otherwise,false.
IsFailure(out IError)
Determines whether the result is a failure.
bool IsFailure(out IError error)Parameters
errorIError-
The error of the result.
Returns
- bool
-
trueif the result is a failure; otherwise,false.
IsSuccess()
Determines whether the result was successful.
bool IsSuccess()Returns
- bool
-
trueif the result was successful; otherwise,false.