Class HandlersExtensions
- Namespace
- Executables.Handling
- Assembly
- executables.dll
Extension methods for handlers.
public static class HandlersExtensions
- Inheritance
-
HandlersExtensions
- Inherited Members
Methods
DisposeOnUnhandledException<T1, T2>(Handler<T1, T2>)
Disposes the handler automatically when an unhandled exception escapes execution.
[Pure]
public static Handler<T1, T2> DisposeOnUnhandledException<T1, T2>(this Handler<T1, T2> handler)
Parameters
handlerHandler<T1, T2>Source handler.
Returns
- Handler<T1, T2>
Auto-disposing handler wrapper.
Type Parameters
T1T2
OnDispose<T1, T2>(Handler<T1, T2>, Action)
Adds disposal callback behavior to a handler.
[Pure]
public static Handler<T1, T2> OnDispose<T1, T2>(this Handler<T1, T2> handler, Action dispose)
Parameters
Returns
- Handler<T1, T2>
Handler with disposal callback behavior.
Type Parameters
T1T2
Exceptions
- ArgumentNullException
disposeis null.
ToAsyncHandler<T1, T2>(Handler<T1, T2>)
Converts a synchronous handler into an asynchronous handler.
[Pure]
public static AsyncHandler<T1, T2> ToAsyncHandler<T1, T2>(this Handler<T1, T2> handler)
Parameters
handlerHandler<T1, T2>Source handler.
Returns
- AsyncHandler<T1, T2>
Asynchronous proxy handler.
Type Parameters
T1T2