Beispiel #1
0
 public OwinContext(IDictionary <string, object> environment = null)
 {
     _environment = environment ?? OwinFactory.CreateEnvironment();
     if (!_environment.ContainsKey(OwinKeys.Owin.CallCancelled))
     {
         _environment.Add(OwinKeys.Owin.CallCancelled, new CancellationToken());
     }
     _request  = new OwinRequest(_environment);
     _response = new OwinResponse(_environment);
 }
 public HttpHeaders(IDictionary <string, string[]> raw = null)
 {
     _raw = raw ?? OwinFactory.CreateHeaders();
 }
Beispiel #3
0
 public static OwinContext Get(IDictionary <string, object> environment = null)
 {
     environment = environment ?? OwinFactory.CreateEnvironment();
     return(environment.GetValueOrCreate(ContextKey, () => new OwinContext(environment)));
 }