Table of Contents

Class DtoService

Namespace
DMediatR
Assembly
DMediatR.dll

Dto consumer to be used in the gRPC server.

public class DtoService : IDtoService
Inheritance
DtoService
Implements
Inherited Members

Constructors

DtoService(IMediator, ISerializer, IMemoryCache, IOptions<CertificateOptions>, IOptions<GrpcOptions>)

public DtoService(IMediator mediator, ISerializer serializer, IMemoryCache cache, IOptions<CertificateOptions> certOptions, IOptions<GrpcOptions> grpcOptions)

Parameters

mediator IMediator
serializer ISerializer
cache IMemoryCache
certOptions IOptions<CertificateOptions>
grpcOptions IOptions<GrpcOptions>

Methods

PublishAsync(Dto, CallContext)

Send the deserialized notification to the local handlers including NotificationForwarder. De-duplicates notifications received in multiple copies over different network paths. Also ignores certificate RenewNotification messages if RenewFirewallEnabled is true in CertificateOptions (default).

public Task PublishAsync(Dto notificationDto, CallContext context = default)

Parameters

notificationDto Dto
context CallContext

Returns

Task

SendAsync(Dto, CallContext)

Send the deserialized request to the local handler.

public Task<Dto> SendAsync(Dto requestDto, CallContext context = default)

Parameters

requestDto Dto
context CallContext

Returns

Task<Dto>