Esempio n. 1
0
        public static ISchedulerService CreateScheduler()
        {
            var bus = RabbitHutch.CreateBus("host=localhost");

            return(new SchedulerService(
                       bus,
                       new ScheduleRepository(ScheduleRepositoryConfiguration.FromConfigFile(), () => DateTime.UtcNow),
                       SchedulerServiceConfiguration.FromConfigFile()));
        }
Esempio n. 2
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(), () => DateTime.UtcNow),
                       SchedulerServiceConfiguration.FromConfigFile()));
        }
Esempio n. 3
0
        public static ISchedulerService CreateScheduler()
        {
            var serviceConfig = SchedulerServiceConfiguration.FromConfigFile();
            var bus           = RabbitHutch.CreateBus("host=localhost", sr =>
            {
                if (serviceConfig.EnableLegacyConventions)
                {
                    sr.EnableLegacyConventions();
                }
            });

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