title: Using Ninject IOC to replace a factory
body: <p>I've got a factory method inside a parser. Essentially as I load a token I look up the handler for that token, or drop through to the default handler. I've implemented this as a <code>switch</code> and as a <code>Dictionary&lt;string,Type&gt;</code> but both approaches require me to store the mapping somewhere else than the handler class.</p>
  
  <p>We are using Ninject for IOC and so I've realized I can also do it using</p>
  
  <pre><code>kernel.Get&lt;ITokenHandler&gt;(tokenName); 
  </code></pre>
  
  <p>but that doesn't save me storing the information on what token the handler can deal with in 2 locations. Is there a way I can decorate the handler so this gets mapped automatically?</p>