3 instantiations of HeaderParsingOptions
Microsoft.AspNetCore.HeaderParsing.Tests (3)
HeaderParsingFeatureTests.cs (1)
36
_options = Options.Create(new
HeaderParsingOptions
());
HeaderParsingOptionsTests.cs (1)
18
var options = new
HeaderParsingOptions
HeaderRegistryTests.cs (1)
20
_options = Options.Create(new
HeaderParsingOptions
());
22 references to HeaderParsingOptions
Microsoft.AspNetCore.HeaderParsing (10)
HeaderParsingOptionsManualValidator.cs (2)
8
internal sealed class HeaderParsingOptionsManualValidator : IValidateOptions<
HeaderParsingOptions
>
10
public ValidateOptionsResult Validate(string? name,
HeaderParsingOptions
options)
HeaderParsingOptionsValidator.cs (1)
9
internal sealed partial class HeaderParsingOptionsValidator : IValidateOptions<
HeaderParsingOptions
>
HeaderParsingServiceCollectionExtensions.cs (5)
47
public static IServiceCollection AddHeaderParsing(this IServiceCollection services, Action<
HeaderParsingOptions
> configure)
51
_ = services.AddOptionsWithValidateOnStart<
HeaderParsingOptions
, HeaderParsingOptionsValidator>();
52
_ = services.AddOptionsWithValidateOnStart<
HeaderParsingOptions
, HeaderParsingOptionsManualValidator>();
70
.AddOptionsWithValidateOnStart<
HeaderParsingOptions
, HeaderParsingOptionsValidator>()
74
.AddOptionsWithValidateOnStart<
HeaderParsingOptions
, HeaderParsingOptionsManualValidator>()
HeaderRegistry.cs (2)
16
private readonly
HeaderParsingOptions
_options;
21
public HeaderRegistry(IServiceProvider provider, IOptions<
HeaderParsingOptions
> options)
Microsoft.AspNetCore.HeaderParsing.Tests (12)
HeaderParsingExtensionsTests.cs (9)
25
var
options = services.GetRequiredService<IOptions<
HeaderParsingOptions
>>().Value;
37
Assert.Throws<OptionsValidationException>(() => services.GetRequiredService<IOptions<
HeaderParsingOptions
>>().Value);
47
Assert.Throws<OptionsValidationException>(() => services.GetRequiredService<IOptions<
HeaderParsingOptions
>>().Value);
57
var
options = services.GetRequiredService<IOptions<
HeaderParsingOptions
>>().Value;
63
HeaderParsingOptions
options;
69
$"{nameof(
HeaderParsingOptions
)}:{nameof(options.DefaultMaxCachedValuesPerHeader)}",
74
.GetSection($"{nameof(
HeaderParsingOptions
)}");
HeaderParsingFeatureTests.cs (1)
23
private readonly IOptions<
HeaderParsingOptions
> _options;
HeaderParsingOptionsTests.cs (1)
18
var
options = new HeaderParsingOptions
HeaderRegistryTests.cs (1)
15
private readonly IOptions<
HeaderParsingOptions
> _options;