title: How to resolve type using ServiceStack Funq IoC
body: <p>I'm trying to write a JobActivator for <a href="https://github.com/HangfireIO/Hangfire" rel="nofollow">HangFire</a> using <a href="http://servicestack.net" rel="nofollow">ServiceStack</a> IoC and I'm having trouble resolving from a type.  I'm sure this will be an easy answer for someone with more experience with generics.</p>
  
  <p>The container I'm passing in is coming from HostContext.Container</p>
  
  <pre><code>using Hangfire;
  using System;
  using System.Collections.Generic;
  using System.Linq;
  using ServiceStack;
  
  namespace Common.Hangfire
  {
  
      public class FunqJobActivator : JobActivator
      {
  
          private Funq.Container _container;
  
          public FunqJobActivator(Funq.Container container)
          {
              if (container == null)
              {
                  throw new ArgumentNullException("container");
              }
              _container = container;
          }
  
          public override object ActivateJob(Type type)
          {
              return _container.Resolve&lt;type&gt;();  //** this doesn't compile
          }
      }
  }
  </code></pre>