title: Autofac - Resolving a dependency by request
body: <p>How do I resolve a dependency when I don't want to get it through Construction Injection? The reason for it is that it would cause circular references and end up being a very long list (and scale badly).</p>
  
  <p>In pseudo code I need something like this:</p>
  
  <pre><code>public ISummarizer GetSummarizer(Type requestedType)
  {
      if (!requestedType.IsAssignableFrom(ISummarizer))
      {
          throw new InvalidOperationException(
              "Trying to resolve a dependency that does not implement ISummarizer.");
      }
  
      return AutofacContainer.Resolve&lt;requestedType&gt;();
  }
  </code></pre>
  
  <p>Any ideas?</p>