Closed nikp closed 12 years ago
Could this be related: https://github.com/NancyFx/Nancy.Bootstrappers.Windsor/pull/8 ?
Registering a TypedFactoryFacility in my bootstrapper seems to have given me the ability in my LoggingFacility to see if I need to proxy Func<> or not. Perhaps Nancy Windsor bootstrapper shoudl automatically register this facility?
@nikp I am a very poor Windsor user so I unfortunatly I don't have the knowledge to decide if this is a good or bad idea based on the information you have provided =/ Could you elaborate? =)
I believe the other pull request registers the TypedFactoryFacility in the bootstrapper solving this problem :) Unfortunately the reason for the resolution is a magical mystery to me, and I cannot elaborate further.
@nikp thanks you for the update. So this issue can be closed in favor of pulling in the open pull request?
I believe so :)
@nikp awesome! Thank you
I'm having a strange issue trying to upgrade from Nancy 0.7 to 0.12 (Yes, it's a bit overdue). Previously I was registering a facility to do logging for all my services inside my bootstrapper:
LoggingFacility looks like this:
Unfortunately since upgrading to 0.12/Castle 3.1, the following line in
WindsorNancyBootstrapper.RegisterTypes
is causing some problemsBasically, Castle tries to create a dynamic proxy around Func. This would be fine if this registration triggered the event my facility subscribed to, to but it doesn't. And yet the interceptor seems to be registered anyway.
When trying to create a proxy it obviously fails because MulticastDelgate (IL's parent for Func<>) is sealed: TypeLoadException Could not load type 'Castle.Proxies.Func`1Proxy' from assembly 'DynamicProxyGenAssembly2, Version=0.0.0.0, Culture=neutral, PublicKeyToken=a621a9e7e5c32e69' because the parent type is sealed.
I'm not sure what do here, does anyone have any experience with Facilities and Nancy 0.12?