public StepsContext()
 {
     DependencyResolver.Reset();
     DependencyResolver.Initialize();
     DispatcherLifeSpan = new DispatcherLifeSpan
     {
         Mode = DispatcherLifeSpanMode.UntilTimedOut,
         Timeout = TimeSpan.FromSeconds(10)
     };
     BootstrapSettings = new BootstrapSettings();
     BootstrapperSettingsStream = new MemoryStream();
 }
        public StepsContext()
        {
            DependencyResolver.Reset();
            DependencyResolver.Initialize();
            DispatcherLifeSpan = new DispatcherLifeSpan
            {
                Mode = DispatcherLifeSpanMode.UntilTimedOut,
                Timeout = TimeSpan.FromSeconds(10)
            };
            BootstrapSettings = new BootstrapSettings();
            SubscriptionBus = DependencyResolver.Get<ISubscriptionBus>();
            JobsExecuted = new List<Type>();
            Launcher = DependencyResolver.Get<DispatcherLauncher>();
            Bootstrapper = DependencyResolver.Get<Bootstrapper>();

            ClearAmqpResources();
        }
 public StepsContext()
 {
     DependencyResolver.Reset();
     DependencyResolver.Initialize();
     DispatcherLifeSpan = new DispatcherLifeSpan
     {
         Mode = DispatcherLifeSpanMode.UntilTimedOut,
         Timeout = TimeSpan.FromSeconds(10)
     };
     BootstrapSettings = new BootstrapSettings();
     SendingBus = DependencyResolver.Get<ISendingBus>();
     ReceivingBus = DependencyResolver.Get<IReceivingBus>();
     Bootstrapper = DependencyResolver.Get<Bootstrapper>();
     LatestLifeSignals = new Dictionary<string, LifeSignal>();
     MaxTimeDispatcherCanBeSilent = TimeSpan.FromSeconds(5);
     ClearAmqpResources();
 }
        public StepsContext()
        {
            DependencyResolver.Reset();
            DependencyResolver.Initialize();

            DispatcherLifeSpan = new DispatcherLifeSpan
            {
                Mode = DispatcherLifeSpanMode.UntilTimedOut,
                Timeout = TimeSpan.FromSeconds(15)
            };
            BootstrapSettings = new BootstrapSettings();

            WorkDispatchersOnline = new List<DispatcherId>();
            WorkDispatchersRestarted = new List<DispatcherId>();

            SubscriptionBus = DependencyResolver.Get<ISubscriptionBus>();
            SendingBus = DependencyResolver.Get<ISendingBus>();
            Supervisor = DependencyResolver.Get<Supervisor>();

            ClearAmqpResources();
        }
 public void ConfigureDispatcherToHandleJob(string dispatcherId, JobAndWorkerType jobAndWorkerType, DispatcherLifeSpan dispatcherLifeSpan)
 {
     var dispatcherSettings = DispatcherSettings.Single(c => c.DispatcherId.Value == dispatcherId);
     dispatcherSettings.DispatcherLifeSpan = dispatcherLifeSpan;
     if (dispatcherSettings.JobConfigurations.Any(
         c => c.JobAndWorkerType.JobType == jobAndWorkerType.JobType)) return;
     var jobConfiguration = new JobConfiguration
     {
         JobAndWorkerType =
         {
             JobType = jobAndWorkerType.JobType,
             WorkerType = jobAndWorkerType.WorkerType
         }
     };
     dispatcherSettings.JobConfigurations.Add(jobConfiguration);
 }