public SchedulerService(
     IBus bus,
     IScheduleRepository scheduleRepository,
     SchedulerServiceConfiguration configuration)
 {
     this.bus = bus;
     this.scheduleRepository = scheduleRepository;
     this.configuration      = configuration;
 }
        public static ISchedulerService CreateScheduler()
        {
            var bus = RabbitHutch.CreateBus();

            return(new SchedulerService(
                       bus,
                       new ScheduleRepository(ScheduleRepositoryConfiguration.FromConfigFile(), () => DateTime.UtcNow),
                       SchedulerServiceConfiguration.FromConfigFile()));
        }
 public SchedulerService(
     IBus bus,
     IEasyNetQLogger log,
     IScheduleRepository scheduleRepository,
     SchedulerServiceConfiguration configuration)
 {
     this.bus = bus;
     this.scheduleRepository = scheduleRepository;
     this.configuration      = configuration;
     this.log = log;
 }
 public SchedulerService(
     IBus bus,
     IEasyNetQLogger log,
     IScheduleRepository scheduleRepository,
     SchedulerServiceConfiguration configuration)
 {
     this.bus = bus;
     this.scheduleRepository = scheduleRepository;
     this.configuration = configuration;
     this.log = log;
 }
Exemple #5
0
        public static ISchedulerService CreateScheduler()
        {
            var bus    = RabbitHutch.CreateBus();
            var logger = new Logger(LogManager.GetLogger("EasyNetQ.Scheduler"));

            return(new SchedulerService(
                       bus,
                       logger,
                       new ScheduleRepository(ScheduleRepositoryConfiguration.FromConfigFile(), logger, () => DateTime.UtcNow),
                       SchedulerServiceConfiguration.FromConfigFile()));
        }
Exemple #6
0
        public static ISchedulerService CreateScheduler()
        {
            var serviceConfig = SchedulerServiceConfiguration.FromConfigFile();
            var bus           = RabbitHutch.CreateBus(sr =>
            {
                if (serviceConfig.EnableLegacyConventions)
                {
                    sr.EnableLegacyConventions();
                }
            });

            return(new SchedulerService(
                       bus,
                       new ScheduleRepository(ScheduleRepositoryConfiguration.FromConfigFile(), () => DateTime.UtcNow),
                       SchedulerServiceConfiguration.FromConfigFile()));
        }
        public static ISchedulerService CreateScheduler()
        {
            var bus = RabbitHutch.CreateBus();

            var rawByteBus = bus as IRawByteBus;

            if (rawByteBus == null)
            {
                throw new EasyNetQException("Bus does not implement IRawByteBus");
            }

            var logger = new Logger(LogManager.GetLogger("EasyNetQ.Scheduler"));

            return(new SchedulerService(
                       bus,
                       rawByteBus,
                       logger,
                       new ScheduleRepository(ScheduleRepositoryConfiguration.FromConfigFile(), () => DateTime.UtcNow),
                       SchedulerServiceConfiguration.FromConfigFile()));
        }