예제 #1
0
        public static void RegisterServices(IServiceCollection services)
        {
            services.AddSingleton <IRequestManager, InMemoryRequestManager>();
            // Application
            services.AddSingleton(Mapper.Configuration);
            services.AddScoped <IMapper>(sp => new Mapper(sp.GetRequiredService <IConfigurationProvider>(), sp.GetService));

            UserInjector.RegisterServices(services);
            services.AddScoped <DatabaseContext>();

            // Infra - Data EventSourcing
        }
예제 #2
0
 public UserProcessor(DataService dataService, UserService userService, UserInjector injector)
     : base(dataService)
 {
     UserService = userService;
     Injector    = injector;
 }