Пример #1
0
 // This method gets called by the runtime. Use this method to add services to the container.
 public IServiceProvider ConfigureServices(IServiceCollection services)
 {
     _container.CrossWiresInto(services);
     _container.Register(Component.For <IHttpContextAccessor>().ImplementedBy <HttpContextAccessor>());
     _container.Register(Component.For <IScopeSomething>().ImplementedBy <ScopeSomething>().LifestyleScoped().CrossWired().IsDefault());
     services.AddMvc();
     return(services.AddWindsor(_container));
 }