forked from bonesoul/uhttpsharp
-
Notifications
You must be signed in to change notification settings - Fork 49
Expand file tree
/
Copy pathHttpHeadersDebuggerProxy.cs
More file actions
52 lines (45 loc) · 1.16 KB
/
HttpHeadersDebuggerProxy.cs
File metadata and controls
52 lines (45 loc) · 1.16 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
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
namespace uhttpsharp.Headers
{
internal class HttpHeadersDebuggerProxy
{
private readonly IHttpHeaders _real;
[DebuggerDisplay("{Value,nq}", Name = "{Key,nq}")]
internal class HttpHeader
{
private readonly KeyValuePair<string, string> _header;
public HttpHeader(KeyValuePair<string, string> header)
{
_header = header;
}
public string Value
{
get
{
return _header.Value;
}
}
public string Key
{
get
{
return _header.Key;
}
}
}
public HttpHeadersDebuggerProxy(IHttpHeaders real)
{
_real = real;
}
[DebuggerBrowsable(DebuggerBrowsableState.RootHidden)]
public HttpHeader[] Headers
{
get
{
return _real.Select(kvp => new HttpHeader(kvp)).ToArray();
}
}
}
}