How can I use Castle Windsor as an IOC instead of the default .net core IOC container?
I have built a service resolver that depends on WindsorContainer
to resolve services.
Something like:
public class ServiceResolver
{
private static WindsorContainer container;
public ServiceResolver()
{
container = new WindsorContainer();
// a method to register components in container
RegisterComponents(container);
}
public IList<T> ResolveAll<T>()
{
return container.ResolveAll<T>().ToList();
}
}
Can not figure out how to let my .net core 2 web API use this resolver as a replacement for IServiceCollection.