title: Binding mediator (shortbus) with/to ninject
body: <p>I am trying to use the mediator pattern with shortbus(<a href="https://github.com/mhinze/ShortBus" rel="nofollow">https://github.com/mhinze/ShortBus</a>). Everything goes great except binding it to ninject. There is a structuremap example like so</p>
  
  <pre><code>    public BasicExample()
      {
          ObjectFactory.Initialize(i =&gt;
          {
              i.Scan(s =&gt;
              {
                  s.AssemblyContainingType&lt;IMediator&gt;();
                  s.TheCallingAssembly();
                  s.WithDefaultConventions();
                  s.AddAllTypesOf((typeof(IRequestHandler&lt;,&gt;)));
                  s.AddAllTypesOf(typeof(INotificationHandler&lt;&gt;));
              });
  
              i.For&lt;IDependencyResolver&gt;().Use(() =&gt; DependencyResolver.Current);
          });
  
          ShortBus.DependencyResolver.SetResolver(new StructureMapDependencyResolver(ObjectFactory.Container));
      }
  </code></pre>
  
  <p>The above is for a unit test. I want to be able to unit test as well but most of all I just want it to work with the whole project.</p>
  
  <p>There is a NinjectDependencyResolver and this should work with ninject. I just know ninject to poorly to get it straight.</p>
  
  <p>I use Ninject MVC with NinjectWebCommon.
  And the above code is supposed to work for structuremap so i simply need the equivalent for Ninject.</p>