Namespace DMediatR
Classes
- Bing
Broadcast Ping as MediatR INotification.
- CertificateOptions
X509 certificate specification, inheriting the password.
- Certificates
Utility to create a valid initial X509 certificate chain offline to be distributed to all gRPC nodes.
- CustomSerializer<T>
Generic custom binary serializer to inherit from when implementing a concrete custom serializer for a specific type T. Types deriving from T will also use that serializer.
- Dto
One data transfer object class for any type.
- DtoService
Dto consumer to be used in the gRPC server.
- GrpcException
Custom exception which extracts and returns the remote stack trace from the Details Metadata of a non-TLS RpcException throw on a remote.
- GrpcOptions
Optional gRPC configuration Facade aligning client and server configuration with single values.
- GrpcServer
Utility for creating a gRPC service WebApplicationBuilder and WebApplication in a DMediatR node.
- HostOptions
Specification of a DMediatR node host. Also used for specifying the remotes in RemotesOptions.
- LocalAttribute
Marks the handlers in this class as local double of a [Remote] class.
- PasswordOptions
X509 certificate password.
- Ping
Simple MediatR IRequest for diagnosis.
- Pong
Response to a Ping request. Echoes the Ping message and the name of the corresponding host if it is not handled locally.
- Remote
Public composite object injecting all internal dependencies required for RemoteExtension.SendRemote().
- RemoteAttribute
Marks the handlers in this class as calling a gRPC endpoint (as opposed to calling locally).
- RemoteExtension
IRemote extension methods for connecting to a Dto gRPC service from a MediatR handler.
- RemotesGraph
Implementation for /remotes.svg with a minimalistic heuristic MSAGL renderer. Replace the RemotesGraph service with a class inheriting from this and overwriting GetSvg() with an embellished renderer.
- RemotesOptions
Dictionary of HostOptions declaring the configured remotes for that DMediatR node.
- RenewClientCertificateNotification
Renew the client certificates on all reachable nodes acting as client.
- RenewIntermediateCertificateNotification
Renew the intermediate certificate on the node which has it stored.
- RenewNotification
Base class for MediatR notifications enforcing certificate renewal. Requires explicitly setting "RenewFirewallEnabled": "False" in the "Certificate" configuration section, otherwise it is ignored.
- RenewRootCertificateNotification
Renew the root certificate on the node which has it stored.
- RenewServerCertificateNotification
Renew the server certificates on all nodes acting as server.
- SerializationCountMessage
Base class for tracing the number of hops a DMediatR message (IRequest or INotification) has taken. Its Count property gets incremented whenever it gets serialized.
- SerializedInterface<T>
Interface custom serialization is orthogonal to a CustomSerializer class hierarchy: Serializable classes can implement multiple interfaces, which in turn require e.g. specific members which must be dehydrated before serialization.
- Serializer
General serializer gathering required specialized serializers from the ServiceCollection.
- ServiceCollectionExtension
Provides services.AddDMediatR() as a drop-in replacement for AddMediatR().
- TestSetUp
Helper methods for setting up a DMediatR environment in functional unit tests without a dependency to a specific test framework.
Structs
Interfaces
- ICorrelatedMessage
Multiple DMediatR nodes can have cyclic dependencies or there might be indirect diamonds in the configured dependency graph. In such cases a single node receives and would forward the same message in multiple duplicate copies. To handle them only once as in a monolith correlate these remote messages with a Guid.
- ICorrelatedNotification
Correlated notification with a CorrelationGuid from ICorrelatedMessage.
- IDtoService
Code-first gRPC service for sending a MediatR IRequest to the remote IRequestHandler.
- IGrpcChannelPool
Its internal implementation provides a cache for long-lived gRPC channels, one instance per address.
- ILock
Requests resp. notifications can recursively issue the same requests resp. notifications again. Attempting to lock a second time when the handler already holds a lock on that semaphore would cause a deadlock, therefore remember the locks already held for that message chain in the HasLocked set.
- IRemote
Inherit from IRemote and inject Remote to add the SendRemote extension.
- IRemotesGraph
Interface for registering a RemotesGraph class.
- ISerializedInterface
Interface for adding concrete SerializedInterface<T> classes with services.TryAddKeyedSingleton()
- ISerializer
Interface for the base serializer and all specialized serializers. Use it for injecting an alternate base BinarySerializer implementation with services.AddKeyedSingleton<ISerializer, BinarySerializer>(typeof(object)); Its pluggable default implementation is a tiny wrapper around MessagePackSerializer.Typeless.
Enums
- GrpcPort
Port resp. SSL certificate to use.