24 instantiations of HeaderSetup
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 (7)
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));
HeaderRegistryTests.cs (1)
96
var key = registry.Register(new
HeaderSetup
<DateTimeOffset>("MyDate", typeof(DateTimeOffsetParser)));
HeaderSetupTests.cs (2)
17
var sut = new
HeaderSetup
<DateTimeOffset>(TestHeaderName, DateTimeOffsetParser.Instance);
27
var sut = new
HeaderSetup
<DateTimeOffset>(TestHeaderName, typeof(DateTimeOffsetParser));
25 references to HeaderSetup
Microsoft.AspNetCore.HeaderParsing (21)
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);
HeaderRegistry.cs (1)
27
public HeaderKey<T> Register<T>(
HeaderSetup
<T> setup)
HeaderSetup.cs (2)
39
/// Initializes a new instance of the <see cref="
HeaderSetup
{THeader}"/> class.
52
/// Initializes a new instance of the <see cref="
HeaderSetup
{THeader}"/> class.
IHeaderRegistry.cs (1)
18
HeaderKey<T> Register<T>(
HeaderSetup
<T> setup)
Microsoft.AspNetCore.HeaderParsing.Tests (4)
HeaderParsingExtensionsTests.cs (2)
83
var
headerSetup = CommonHeaders.Date;
132
private static HeaderKey<T> RegisterHeader<T>(HttpContext context,
HeaderSetup
<T> setup)
HeaderSetupTests.cs (2)
17
var
sut = new HeaderSetup<DateTimeOffset>(TestHeaderName, DateTimeOffsetParser.Instance);
27
var
sut = new HeaderSetup<DateTimeOffset>(TestHeaderName, typeof(DateTimeOffsetParser));