コード例 #1
0
        public static ISchedulerService CreateScheduler()
        {
            var bus = RabbitHutch.CreateBus("host=localhost");

            return(new SchedulerService(
                       bus,
                       new ScheduleRepository(ScheduleRepositoryConfiguration.FromConfigFile(), () => DateTime.UtcNow),
                       SchedulerServiceConfiguration.FromConfigFile()));
        }
コード例 #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()));
        }
コード例 #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()));
        }