Struct Outcome
- Namespace
- Kevlar
- Assembly
- Kevlar.dll
The result of a void execution: either success or a captured exception.
public readonly struct Outcome
- Inherited Members
Properties
Exception
The captured exception, or null when execution succeeded.
public Exception? Exception { get; }
Property Value
IsSuccess
true when execution completed without an exception.
public bool IsSuccess { get; }
Property Value
Success
Gets a successful void outcome.
public static Outcome Success { get; }
Property Value
Methods
FromException(Exception)
Creates an outcome holding a captured exception.
public static Outcome FromException(Exception exception)
Parameters
exceptionException
Returns
Rethrow()
Rethrows the captured exception with its original stack trace preserved.
public void Rethrow()
ToString()
public override string ToString()