Example #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="T:System.Object"/> class.
        /// </summary>
        public Dispatcher(DispatcherConfiguration configuration)
        {
            if (configuration.ServiceLocator == null)
            {
                throw new ArgumentException("Unity Container is not registered for distributor.");
            }

            if (configuration.DispatcherHandlerRegistry == null)
            {
                throw new ArgumentException("Dispatcher Handler Registry is null in distributor.");
            }

            _serviceLocator = configuration.ServiceLocator;
            _registry       = configuration.DispatcherHandlerRegistry;
            _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>();
 }
 /// <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>();
 }