Interface IResult
- Namespace
- LightResults
- Assembly
- LightResults.dll
Defines a result.
public interface IResult
Properties
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 : IError
Returns
- bool
-
true
if 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 : IError
Parameters
error
TError-
The error of the specified type.
Returns
- bool
-
true
if an error of the specified type exists; otherwise,false
.
Type Parameters
TError
-
The type of error to check for.
IsFailure()
Determines whether the result failure.
bool IsFailure()
Returns
- bool
-
true
if the result failure; otherwise,false
.
IsFailure(out IError)
Determines whether the result failure.
bool IsFailure(out IError error)
Parameters
error
IError-
The error of the result.
Returns
- bool
-
true
if the result failure; otherwise,false
.
IsSuccess()
Determines whether the result was successful.
bool IsSuccess()
Returns
- bool
-
true
if the result was successful; otherwise,false
.