private static ILifetimeScope GetScope(IOwinRequestScopeContext context, bool createIfNotPresent) { ILifetimeScope candidates = null; if (context.Items.ContainsKey(c_key)) { candidates = (ILifetimeScope)context.Items[c_key]; } else if (createIfNotPresent) { candidates = new DefaultLifetimeScope(new ScopeCache()); context.Items[c_key] = candidates; } return(candidates); }
public HttpContextWrapper(IOwinRequestScopeContext context) { Request = new HttpRequestWrapper(context.OwinEnvironment); _context = context; }