Class SavvyioOptionsExtensions
- Namespace
- Savvyio.Extensions
- Assembly
- Savvyio.Extensions.Dispatchers.dll
Extension methods for the SavvyioOptions class.
public static class SavvyioOptionsExtensions
- Inheritance
-
SavvyioOptionsExtensions
Methods
AddMediator<TImplementation>(SavvyioOptions)
Adds an implementation of the IMediator interface.
public static SavvyioOptions AddMediator<TImplementation>(this SavvyioOptions options) where TImplementation : class, IMediator
Parameters
optionsSavvyioOptionsThe SavvyioOptions to extend.
Returns
- SavvyioOptions
A reference to
optionsso that additional configuration calls can be chained.
Type Parameters
TImplementationThe type of the implementation to use.
Remarks
The implementation will be type forwarded to: ICommandDispatcher, IDomainEventDispatcher, IIntegrationEventDispatcher and IQueryDispatcher.
UseAutomaticDispatcherDiscovery(SavvyioOptions, bool)
Enforce automatic discovery of handlers implementing the IDispatcher interface using either bruteAssemblyScanning or lightweight GetCallingAssembly().
public static SavvyioOptions UseAutomaticDispatcherDiscovery(this SavvyioOptions options, bool bruteAssemblyScanning = false)
Parameters
optionsSavvyioOptionsThe SavvyioOptions to extend.
bruteAssemblyScanningbooltrueto use brute assembly scanning for all IDispatcher interface implementations throughout the application domain; otherwise,false.
Returns
- SavvyioOptions
A reference to
optionsso that additional configuration calls can be chained.
UseAutomaticHandlerDiscovery(SavvyioOptions, bool)
Enforce automatic discovery of dispatchers implementing the IHandler interface using either bruteAssemblyScanning or lightweight GetCallingAssembly().
public static SavvyioOptions UseAutomaticHandlerDiscovery(this SavvyioOptions options, bool bruteAssemblyScanning = false)
Parameters
optionsSavvyioOptionsThe SavvyioOptions to extend.
bruteAssemblyScanningbooltrueto use brute assembly scanning for all IHandler interface implementations throughout the application domain; otherwise,false.
Returns
- SavvyioOptions
A reference to
optionsso that additional configuration calls can be chained.