Пример #1
0
        public void ConfigureServices(IServiceCollection services)
        {
            SeriLogConfiguration.Configure(Configuration.GetSection("logFilePath").Value);

            RegisterDependencies(services);

            services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1);

            AddVersioningAndDoc(services);
        }
Пример #2
0
        public void ConfigureServices(IServiceCollection services)
        {
            services.Configure <RabbitConfig>(this.Configuration.GetSection("RabbitConfig"))
            .AddSingleton <IInmemoryBus, CoolInmemoryBus>()
            .AddSingleton <IMassTransitBus, RabbitMqMassTransitBus>()
            .AddSingleton <IExternalBus, CoolMassTransitBus>()
            .AddSingleton <IExternalBusService, MassTransitRabbitMqHostingService>()
            .AddSingleton <MassTransitRabbitMqHostingService>()
            .AddSingleton <ICoolBus, CoolBus>();


            SeriLogConfiguration.Configure(this.Configuration.GetSection("logFilePath").Value);

            RegisterDependencies(services);

            services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1);

            services.AddMassTransit(cfg =>
            {
                cfg.AddConsumer <AddCourseCommandHandler>();
                cfg.AddConsumer <SignupCourseCommandHandler>();
            });
            AddVersioningAndDoc(services);
        }