59 instantiations of KestrelServerOptions
InMemory.FunctionalTests (9)
BadHttpRequestTests.cs (1)
156ServerOptions = new KestrelServerOptions()
HttpsConnectionMiddlewareTests.cs (1)
39var serverOptions = new KestrelServerOptions();
HttpsTests.cs (1)
37var serverOptions = new KestrelServerOptions();
MaxRequestLineSizeTests.cs (1)
77ServerOptions = new KestrelServerOptions
RequestHeaderLimitsTests.cs (1)
143var options = new KestrelServerOptions { AddServerHeader = false };
src\Servers\Kestrel\shared\test\TestContextFactory.cs (3)
89serviceContext ?? CreateServiceContext(new KestrelServerOptions()), 153serviceContext: serviceContext ?? CreateServiceContext(new KestrelServerOptions()), 203serviceContext: serviceContext ?? CreateServiceContext(new KestrelServerOptions()),
src\Servers\Kestrel\shared\test\TestServiceContext.cs (1)
60ServerOptions = new KestrelServerOptions
Microsoft.AspNetCore.Server.Kestrel.Core (1)
Internal\KestrelServerImpl.cs (1)
80var serverOptions = options.Value ?? new KestrelServerOptions();
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (31)
AddressBinderTests.cs (6)
160var options = new KestrelServerOptions(); 181var options = new KestrelServerOptions(); 207var options = new KestrelServerOptions(); 231var options = new KestrelServerOptions(); 256var options = new KestrelServerOptions(); 295var options = new KestrelServerOptions()
Http1\Http1ConnectionTests.cs (1)
268var options = new KestrelServerOptions();
Http2\Http2FrameWriterTests.cs (1)
58var serviceContext = TestContextFactory.CreateServiceContext(new KestrelServerOptions());
KestrelServerOptionsTests.cs (6)
20var options = new KestrelServerOptions(); 28var options = new KestrelServerOptions(); 62var options = new KestrelServerOptions(); 69var options = new KestrelServerOptions 80var options = new KestrelServerOptions(); 100var options = new KestrelServerOptions();
KestrelServerTests.cs (11)
36var serverOptions = new KestrelServerOptions(); 122using (var server = CreateServer(new KestrelServerOptions(), testLogger)) 142var kestrelOptions = new KestrelServerOptions(); 198var kestrelOptions = new KestrelServerOptions(); 221var options = new KestrelServerOptions 247var options = new KestrelServerOptions 539var options = new KestrelServerOptions 596var options = new KestrelServerOptions 656var options = new KestrelServerOptions 795var options = new KestrelServerOptions 933var options = new KestrelServerOptions
ListenOptionsTests.cs (1)
27localhostListenOptions.KestrelServerOptions = new KestrelServerOptions
src\Servers\Kestrel\shared\test\TestContextFactory.cs (3)
89serviceContext ?? CreateServiceContext(new KestrelServerOptions()), 153serviceContext: serviceContext ?? CreateServiceContext(new KestrelServerOptions()), 203serviceContext: serviceContext ?? CreateServiceContext(new KestrelServerOptions()),
src\Servers\Kestrel\shared\test\TestServiceContext.cs (1)
60ServerOptions = new KestrelServerOptions
StartLineTests.cs (1)
525serverOptions: new KestrelServerOptions(),
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (15)
HeaderCollectionBenchmark.cs (1)
332serverOptions: new KestrelServerOptions(),
Http1ConnectionBenchmark.cs (1)
35serverOptions: new KestrelServerOptions(),
Http1ConnectionParsingOverheadBenchmark.cs (1)
31serverOptions: new KestrelServerOptions(),
Http1LargeWritingBenchmark.cs (1)
72serverOptions: new KestrelServerOptions(),
Http1ReadingBenchmark.cs (1)
101serverOptions: new KestrelServerOptions(),
Http1WritingBenchmark.cs (1)
106serverOptions: new KestrelServerOptions(),
Http2\Http2ConnectionBenchmarkBase.cs (1)
71serverOptions: new KestrelServerOptions(),
Http2\Http2FrameWriterBenchmark.cs (1)
33serverOptions: new KestrelServerOptions(),
Http3\Http3ConnectionBenchmarkBase.cs (1)
47serverOptions: new KestrelServerOptions(),
HttpProtocolFeatureCollection.cs (1)
234serverOptions: new KestrelServerOptions(),
RequestParsingBenchmark.cs (1)
32serverOptions: new KestrelServerOptions(),
ResponseHeaderCollectionBenchmark.cs (1)
180serverOptions: new KestrelServerOptions(),
src\Servers\Kestrel\shared\test\TestContextFactory.cs (3)
89serviceContext ?? CreateServiceContext(new KestrelServerOptions()), 153serviceContext: serviceContext ?? CreateServiceContext(new KestrelServerOptions()), 203serviceContext: serviceContext ?? CreateServiceContext(new KestrelServerOptions()),
Microsoft.AspNetCore.Server.Kestrel.Tests (1)
KestrelConfigurationLoaderTests.cs (1)
25var serverOptions = new KestrelServerOptions();
Sockets.BindTests (1)
src\Servers\Kestrel\shared\test\TestServiceContext.cs (1)
60ServerOptions = new KestrelServerOptions
Sockets.FunctionalTests (1)
src\Servers\Kestrel\shared\test\TestServiceContext.cs (1)
60ServerOptions = new KestrelServerOptions
209 references to KestrelServerOptions
InMemory.FunctionalTests (21)
HttpsConnectionMiddlewareTests.cs (3)
34private static KestrelServerOptions CreateServerOptions() 39var serverOptions = new KestrelServerOptions(); 80var options = CreateServerOptions();
HttpsTests.cs (11)
31private static KestrelServerOptions CreateServerOptions() 37var serverOptions = new KestrelServerOptions(); 50var serverOptions = CreateServerOptions(); 110var serverOptions = CreateServerOptions(); 138var serverOptions = CreateServerOptions(); 429var serverOptions = CreateServerOptions(); 470var serverOptions = CreateServerOptions(); 514var serverOptions = CreateServerOptions(); 548var serverOptions = CreateServerOptions(); 584var serverOptions = CreateServerOptions(); 630var serverOptions = CreateServerOptions();
RequestHeaderLimitsTests.cs (1)
143var options = new KestrelServerOptions { AddServerHeader = false };
src\Servers\Kestrel\shared\HPackHeaderWriter.cs (1)
103ReferenceEquals(headersEnumerator.EncodingSelector, KestrelServerOptions.DefaultHeaderEncodingSelector)
src\Servers\Kestrel\shared\Http2HeadersEnumerator.cs (1)
40public Func<string, Encoding?> EncodingSelector { get; set; } = KestrelServerOptions.DefaultHeaderEncodingSelector;
src\Servers\Kestrel\shared\test\TestContextFactory.cs (3)
24KestrelServerOptions serverOptions, 103KestrelServerOptions serverOptions, 118KestrelServerOptions serverOptions,
TestTransport\TestServer.cs (1)
69public TestServer(RequestDelegate app, TestServiceContext context, Action<KestrelServerOptions> configureKestrel, Action<IServiceCollection> configureServices)
Interop.FunctionalTests (4)
Http2\Http2RequestTests.cs (1)
221private IHostBuilder CreateHostBuilder(RequestDelegate requestDelegate, HttpProtocols? protocol = null, Action<KestrelServerOptions> configureKestrel = null, bool? plaintext = null)
Http3\Http3RequestTests.cs (1)
2061private IHostBuilder CreateHostBuilder(RequestDelegate requestDelegate, HttpProtocols? protocol = null, Action<KestrelServerOptions> configureKestrel = null)
Http3\Http3TlsTests.cs (1)
516private IHostBuilder CreateHostBuilder(RequestDelegate requestDelegate, HttpProtocols? protocol = null, Action<KestrelServerOptions> configureKestrel = null)
HttpHelpers.cs (1)
61public static IHostBuilder CreateHostBuilder(Action<IServiceCollection> configureServices, RequestDelegate requestDelegate, HttpProtocols? protocol = null, Action<KestrelServerOptions> configureKestrel = null, bool? plaintext = null)
Microsoft.AspNetCore (1)
WebHost.cs (1)
244private static void ConfigureKestrel(WebHostBuilderContext builderContext, KestrelServerOptions options)
Microsoft.AspNetCore.Server.Kestrel (8)
WebHostBuilderKestrelExtensions.cs (8)
87services.AddTransient<IConfigureOptions<KestrelServerOptions>, KestrelServerOptionsSetup>(); 113public static IWebHostBuilder UseKestrel(this IWebHostBuilder hostBuilder, Action<KestrelServerOptions> options) 130public static IWebHostBuilder ConfigureKestrel(this IWebHostBuilder hostBuilder, Action<KestrelServerOptions> options) 134services.TryAddEnumerable(ServiceDescriptor.Transient<IConfigureOptions<KestrelServerOptions>, KestrelServerOptionsSetup>()); 149public static IWebHostBuilder UseKestrel(this IWebHostBuilder hostBuilder, Action<WebHostBuilderContext, KestrelServerOptions> configureOptions) 164public static IWebHostBuilder ConfigureKestrel(this IWebHostBuilder hostBuilder, Action<WebHostBuilderContext, KestrelServerOptions> configureOptions) 170services.TryAddEnumerable(ServiceDescriptor.Transient<IConfigureOptions<KestrelServerOptions>, KestrelServerOptionsSetup>()); 171services.Configure<KestrelServerOptions>(options =>
Microsoft.AspNetCore.Server.Kestrel.Core (55)
HttpsConfigurationService.cs (1)
79KestrelServerOptions serverOptions,
IHttpsConfigurationService.cs (1)
45KestrelServerOptions serverOptions,
Internal\AddressBindContext.cs (2)
12KestrelServerOptions serverOptions, 25public KestrelServerOptions ServerOptions { get; }
Internal\Http\HttpHeaders.cs (1)
279var requireAscii = ReferenceEquals(encodingSelector, KestrelServerOptions.DefaultHeaderEncodingSelector)
Internal\Http\HttpHeaders.Generated.cs (4)
7781var customEncoding = ReferenceEquals(EncodingSelector, KestrelServerOptions.DefaultHeaderEncodingSelector) 7990var customEncoding = ReferenceEquals(EncodingSelector, KestrelServerOptions.DefaultHeaderEncodingSelector) 8159var customEncoding = ReferenceEquals(EncodingSelector, KestrelServerOptions.DefaultHeaderEncodingSelector) 15169var encoding = ReferenceEquals(EncodingSelector, KestrelServerOptions.DefaultHeaderEncodingSelector)
Internal\Http\HttpParser.cs (1)
38public HttpParser(bool showErrorDetails) : this(showErrorDetails, AppContext.TryGetSwitch(KestrelServerOptions.DisableHttp1LineFeedTerminatorsSwitchKey, out var disabled) && disabled)
Internal\Http\HttpProtocol.cs (1)
104protected KestrelServerOptions ServerOptions { get; set; } = default!;
Internal\Http\HttpRequestHeaders.cs (1)
27EncodingSelector = encodingSelector ?? KestrelServerOptions.DefaultHeaderEncodingSelector;
Internal\Http\HttpResponseHeaders.cs (2)
25EncodingSelector = encodingSelector ?? KestrelServerOptions.DefaultHeaderEncodingSelector; 47if (ReferenceEquals(encodingSelector, KestrelServerOptions.DefaultHeaderEncodingSelector))
Internal\Http\HttpResponseTrailers.cs (1)
18EncodingSelector = encodingSelector ?? KestrelServerOptions.DefaultHeaderEncodingSelector;
Internal\Http3\Http3HeadersEnumerator.cs (1)
27public Func<string, Encoding?> EncodingSelector { get; set; } = KestrelServerOptions.DefaultHeaderEncodingSelector;
Internal\Http3\QPackHeaderWriter.cs (1)
83var valueEncoding = ReferenceEquals(headersEnumerator.EncodingSelector, KestrelServerOptions.DefaultHeaderEncodingSelector)
Internal\Infrastructure\HttpUtilities.cs (1)
121if (ReferenceEquals(KestrelServerOptions.DefaultHeaderEncodingSelector, encodingSelector))
Internal\Infrastructure\KestrelEventSource.cs (6)
41private readonly List<WeakReference<KestrelServerOptions>> _options = new(); 231public void Configuration(KestrelServerOptions options) 251public void AddServerOptions(KestrelServerOptions options) 262public void RemoveServerOptions(KestrelServerOptions options) 269if (!weakReference.TryGetTarget(out var target) || ReferenceEquals(target, options)) 366if (!weakReference.TryGetTarget(out var target))
Internal\KestrelServerImpl.cs (4)
37IOptions<KestrelServerOptions> options, 75private static ServiceContext CreateServiceContext(IOptions<KestrelServerOptions> options, ILoggerFactory loggerFactory, DiagnosticSource? diagnosticSource, KestrelMetrics metrics) 80var serverOptions = options.Value ?? new KestrelServerOptions(); 112public KestrelServerOptions Options => ServiceContext.ServerOptions;
Internal\KestrelServerOptionsSetup.cs (2)
8internal sealed class KestrelServerOptionsSetup : IConfigureOptions<KestrelServerOptions> 17public void Configure(KestrelServerOptions options)
Internal\ServiceContext.cs (1)
32public KestrelServerOptions ServerOptions { get; set; } = default!;
KestrelConfigurationLoader.cs (3)
35KestrelServerOptions options, 54/// Gets the <see cref="KestrelServerOptions"/>. 56public KestrelServerOptions Options { get; }
KestrelServer.cs (4)
31public KestrelServer(IOptions<KestrelServerOptions> options, IConnectionListenerFactory transportFactory, ILoggerFactory loggerFactory) 46/// Gets the <see cref="KestrelServerOptions"/>. 48public KestrelServerOptions Options => _innerKestrelServer.Options; 100KestrelServerOptions serverOptions,
KestrelServerOptions.cs (1)
444throw new InvalidOperationException($"{nameof(ApplicationServices)} must not be null. This is normally set automatically via {nameof(IConfigureOptions<KestrelServerOptions>)}.");
ListenOptions.cs (3)
87/// Gets the <see cref="Core.KestrelServerOptions"/> for the listener options. 91/// Only set if accessed from the callback of a <see cref="Core.KestrelServerOptions"/> Listen* method. 93public KestrelServerOptions KestrelServerOptions { get; internal set; } = default!; // Set via ConfigureKestrel callback
ListenOptionsHttpsExtensions.cs (4)
187/// <see cref="KestrelServerOptions.ConfigureHttpsDefaults(Action{HttpsConnectionAdapterOptions})"/>. 211/// <see cref="KestrelServerOptions.ConfigureHttpsDefaults(Action{HttpsConnectionAdapterOptions})"/>. 224/// <see cref="KestrelServerOptions.ConfigureHttpsDefaults(Action{HttpsConnectionAdapterOptions})"/>. 243/// <see cref="KestrelServerOptions.ConfigureHttpsDefaults(Action{HttpsConnectionAdapterOptions})"/>.
src\Servers\Kestrel\shared\HPackHeaderWriter.cs (1)
103ReferenceEquals(headersEnumerator.EncodingSelector, KestrelServerOptions.DefaultHeaderEncodingSelector)
src\Servers\Kestrel\shared\Http2HeadersEnumerator.cs (1)
40public Func<string, Encoding?> EncodingSelector { get; set; } = KestrelServerOptions.DefaultHeaderEncodingSelector;
Systemd\KestrelServerOptionsSystemdExtensions.cs (6)
23/// The <see cref="KestrelServerOptions"/>. 25public static KestrelServerOptions UseSystemd(this KestrelServerOptions options) 35/// The <see cref="KestrelServerOptions"/>. 37public static KestrelServerOptions UseSystemd(this KestrelServerOptions options, Action<ListenOptions> configure)
TlsConfigurationLoader.cs (1)
46KestrelServerOptions serverOptions,
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (49)
AddressBinderTests.cs (6)
160var options = new KestrelServerOptions(); 181var options = new KestrelServerOptions(); 207var options = new KestrelServerOptions(); 231var options = new KestrelServerOptions(); 256var options = new KestrelServerOptions(); 295var options = new KestrelServerOptions()
Http1\Http1ConnectionTests.cs (1)
268var options = new KestrelServerOptions();
HttpUtilitiesTest.cs (1)
237KestrelServerOptions.DefaultHeaderEncodingSelector,
KestrelServerOptionsTests.cs (6)
20var options = new KestrelServerOptions(); 28var options = new KestrelServerOptions(); 62var options = new KestrelServerOptions(); 69var options = new KestrelServerOptions 80var options = new KestrelServerOptions(); 100var options = new KestrelServerOptions();
KestrelServerTests.cs (28)
30private KestrelServerOptions CreateServerOptions() 36var serverOptions = new KestrelServerOptions(); 65var options = CreateServerOptions(); 81var options = CreateServerOptions(); 106var serverOptions = CreateServerOptions(); 142var kestrelOptions = new KestrelServerOptions(); 198var kestrelOptions = new KestrelServerOptions(); 221var options = new KestrelServerOptions 247var options = new KestrelServerOptions 274new KestrelServer(Options.Create<KestrelServerOptions>(null), new MockTransportFactory(), mockLoggerFactory.Object); 283Options.Create<KestrelServerOptions>(null), 291KestrelServerOptions options, 307Options.Create<KestrelServerOptions>(options), 341var serverOptions = CreateServerOptions(); 359var serverOptions = CreateServerOptions(); 378var serverOptions = CreateServerOptions(); 400var serverOptions = CreateServerOptions(); 423var options = CreateServerOptions(); 452var options = CreateServerOptions(); 483var options = CreateServerOptions(); 511var options = CreateServerOptions(); 539var options = new KestrelServerOptions 596var options = new KestrelServerOptions 656var options = new KestrelServerOptions 795var options = new KestrelServerOptions 933var options = new KestrelServerOptions 972private static KestrelServer CreateServer(KestrelServerOptions options, ILogger testLogger) 977private static KestrelServer CreateServer(KestrelServerOptions options, bool throwOnCriticalErrors = true)
src\Servers\Kestrel\shared\HPackHeaderWriter.cs (1)
103ReferenceEquals(headersEnumerator.EncodingSelector, KestrelServerOptions.DefaultHeaderEncodingSelector)
src\Servers\Kestrel\shared\Http2HeadersEnumerator.cs (1)
40public Func<string, Encoding?> EncodingSelector { get; set; } = KestrelServerOptions.DefaultHeaderEncodingSelector;
src\Servers\Kestrel\shared\test\TestContextFactory.cs (3)
24KestrelServerOptions serverOptions, 103KestrelServerOptions serverOptions, 118KestrelServerOptions serverOptions,
UTF8Decoding.cs (2)
21var s = HttpUtilities.GetRequestHeaderString(encodedBytes.AsSpan(), HeaderNames.Accept, KestrelServerOptions.DefaultHeaderEncodingSelector, checkForNewlineChars: false); 40HttpUtilities.GetRequestHeaderString(byteRange.AsSpan(), HeaderNames.Accept, KestrelServerOptions.DefaultHeaderEncodingSelector, checkForNewlineChars: false));
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (6)
BytesToStringBenchmark.cs (1)
77HttpUtilities.GetRequestHeaderString(_utf8Bytes, _headerName, KestrelServerOptions.DefaultHeaderEncodingSelector, checkForNewlineChars: true);
src\Servers\Kestrel\shared\HPackHeaderWriter.cs (1)
103ReferenceEquals(headersEnumerator.EncodingSelector, KestrelServerOptions.DefaultHeaderEncodingSelector)
src\Servers\Kestrel\shared\Http2HeadersEnumerator.cs (1)
40public Func<string, Encoding?> EncodingSelector { get; set; } = KestrelServerOptions.DefaultHeaderEncodingSelector;
src\Servers\Kestrel\shared\test\TestContextFactory.cs (3)
24KestrelServerOptions serverOptions, 103KestrelServerOptions serverOptions, 118KestrelServerOptions serverOptions,
Microsoft.AspNetCore.Server.Kestrel.Tests (51)
KestrelConfigurationLoaderTests.cs (50)
23private KestrelServerOptions CreateServerOptions() 25var serverOptions = new KestrelServerOptions(); 61var serverOptions = CreateServerOptions(); 81var serverOptions = CreateServerOptions(); 98var serverOptions = CreateServerOptions(); 122var serverOptions = CreateServerOptions(); 154var serverOptions = CreateServerOptions(); 202var serverOptions = CreateServerOptions(); 247var serverOptions = CreateServerOptions(); 287var serverOptions = CreateServerOptions(); 367var serverOptions = CreateServerOptions(); 414var serverOptions = CreateServerOptions(); 461var serverOptions = CreateServerOptions(); 510var serverOptions = CreateServerOptions(); 561var serverOptions = CreateServerOptions(); 585var serverOptions = CreateServerOptions(); 610var serverOptions = CreateServerOptions(); 635var serverOptions = CreateServerOptions(); 673var serverOptions = CreateServerOptions(); 704var serverOptions = CreateServerOptions(); 736var serverOptions = CreateServerOptions(); 765var serverOptions = CreateServerOptions(); 817var serverOptions = CreateServerOptions(); 854var serverOptions = CreateServerOptions(); 952var serverOptions = CreateServerOptions(); 1046var serverOptions = CreateServerOptions(); 1115var serverOptions = CreateServerOptions(); 1170var serverOptions = CreateServerOptions(); 1216var serverOptions = CreateServerOptions(); 1246var serverOptions = CreateServerOptions(); 1275var serverOptions = CreateServerOptions(); 1307var serverOptions = CreateServerOptions(); 1351var serverOptions = CreateServerOptions(); 1380var serverOptions = CreateServerOptions(); 1408var serverOptions = CreateServerOptions(); 1435var serverOptions = CreateServerOptions(); 1465var serverOptions = CreateServerOptions(); 1504var serverOptions = CreateServerOptions(); 1541var serverOptions = CreateServerOptions(); 1577var serverOptions = CreateServerOptions(); 1602var serverOptions = CreateServerOptions(); 1645var serverOptions = CreateServerOptions(); 1672var serverOptions = CreateServerOptions(); 1698var serverOptions = CreateServerOptions(); 1724var serverOptions = CreateServerOptions(); 1757var serverOptions = CreateServerOptions(); 1781var serverOptions = CreateServerOptions(); 1805var serverOptions = CreateServerOptions(); 1826var serverOptions = CreateServerOptions(); 1837var serverOptions = CreateServerOptions();
WebHostBuilderKestrelExtensionsTests.cs (1)
28services.Configure<KestrelServerOptions>(options =>
Microsoft.AspNetCore.SignalR.Tests.Utils (4)
src\Shared\SignalR\FunctionalTestBase.cs (1)
40public Task<InProcessTestServer<T>> StartServer<T>(Func<WriteContext, bool> expectedErrorsFilter = null, Action<KestrelServerOptions> configureKestrelServerOptions = null) where T : class
src\Shared\SignalR\InProcessTestServer.cs (3)
42private readonly Action<KestrelServerOptions> _configureKestrelServerOptions; 57public static async Task<InProcessTestServer<TStartup>> StartServer(ILoggerFactory loggerFactory, Action<KestrelServerOptions> configureKestrelServerOptions = null, IDisposable disposable = null) 68private InProcessTestServer(ILoggerFactory loggerFactory, Action<KestrelServerOptions> configureKestrelServerOptions, IDisposable disposable)
Sockets.BindTests (7)
src\Servers\Kestrel\shared\test\TransportTestHelpers\TestServer.cs (3)
67public TestServer(RequestDelegate app, TestServiceContext context, Action<KestrelServerOptions> configureKestrel) 72public TestServer(RequestDelegate app, TestServiceContext context, Action<KestrelServerOptions> configureKestrel, Action<IServiceCollection> configureServices) 96var configureOptions = sp.GetServices<IConfigureOptions<KestrelServerOptions>>();
src\Servers\Kestrel\test\BindTests\AddressRegistrationTests.cs (4)
330var options = ((IOptions<KestrelServerOptions>)host.Services.GetService(typeof(IOptions<KestrelServerOptions>))).Value; 897KestrelServerOptions capturedOptions = null;
Sockets.FunctionalTests (3)
src\Servers\Kestrel\shared\test\TransportTestHelpers\TestServer.cs (3)
67public TestServer(RequestDelegate app, TestServiceContext context, Action<KestrelServerOptions> configureKestrel) 72public TestServer(RequestDelegate app, TestServiceContext context, Action<KestrelServerOptions> configureKestrel, Action<IServiceCollection> configureServices) 96var configureOptions = sp.GetServices<IConfigureOptions<KestrelServerOptions>>();