Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 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);
        }