Class Result
Represents information about the success or failure of particular action.
public class Result
- Inheritance
-
Result
- Derived
-
Result<T>
Constructors
Properties
- ErrorMessage
Gets a message contains error information.
- IsFailure
Gets a value indicating whether action was failed.
- IsSuccess
Gets a value indicating whether action was succeed.
Methods
- Combine(params Result[])
Examines specified collection for the unsuccessful result.
- Fail(string)
Creates a new
Alternet.Common.Result
for unsuccessful action.
- Fail<T>(string)
Creates a new generic
Alternet.Common.Result
for unsuccessful action.
- Ok()
Creates a new
Alternet.Common.Result
for successful action.
- Ok<T>(T)
Creates a new
Alternet.Common.Result
for successful action.
- OnBoth(Action<Result>)
Executes specified function to update result of the executed action.
- OnFailure(Action)
Executes specified function if result represents unsuccessful action.
- OnFailure(Action<Result>)
Executes specified function to update result of the executed action if result represents unsuccessful action.
- OnSuccess(Action)
Executes specified function if result represents successful action.
- OnSuccess(Func<Result>)
Executes specified function if result represents successful action.