Closed do0g closed 10 years ago
Sorry for the wait.
Looks good, except it would be nice to have test that would fail without this. E.g. a test that sets up a bootstrapper which creates its own IContainer
in GetApplicationContainer
and have the test assert that IViewEngine
can be resolved.
When overriding
GetApplicationContainer
in a subclass ofWindsorNancyBootstrapper
and returning an existingIWindsorContainer
that is not created by theWindsorNancyBootstrapper
, the container is not configured correctly for use with Nancy, resulting in the exceptionCastle.MicroKernel.Handlers.HandlerException: Handler for System.Collections.Generic.IEnumerable
1[Nancy.ViewEngines.IViewEngine] was not found.`Workarounds provided here and here copy the registration of the components verbatim from
WindsorNancyBootstrapper
. I would like to suggest that the configuration of the container occurs in an override ofConfigureApplicationContainer(IWindsorContainer existingContainer)
so that both containers owned byWindsorNancyBootstrapper
and provided to it will result in correctly configured containers. If configuration is not required it will be possible to opt out of the registration via subclass ofWindsorNancyBootstrapper
and override ofConfigureApplicationContainer
.Happy to submit a pull request for the change.