Improve this Doc
View Source
Class Failure<T>
Represents the failed outcome of an operation.
Inheritance
System.Object
Failure<T>
Namespace:NiceTry
Assembly:NiceTry.dll
Syntax
public sealed class Failure<T> : Try<T>, IComparable<Try<T>>, IEquatable<Try<T>>, IComparable, IStructuralComparable, IStructuralEquatable
Type Parameters
Methods
|
Improve this Doc
View Source
IfFailure(Action<Exception>)
Declaration
public override void IfFailure(Action<Exception> sideEffect)
Parameters
Type |
Name |
Description |
System.Action<System.Exception> |
sideEffect |
|
|
Improve this Doc
View Source
IfSuccess(Action<T>)
Declaration
public override void IfSuccess(Action<T> sideEffect)
Parameters
Type |
Name |
Description |
System.Action<T> |
sideEffect |
|
|
Improve this Doc
View Source
Match(Action<T>, Action<Exception>)
Declaration
public override void Match(Action<T> success, Action<Exception> failure)
Parameters
Type |
Name |
Description |
System.Action<T> |
success |
|
System.Action<System.Exception> |
failure |
|
|
Improve this Doc
View Source
Match<B>(Func<T, B>, Func<Exception, B>)
Declaration
public override B Match<B>(Func<T, B> success, Func<Exception, B> failure)
Parameters
Type |
Name |
Description |
System.Func<T, B> |
success |
|
System.Func<System.Exception, B> |
failure |
|
Returns
Type Parameters