WindsorRegistrationExtensions.AddApplicationComponentsToWindsor
See original GitHub issueHi Everyone
in this Method I Have Problem For Registering ControllerBase
For Registering Api Controller in asp Net Core 2.1
in this Method you Use this Code
foreach (var controllerRegistration in options.ControllerRegistrations)
{
container.Register(Classes.FromAssemblyInThisApplication(controllerRegistration.Item1).BasedOn<Controller>().Configure(x => x.LifeStyle.Is(controllerRegistration.Item2)));
}
And Ignore ControllerBase
Type,I Use this Code For Fix this Problem
foreach (var controllerRegistration in options.ControllerRegistrations)
{
//container.Register(Classes.FromAssemblyInThisApplication(controllerRegistration.Item1).BasedOn<Controller>().Configure(x => x.LifeStyle.Is(controllerRegistration.Item2)));
container.Register(Classes.FromAssemblyInThisApplication(controllerRegistration.Item1).BasedOn<ControllerBase>().Configure(x => x.LifeStyle.Is(controllerRegistration.Item2)));
}
Issue Analytics
- State:
- Created 5 years ago
- Comments:21
Top Results From Across the Web
Castle Windsor: How can I update a components registration
WindsorContainer container = new Castle.Windsor. ... Then before registering your components, you just add the class to your container:
Read more >Windsor/docs/registering-components-by-conventions.md ...
This is a quick way of adding all your controllers to the container. It will also automatically register all new controllers as you...
Read more >Building the Castle Windsor Dependency Injection Populator ...
In Castle Windsor, an installer is a class that implements IWindsorInstaller and is used to register all components.
Read more >Windsor: Beyond Dependency Injection in WPF
In this article, I'll go beyond the basic registering and resolving of components in the Castle Windsor IoC container and into controlling ...
Read more >Upgrading to Windsor 2.5 (Northwind)
The guide is based on current source from SA repository, and its Northwind sample application. So here we go. We start off by...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Fixed via #432.
Aah, I see. Yep I can add them back in and make it use ControllerBase. When I get more time I will pop this in.