Ejemplo n.º 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);
 }
Ejemplo n.º 2
0
 public HttpHeaders(IDictionary <string, string[]> raw = null)
 {
     _raw = raw ?? OwinFactory.CreateHeaders();
 }
Ejemplo n.º 3
0
 public static OwinContext Get(IDictionary <string, object> environment = null)
 {
     environment = environment ?? OwinFactory.CreateEnvironment();
     return(environment.GetValueOrCreate(ContextKey, () => new OwinContext(environment)));
 }