title: Autofac resolve by interface's interface
body: <p>I currently have one common empty interface (say IService).
  And I have a lot of interfaces which derive from IService and used by implementations later, e.g.:</p>
  
  <pre><code>interface IUserService : IService { }
  class UserService : IUserService
  </code></pre>
  
  <p>What I tried is that</p>
  
  <pre><code>builder.RegisterAssemblyTypes(assemblies)
              .Where(t =&gt; t.GetInterfaces().Any(i =&gt; i.IsAssignableFrom(typeof(IService))))
              .AsImplementedInterfaces();
  </code></pre>
  
  <p>but it's working only if I derive IService on implementation directly, but I have one more specific interface (IUserService for example).
  I need to register types for each interface-implementation(IUserService-UserService with IService). How can I do that?</p>