Class ResultExtensions
Inheritance
ResultExtensions
Assembly: Code.Library.dll
Syntax
public static class ResultExtensions
Methods
|
Improve this Doc
View Source
Ensure(Result, Func<bool>, string)
Declaration
public static Result Ensure(this Result result, Func<bool> predicate, string errorMessage)
Parameters
Returns
|
Improve this Doc
View Source
Ensure<T>(Result<T>, Func<T, bool>, string)
Declaration
public static Result<T> Ensure<T>(this Result<T> result, Func<T, bool> predicate, string errorMessage)
Parameters
Returns
Type Parameters
|
Improve this Doc
View Source
Map<T>(Result, Func<T>)
Declaration
public static Result<T> Map<T>(this Result result, Func<T> func)
Parameters
Returns
Type Parameters
|
Improve this Doc
View Source
Map<T, K>(Result<T>, Func<T, K>)
Declaration
public static Result<K> Map<T, K>(this Result<T> result, Func<T, K> func)
Parameters
Type |
Name |
Description |
Result<T> |
result |
|
Func<T, K> |
func |
|
Returns
Type Parameters
|
Improve this Doc
View Source
OnBoth<T>(Result, Func<Result, T>)
Declaration
public static T OnBoth<T>(this Result result, Func<Result, T> func)
Parameters
Returns
Type Parameters
|
Improve this Doc
View Source
OnBoth<T, K>(Result<T>, Func<Result<T>, K>)
Declaration
public static K OnBoth<T, K>(this Result<T> result, Func<Result<T>, K> func)
Parameters
Returns
Type Parameters
|
Improve this Doc
View Source
OnFailure(Result, Action)
Declaration
public static Result OnFailure(this Result result, Action action)
Parameters
Type |
Name |
Description |
Result |
result |
The result.
|
Action |
action |
The action.
|
Returns
|
Improve this Doc
View Source
OnFailure(Result, Action<string>)
Declaration
public static Result OnFailure(this Result result, Action<string> action)
Parameters
Returns
|
Improve this Doc
View Source
OnFailure<T>(Result<T>, Action)
Declaration
public static Result<T> OnFailure<T>(this Result<T> result, Action action)
Parameters
Returns
Type Parameters
|
Improve this Doc
View Source
OnFailure<T>(Result<T>, Action<string>)
Declaration
public static Result<T> OnFailure<T>(this Result<T> result, Action<string> action)
Parameters
Returns
Type Parameters
Name |
Description |
T |
generic type
|
|
Improve this Doc
View Source
OnSuccess(Result, Action)
Declaration
public static Result OnSuccess(this Result result, Action action)
Parameters
Returns
|
Improve this Doc
View Source
OnSuccess(Result, Func<Result>)
Declaration
public static Result OnSuccess(this Result result, Func<Result> func)
Parameters
Returns
|
Improve this Doc
View Source
OnSuccess<T>(Result, Func<Result<T>>)
Declaration
public static Result<T> OnSuccess<T>(this Result result, Func<Result<T>> func)
Parameters
Returns
Type Parameters
|
Improve this Doc
View Source
OnSuccess<T>(Result, Func<T>)
Declaration
public static Result<T> OnSuccess<T>(this Result result, Func<T> func)
Parameters
Returns
Type Parameters
|
Improve this Doc
View Source
OnSuccess<T>(Result<T>, Action<T>)
Declaration
public static Result<T> OnSuccess<T>(this Result<T> result, Action<T> action)
Parameters
Returns
Type Parameters
|
Improve this Doc
View Source
OnSuccess<T>(Result<T>, Func<T, Result>)
Declaration
public static Result OnSuccess<T>(this Result<T> result, Func<T, Result> func)
Parameters
Returns
Type Parameters
|
Improve this Doc
View Source
OnSuccess<T, K>(Result<T>, Func<Result<K>>)
Declaration
public static Result<K> OnSuccess<T, K>(this Result<T> result, Func<Result<K>> func)
Parameters
Returns
Type Parameters
|
Improve this Doc
View Source
OnSuccess<T, K>(Result<T>, Func<T, Result<K>>)
Declaration
public static Result<K> OnSuccess<T, K>(this Result<T> result, Func<T, Result<K>> func)
Parameters
Returns
Type Parameters
|
Improve this Doc
View Source
OnSuccess<T, K>(Result<T>, Func<T, K>)
Declaration
public static Result<K> OnSuccess<T, K>(this Result<T> result, Func<T, K> func)
Parameters
Type |
Name |
Description |
Result<T> |
result |
|
Func<T, K> |
func |
|
Returns
Type Parameters