title: using Autofac in Factory method
body: <p>I am bit confused I have a snippet on domainevents where `</p>
  
  <pre><code>public class StructureMapDomainEventHandlerFactory : IDomainEventHandlerFactory
  {
      public IEnumerable&lt;IDomainEventHandler&lt;T&gt;&gt; GetDomainEventHandlersFor&lt;T&gt;
                                             (T domainEvent) where T : IDomainEvent
          return ObjectFactory.GetAllInstances&lt;IDomainEventHandler&lt;T&gt;&gt;();
  }
  </code></pre>
  
  <p>where StructureMap is exploited. I just embarked on DI using Autofac how this supposed to be implemented in Autofac. Since there is no notion of Static Class.</p>
  
  <p>In general is this approach correct ? what is the point of using DI within the Factory class would not be nice to refer it directly  somewhere else ?</p>