ExceptionMatchAsync<R> Class

Pattern matching for exceptions. This is to aid expression based error handling.

DECLARATION
[Serializable]
public class ExceptionMatchAsync<R>
NAMESPACE
LanguageExt

Methods

Otherwise(R)
SUMMARY

Invokes the match expression and provides a default value if nothing matches

PARAMETERS
otherwiseValue
R
Default value
DECLARATION
[Pure]
public Task<R> Otherwise(R otherwiseValue)
RETURNS
Task<R>
Result of the expression
Otherwise(Func<R>)
SUMMARY

Invokes the match expression and provides a default function to invoke if nothing matches

PARAMETERS
otherwise
Func<R>
Default value
DECLARATION
[Pure]
public Task<R> Otherwise(Func<R> otherwise)
RETURNS
Task<R>
Result of the expression
Otherwise(Func<Exception, R>)
SUMMARY

Invokes the match expression and provides a default function to invoke if nothing matches

PARAMETERS
otherwiseMap
Func<Exception, R>
Default value
DECLARATION
[Pure]
public Task<R> Otherwise(Func<Exception, R> otherwiseMap)
RETURNS
Task<R>
Result of the expression
OtherwiseReThrow()
SUMMARY

Invokes the match expression and provides a default value if nothing matches

DECLARATION
[Pure]
public Task<R> OtherwiseReThrow()
RETURNS
Task<R>
Result of the expression