Table of Contents

Class HandleableExtensions

Namespace
Executables.Handling
Assembly
executables.dll

Extension methods for handleable objects.

public static class HandleableExtensions
Inheritance
HandleableExtensions
Inherited Members

Methods

Handle(IHandleable<Unit, Unit>, Action)

Registers a parameterless action as a handler.

public static IDisposable Handle(this IHandleable<Unit, Unit> handleable, Action handler)

Parameters

handleable IHandleable<Unit, Unit>
handler Action

Returns

IDisposable

Handle<T>(IHandleable<Unit, T>, Func<T>)

Registers a parameterless function as a handler.

public static IDisposable Handle<T>(this IHandleable<Unit, T> handleable, Func<T> handler)

Parameters

handleable IHandleable<Unit, T>
handler Func<T>

Returns

IDisposable

Type Parameters

T

Handle<T>(IHandleable<T, Unit>, Action<T>)

Registers an action as a handler.

public static IDisposable Handle<T>(this IHandleable<T, Unit> handleable, Action<T> handler)

Parameters

handleable IHandleable<T, Unit>
handler Action<T>

Returns

IDisposable

Type Parameters

T

Handle<T1, T2>(IHandleable<T1, T2>, Func<T1, T2>)

Registers a function as a handler.

public static IDisposable Handle<T1, T2>(this IHandleable<T1, T2> handleable, Func<T1, T2> handler)

Parameters

handleable IHandleable<T1, T2>
handler Func<T1, T2>

Returns

IDisposable

Type Parameters

T1
T2

Merge<T1, T2, THandler>(IHandleable<T1, T2, THandler>, IHandleable<T1, T2, THandler>)

Merges two handleables into one registration target.

[Pure]
public static IHandleable<T1, T2, THandler> Merge<T1, T2, THandler>(this IHandleable<T1, T2, THandler> first, IHandleable<T1, T2, THandler> second) where THandler : Handler<T1, T2>

Parameters

first IHandleable<T1, T2, THandler>

First handleable.

second IHandleable<T1, T2, THandler>

Second handleable.

Returns

IHandleable<T1, T2, THandler>

Composite handleable that registers handlers in both sources.

Type Parameters

T1
T2
THandler

Exceptions

ArgumentNullException

second is null.