Class RemoteExtension
- Namespace
- DMediatR
- Assembly
- DMediatR.dll
IRemote extension methods for connecting to a Dto gRPC service from a MediatR handler.
public static class RemoteExtension
- Inheritance
-
RemoteExtension
- Inherited Members
Methods
PublishRemote(IRemote, ICorrelatedNotification, CancellationToken)
Publish the notification to all distinct connected remote nodes.
public static Task PublishRemote(this IRemote provider, ICorrelatedNotification notification, CancellationToken cancellationToken)
Parameters
providerIRemoteThe class providing a MediatR handler
notificationICorrelatedNotificationThe MediatR ICorrelatedNotification.
cancellationTokenCancellationToken
Returns
SendRemote<TResponse>(IRemote, HostOptions, IRequest<TResponse>, CancellationToken)
Send a MediatR IRequest to an explicitly given remote node and receive a TResponse.
public static Task<TResponse> SendRemote<TResponse>(this IRemote provider, HostOptions toHost, IRequest<TResponse> request, CancellationToken cancellationToken)
Parameters
providerIRemotetoHostHostOptionsrequestIRequest<TResponse>cancellationTokenCancellationToken
Returns
- Task<TResponse>
Type Parameters
TResponse
SendRemote<TResponse>(IRemote, IRequest<TResponse>, CancellationToken)
Send a MediatR IRequest to a configured remote node and receive a TResponse.
public static Task<TResponse> SendRemote<TResponse>(this IRemote provider, IRequest<TResponse> request, CancellationToken cancellationToken)
Parameters
providerIRemoteThe class providing a MediatR handler.
requestIRequest<TResponse>The MediatR IRequest.
cancellationTokenCancellationToken
Returns
- Task<TResponse>
The MediatR TResponse.
Type Parameters
TResponse