title: Ninject how to resolve dependency in one call
body: <p>I'm new to Ninject, after do some research, I came up with an example:</p>
  
  <pre><code>public interface IWeapon
  {
      void Hit(Target target);
  }
  
  public class Sword : IWeapon
  {
      public void Hit(Target target)
      {
          //do something here
      }
  }
  
  public class Character
  {
      private IWeapon weapon;
  
      public Character(IWeapon weapon)
      {
          this.weapon = weapon;
      }
  
      public void Attack(Target target)
      {
          this.weapon.Hit(target);
      }
  }
  
  public class Bindings : NinjectModule
  {
      public overrides void Load()
      {
          Bind&lt;IWeapon&gt;().To&lt;Sword&gt;();
      }
  }
  
  public void Main()
  {
      Target sometarget = new Target();
      Kernel kernel = new StandardKernel(new Bindings());
      var weapon = kernel.Get&lt;IWeapon&gt;();
      var character = new Character(weapon);
      character.Attack(sometarget);
  }
  </code></pre>
  
  <p>As you can see, in order to resolve the dependency, I have to pull instance of <code>IWeapon</code> using <code>Kernel</code> and pass it to <code>Character</code>'s constructor. I think this somehow ugly, I wonder is there a way that I can directly pull instance of <code>Character</code> and Ninject will automatically resolve the dependency with <code>IWeapon</code>? Something like:</p>
  
  <pre><code>Character character = kernel.Resolve&lt;Character&gt;();
  </code></pre>