1 instantiation of HeaderParsingFeature
Microsoft.AspNetCore.HeaderParsing (1)
HeaderParsingFeature.cs (1)
99
Feature = new
HeaderParsingFeature
(registry, logger, metrics);
24 references to HeaderParsingFeature
Microsoft.AspNetCore.HeaderParsing (12)
HeaderParsingFeature.cs (4)
29
internal HeaderParsingFeature(IHeaderRegistry registry, ILogger<
HeaderParsingFeature
> logger, HeaderParsingMetrics metrics)
88
public
HeaderParsingFeature
Feature { get; }
95
ILogger<
HeaderParsingFeature
> logger,
135
public bool Process(
HeaderParsingFeature
feature, HeaderKey<T> header, out T? value, out ParsingResult result)
HeaderParsingHttpRequestExtensions.cs (4)
21
public static
HeaderParsingFeature
GetHeaderParsing(this HttpRequest request)
25
var
feature = context.Features.Get<
HeaderParsingFeature
>();
29
feature = context.RequestServices.GetRequiredService<
HeaderParsingFeature
>();
HeaderParsingServiceCollectionExtensions.cs (4)
26
if (!Throw.IfNull(services).Any(x => x.ServiceType == typeof(
HeaderParsingFeature
.PoolHelper)))
29
.AddPooled<
HeaderParsingFeature
.PoolHelper>()
32
.AddScoped(provider => provider.GetRequiredService<ObjectPool<
HeaderParsingFeature
.PoolHelper>>().Get())
33
.AddScoped(provider => provider.GetRequiredService<
HeaderParsingFeature
.PoolHelper>().Feature)
Microsoft.AspNetCore.HeaderParsing.Tests (12)
HeaderParsingExtensionsTests.cs (1)
96
var
feature = context.Request.GetHeaderParsing();
HeaderParsingFeatureTests.cs (11)
25
private readonly FakeLogger<
HeaderParsingFeature
> _logger = new();
51
var
feature = new HeaderParsingFeature(Registry, _logger, metrics) { Context = Context };
70
var
feature = new HeaderParsingFeature(Registry, _logger, metrics) { Context = Context };
92
var
feature = new HeaderParsingFeature(Registry, _logger, metrics) { Context = Context };
106
var
feature = new HeaderParsingFeature(Registry, _logger, metrics) { Context = Context };
123
var
feature = new HeaderParsingFeature(Registry, _logger, metrics) { Context = Context };
141
var
feature = new HeaderParsingFeature(Registry, _logger, metrics) { Context = Context };
163
var pool = new Mock<ObjectPool<
HeaderParsingFeature
.PoolHelper>>(MockBehavior.Strict);
164
var helper = new
HeaderParsingFeature
.PoolHelper(pool.Object, Registry, _logger, metrics);
198
var
feature = new HeaderParsingFeature(Registry, _logger, metrics) { Context = Context };
199
var
feature2 = new HeaderParsingFeature(Registry, _logger, metrics) { Context = Context };