Interface IFireForgetActivator<TRequest>
Specifies a way of invoking Fire-and-Forget/In-Only MEP delegates that handles TRequest.
public interface IFireForgetActivator<in TRequest>
Type Parameters
TRequestThe type of the model to invoke on a handler.
Methods
TryInvoke(TRequest)
Invokes (if registered) the delegate handling the specified request.
bool TryInvoke(TRequest request)
Parameters
requestTRequestThe model that is handled by a delegate.
Returns
- bool
trueif the delegate handling the specifiedrequestwas invoked,falseotherwise.
TryInvokeAsync(TRequest, CancellationToken)
Invokes (if registered) the function delegate handling the specified request.
Task<ConditionalValue> TryInvokeAsync(TRequest request, CancellationToken ct = default)
Parameters
requestTRequestThe model that is handled by a function delegate.
ctCancellationTokenThe cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<ConditionalValue>
trueif the function delegate handling the specifiedrequestwas invoked,falseotherwise.
See Also
IFireForgetRegistry<TRequest>