开发者

NserviceBus start Event

开发者 https://www.devze.com 2023-03-29 14:35 出处:网络
I want to configure Dependency Injection with Ninject in my application, and my project is a Subscriber class library. What is the first event produced b开发者_Python百科y NserviceBus for initialize m

I want to configure Dependency Injection with Ninject in my application, and my project is a Subscriber class library. What is the first event produced b开发者_Python百科y NserviceBus for initialize my kernel and modules bindings?


What you need to do is in NServiceBus.Host.exe.config define your EndpointConfigurationType

 <appSettings>
    <add key="EndpointConfigurationType" value="<Assembly>", <Namespace>"/>
  </appSettings> 

After this define a class

 public class EndpointConfiguration : AsA_Server, IWantCustomInitialization, IConfigureThisEndpoint     
 {
   public void Init()
   {
         /do Ninject stuff here
   }
 }

Hope this makes sense. Let me know if you need more clarification. Good luck.

0

精彩评论

暂无评论...
验证码 换一张
取 消