22 references to new
Microsoft.AspNetCore.HeaderParsing (17)
CommonHeaders.cs (17)
20
public static HeaderSetup<HostHeaderValue> Host =>
new
(HeaderNames.Host, HostHeaderValueParser.Instance);
25
public static HeaderSetup<IReadOnlyList<MediaTypeHeaderValue>> Accept =>
new
(HeaderNames.Accept, MediaTypeHeaderValueListParser.Instance);
30
public static HeaderSetup<IReadOnlyList<StringWithQualityHeaderValue>> AcceptEncoding =>
new
(HeaderNames.AcceptEncoding, StringWithQualityHeaderValueListParser.Instance, cacheable: true);
35
public static HeaderSetup<IReadOnlyList<StringWithQualityHeaderValue>> AcceptLanguage =>
new
(HeaderNames.AcceptLanguage, StringWithQualityHeaderValueListParser.Instance, cacheable: true);
40
public static HeaderSetup<CacheControlHeaderValue> CacheControl =>
new
(HeaderNames.CacheControl, CacheControlHeaderValueParser.Instance, cacheable: true);
45
public static HeaderSetup<ContentDispositionHeaderValue> ContentDisposition =>
new
(HeaderNames.ContentDisposition, ContentDispositionHeaderValueParser.Instance, cacheable: true);
50
public static HeaderSetup<MediaTypeHeaderValue> ContentType =>
new
(HeaderNames.ContentType, MediaTypeHeaderValueParser.Instance, cacheable: true);
55
public static HeaderSetup<IReadOnlyList<CookieHeaderValue>> Cookie =>
new
(HeaderNames.Cookie, CookieHeaderValueListParser.Instance);
60
public static HeaderSetup<DateTimeOffset> Date =>
new
(HeaderNames.Date, DateTimeOffsetParser.Instance);
65
public static HeaderSetup<IReadOnlyList<EntityTagHeaderValue>> IfMatch =>
new
(HeaderNames.IfMatch, EntityTagHeaderValueListParser.Instance);
70
public static HeaderSetup<IReadOnlyList<EntityTagHeaderValue>> IfModifiedSince =>
new
(HeaderNames.IfModifiedSince, EntityTagHeaderValueListParser.Instance);
75
public static HeaderSetup<IReadOnlyList<EntityTagHeaderValue>> IfNoneMatch =>
new
(HeaderNames.IfNoneMatch, EntityTagHeaderValueListParser.Instance);
80
public static HeaderSetup<RangeConditionHeaderValue> IfRange =>
new
(HeaderNames.IfRange, RangeConditionHeaderValueParser.Instance);
85
public static HeaderSetup<DateTimeOffset> IfUnmodifiedSince =>
new
(HeaderNames.IfUnmodifiedSince, DateTimeOffsetParser.Instance);
90
public static HeaderSetup<RangeHeaderValue> Range =>
new
(HeaderNames.Range, RangeHeaderValueParser.Instance);
95
public static HeaderSetup<Uri> Referer =>
new
(HeaderNames.Referer, Parsers.UriParser.Instance, cacheable: true);
100
public static HeaderSetup<IReadOnlyList<IPAddress>> XForwardedFor =>
new
("X-Forwarded-For", IPAddressListParser.Instance);
Microsoft.AspNetCore.HeaderParsing.Tests (5)
HeaderParsingFeatureTests.cs (4)
76
var key2 = Registry.Register(new
HeaderSetup
<DateTimeOffset>("Test", DateTimeOffsetParser.Instance));
168
var firstHeaderKey = Registry.Register(new
HeaderSetup
<DateTimeOffset>("FirstHeader", DateTimeOffsetParser.Instance));
169
var secondHeaderKey = Registry.Register(new
HeaderSetup
<DateTimeOffset>("SecondHeader", DateTimeOffsetParser.Instance));
170
var thirdHeaderKey = Registry.Register(new
HeaderSetup
<DateTimeOffset>("ThirdHeader", DateTimeOffsetParser.Instance));
HeaderSetupTests.cs (1)
17
var sut = new
HeaderSetup
<DateTimeOffset>(TestHeaderName, DateTimeOffsetParser.Instance);