Table of Contents

Class AsyncHandlersExtensions

Namespace
Executables.Handling
Assembly
executables.dll

Extension methods for asynchronous handlers.

public static class AsyncHandlersExtensions
Inheritance
AsyncHandlersExtensions
Inherited Members

Methods

DisposeOnUnhandledException<T1, T2>(AsyncHandler<T1, T2>)

Disposes the handler automatically when an unhandled exception escapes execution.

[Pure]
public static AsyncHandler<T1, T2> DisposeOnUnhandledException<T1, T2>(this AsyncHandler<T1, T2> handler)

Parameters

handler AsyncHandler<T1, T2>

Source handler.

Returns

AsyncHandler<T1, T2>

Auto-disposing handler wrapper.

Type Parameters

T1
T2

OnDispose<T1, T2>(AsyncHandler<T1, T2>, Action)

Adds disposal callback behavior to a handler.

[Pure]
public static AsyncHandler<T1, T2> OnDispose<T1, T2>(this AsyncHandler<T1, T2> handler, Action dispose)

Parameters

handler AsyncHandler<T1, T2>

Source handler.

dispose Action

Callback invoked during disposal.

Returns

AsyncHandler<T1, T2>

Handler with disposal callback behavior.

Type Parameters

T1
T2

Exceptions

ArgumentNullException

dispose is null.