In my current project I'm using SolrNet and OAuth.Net. Both libraries use Common Service Locator. SolrN开发者_如何学Pythonet set as a locator provider a custom IoC container implementation. The locator provider for OAuth.Net is set in my code (currently I'm using Windsor as it is used in the examples). And the problem starts here because
ServiceLocator.SetLocatorProvider()
actually is replacing the ServiceLocator.Current static property value.
Any advice? What are the best practices in such a scenario?
Thanks in advance, Hristo
If you're already using Windsor, set up SolrNet using the included Windsor facility instead of the built-in container.
精彩评论