コード例 #1
0
ファイル: ReminderBuilder.cs プロジェクト: Moleculars/Sample
        public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
        {
            var services = app.ApplicationServices;

            ReminderService          reminder         = services.GetService(typeof(IReminderRequest)) as ReminderService;
            IReminderResponseService responseReminder = services.GetService(typeof(IReminderResponseService)) as IReminderResponseService;

            reminder.AddResponses(responseReminder);
        }
コード例 #2
0
        public static IServiceProvider  RegisterResponsesReminder(this IServiceProvider services)
        {
            ReminderService reminder = services.GetService(typeof(IReminderRequest)) as ReminderService;
            //ReminderConfiguration configuration = services.GetService(typeof(ReminderConfiguration)) as ReminderConfiguration;
            IFactoryBroker factory = services.GetService(typeof(IFactoryBroker)) as IFactoryBroker;

            reminder.AddResponses(
                new ReminderResponseBroker(factory)
                );

            return(services);
        }