Use Rhino Service Bus on ASP.NET website with Ninject
-
26-09-2019 - |
문제
I will like to add Rhino Service Bus to my ASP.NET web application but using Ninject as the DI Container. So far all examples I keep seeing use Castle Windsor which I don't want to use since we already use Ninject.
Are there any tutorials out there which show how to add Rhino Service Bus to an ASP.NET web application without a direct dependency on Castle Windsor (e.g. using Ninject)?
해결책
Basically, you'd have to start by rewriting RhinoServiceBusFacility / AbstractRhinoServiceBusFacility as a Ninject module. Then there are also Castle references in other files, e.g. DefaultServiceBus has references to IKernel which should be changed to use Ninject's kernel instead.
다른 팁
Nowadays, Rhino Service Bus (RSB) does not directly depend on Castle. Modules are available for integration with Autofac, Spring.net, Unity, StructureMap and of course Castle.
Ninject isn't supported yet; you can use the Castle implementation as a reference implementation.