-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy pathActionRequestWrapper.cs
More file actions
103 lines (84 loc) · 2.51 KB
/
ActionRequestWrapper.cs
File metadata and controls
103 lines (84 loc) · 2.51 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
using System;
using System.Web;
namespace TestStack.FluentMVCTesting.MvcPipeline
{
internal class ActionRequestWrapper : HttpWorkerRequest
{
private readonly SimpleHttpRequest _httpRequest;
public ActionRequestWrapper(SimpleHttpRequest httpRequest)
{
this._httpRequest = httpRequest;
}
public override string GetUriPath()
{
var path = this._httpRequest.UriPath;
if (path.StartsWith("~"))
path = path.Substring(1);
return path;
}
public override string GetQueryString()
{
return String.Empty;
}
public override string GetRawUrl()
{
return this.GetUriPath();
}
public override string GetHttpVerbName()
{
return this._httpRequest.HttpMethod;
}
public override string GetHttpVersion()
{
return "HTTP/1.1";
}
public override string GetRemoteAddress()
{
return "localhost";
}
public override int GetRemotePort()
{
throw new NotImplementedException();
}
public override string GetLocalAddress()
{
return "127.0.0.1";
}
public override int GetLocalPort()
{
return 80;
}
public override void SendStatus(int statusCode, string statusDescription)
{
throw new NotImplementedException();
}
public override void SendKnownResponseHeader(int index, string value)
{
throw new NotImplementedException();
}
public override void SendUnknownResponseHeader(string name, string value)
{
throw new NotImplementedException();
}
public override void SendResponseFromMemory(byte[] data, int length)
{
throw new NotImplementedException();
}
public override void SendResponseFromFile(string filename, long offset, long length)
{
throw new NotImplementedException();
}
public override void SendResponseFromFile(IntPtr handle, long offset, long length)
{
throw new NotImplementedException();
}
public override void FlushResponse(bool finalFlush)
{
throw new NotImplementedException();
}
public override void EndOfRequest()
{
throw new NotImplementedException();
}
}
}