title: Simple Injector Scope for specific LifeStyle
body: <p>Is there a way to define a scope for a specific lifestyle?  I am attempting to implement my own scope that I want to persist across an application, but internally I also create another scope, and then a request to GetInstance returns the inner scoped instance instead.</p>
  
  <p>I thought if I could define my lifestyle as:</p>
  
  <pre><code>public class MyScopedLifestyle : ExecutionContextScopeLifestyle
  {
      public MyScopedLifestyle(bool disposeInstanceWhenScopeEnds)
          : base("MyScopedLifestyle", disposeInstanceWhenScopeEnds)
      {
      }
  
      protected override int Length
      {
          get
          {
              return 100;
          }
      }
  }
  </code></pre>
  
  <p>And my usage is:</p>
  
  <pre><code>var container = new Container();
  container.Register&lt;IRequestData, RequestData&gt;(new MyScopedLifestyle());
  
  // i had hoped I could say
  //   container.BeginExecutionContextScope(MyScopedLifestyle)
  // or something similar
  // this is controlled by me
  using (var scope1 = container.BeginExecutionContextScope())
  {
      // do some stuff
      container.GetInstance&lt;IRequestData&gt;().RequestMarket = "en-US";
  
      // this is done via the webapi execution scope (using simpleinjector dependency resolver)
      using (var scope2 = container.BeginExecutionContextScope())
      {
          Assert.Equal("en-US", container.GetInstance&lt;IRequestData&gt;().RequestMarket); // false
      }
  }
  </code></pre>
  
  <p>But I'm unsure how to utilize my custom lifestyle when creating the inner execution scope.</p>
  
  <p>What I really want to happen, is that my instance of IRequestData used in scope1, is the same instance of IRequestData inside of scope2.  Is this something I can achieve with SimpleInjector?</p>
  
  <p><strong>Edit</strong>
  I removed the fact that I'm attempting to create an instance of an object per OWIN request, rather than per WebAPI request.  Ideally I'm attempting to create:</p>
  
  <pre><code>container.RegisterOwinRequest&lt;IRequestData, RequestData&gt;();
  </code></pre>
  
  <p>So that when I resolve <code>IFoo</code> anywhere within my pipeline (be it an OWIN middleware, or in the WebAPI part, the same instance is returned for a particular request).</p>
  
  <p><strong>Edit 2</strong>
  Swapped our IFoo/Foo/MyProperty for better names.</p>