Exemplo n.º 1
0
        public static void Init(IServiceRegistry serviceRegistry)
        => serviceRegistry
        .BindAsSingleton <ILogService, LogService>()
        .BindAsSingleton <IReportingService, ReportingService>()

        .BindAsTransientToSelf <ReportCalculatorProcess>()
        .BindAsFactory <ReportCalculatorProcess>()


        .BindAsTransientToSelf <IOperation <AddHookRequest>, AddHookOperation>()
        .BindAsTransientToSelf <IOperation <CartsSweeperRequest>, CartsSweeperOperation>()
        .BindAsTransientToSelf <IOperation <ModifyCartItemsRequest>, ModifyCartItemsOperation>()
        .BindAsTransientToSelf <IOperation <GenerateCartReportRequest>, GenerateCartReportOperation>()

        .BindAsOperationFactory <ModifyCartItemsRequest, ModifyCartItemsOperation>()
        .BindAsOperationFactory <CartsSweeperRequest, CartsSweeperOperation>()
        .BindAsOperationFactory <GenerateCartReportRequest, GenerateCartReportOperation>()
        .BindAsOperationFactory <AddHookRequest, AddHookOperation>();
Exemplo n.º 2
0
        public static void Init(IServiceRegistry serviceRegistry)
        {
            serviceRegistry
            .BindAsTransientToSelf <ISchedulerJobDefinition, PingQuartzSchedulerJobDefinition>()
            .BindAsTransientToSelf <IQuartzSchedulerJob, PingQuartzSchedulerJob>();

            serviceRegistry
            .BindAsTransientToSelf <ISchedulerJobDefinition, DailyReportQuartzSchedulerJobDefinition>()
            .BindAsTransientToSelf <IQuartzSchedulerJob, DailyReportQuartzSchedulerJob>();

            serviceRegistry
            .BindAsTransientToSelf <ISchedulerJobDefinition, CartsSweeperQuartzSchedulerJobDefinition>()
            .BindAsTransientToSelf <IQuartzSchedulerJob, CartsSweeperQuartzSchedulerJob>();

            serviceRegistry
            .BindAsSingleton <IJobFactory, QuartzSchedulerJobFactory>()
            .BindAsSingleton <ISchedulerFactory, StdSchedulerFactory>()
            .BindSchedulerJobService <QuartzSchedulerJobService>();
        }