This repository was archived by the owner on Nov 20, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 188
Expand file tree
/
Copy pathHttpContext.cs
More file actions
54 lines (36 loc) · 1.53 KB
/
HttpContext.cs
File metadata and controls
54 lines (36 loc) · 1.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Collections.Generic;
using System.Security.Claims;
using System.Threading;
using Microsoft.AspNet.Http.Authentication;
namespace Microsoft.AspNet.Http
{
public abstract class HttpContext : IDisposable
{
public abstract HttpRequest Request { get; }
public abstract HttpResponse Response { get; }
public abstract ConnectionInfo Connection { get; }
public abstract AuthenticationManager Authentication { get; }
public abstract ClaimsPrincipal User { get; set; }
public abstract IDictionary<object, object> Items { get; }
public abstract IServiceProvider ApplicationServices { get; set; }
public abstract IServiceProvider RequestServices { get; set; }
public abstract CancellationToken RequestAborted { get; }
public abstract ISessionCollection Session { get; }
public abstract WebSocketManager WebSockets { get; }
public abstract void Abort();
public abstract void Dispose();
public abstract object GetFeature(Type type);
public abstract void SetFeature(Type type, object instance);
public virtual T GetFeature<T>()
{
return (T)GetFeature(typeof(T));
}
public virtual void SetFeature<T>(T instance)
{
SetFeature(typeof(T), instance);
}
}
}