forked from DarthFubuMVC/fubumvc
/
GateHttpContext.cs
46 lines (38 loc) · 1.04 KB
/
GateHttpContext.cs
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
using System.Web;
namespace FubuMVC.OwinHost
{
public class GateHttpContext : HttpContextBase
{
private readonly GateHttpRequest _request;
public GateHttpContext(string path, string method)
{
_request = new GateHttpRequest(path, method);
}
public override HttpRequestBase Request
{
get { return _request; }
}
}
public class GateHttpRequest : HttpRequestBase
{
private readonly string _method;
private readonly string _path;
public GateHttpRequest(string path, string method)
{
_path = path;
_method = method;
}
public override string PathInfo
{
get { return _path.TrimStart('/'); }
}
public override string AppRelativeCurrentExecutionFilePath
{
get { return "~/"; }
}
public override string HttpMethod
{
get { return _method; }
}
}
}