/// <summary> /// Initializes a new instance of the <see cref="T:System.Object"/> class. /// </summary> public Dispatcher(DispatcherConfiguration configuration) { _serviceLocator = configuration.ServiceLocator ?? throw new ArgumentException("Unity Container is not registered for distributor."); _registry = configuration.DispatcherHandlerRegistry ?? throw new ArgumentException("Dispatcher Handler Registry is null in distributor."); _maxRetries = configuration.NumberOfRetries; // order handlers _registry.InsureOrderOfHandlers(configuration.Order); }
/// <summary> /// Initializes a new instance of the <see cref="T:System.Object"/> class. /// </summary> public DispatcherConfiguration() { DispatcherHandlerRegistry = new DispatcherHandlerRegistry(); NumberOfRetries = 1; Order = new List <Type>(); }