title: Azure Triggered Webjobs Scope for Dependency Injection
body: <p>I've read and asked some questions on how to use DI using WebJob and especially Triggered Webjobs.</p>
  
  <ul>
  <li><a href="https://stackoverflow.com/questions/35163426/simpleinjector-azure-webjob-with-timertrigger-register-idisposable">SimpleInjector - Azure WebJob with TimerTrigger - Register IDisposable</a></li>
  <li><a href="https://stackoverflow.com/questions/30328775/dependency-injection-using-azure-webjobs-sdk">Dependency injection using Azure WebJobs SDK?</a></li>
  </ul>
  
  <p>I still try to figure out how to integrate gracefully DI in triggered webjobs and @Steven asked me a good question : </p>
  
  <blockquote>
    <p>Isn't there a way to wrap the execution of your service in some scope? For instance, MVC and Web API have an <strong>IDependencyScope</strong> abstraction for this. This notifies the starting and ending of a request. To be able to do scoping, you either need to have such interception point or you need to be able to wrap the call to JobActivator.</p>
  </blockquote>
  
  <p>I know that I can start a scope inside my triggered function but I would like to know if there are any point of extensibility in the sdk that allow us to do scoping ?</p>
  
  <p>Thanks.</p>