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