9 instantiations of KestrelServer
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (9)
KestrelServerTests.cs (9)
274
new
KestrelServer
(Options.Create<KestrelServerOptions>(null), new MockTransportFactory(), mockLoggerFactory.Object);
282
new
KestrelServer
(
574
var server = new
KestrelServer
(Options.Create(options), mockTransportFactory.Object, mockLoggerFactory.Object);
632
var server = new
KestrelServer
(Options.Create(options), mockTransportFactory.Object, mockLoggerFactory.Object);
687
var server = new
KestrelServer
(Options.Create(options), mockTransportFactory.Object, mockLoggerFactory.Object);
822
var server = new
KestrelServer
(Options.Create(options), mockTransportFactory.Object, mockLoggerFactory.Object);
960
var server = new
KestrelServer
(Options.Create(options), mockTransportFactory.Object, mockLoggerFactory.Object);
974
return new
KestrelServer
(Options.Create(options), new MockTransportFactory(), new LoggerFactory(new[] { new KestrelTestLoggerProvider(testLogger) }));
979
return new
KestrelServer
(Options.Create(options), new MockTransportFactory(), new LoggerFactory(new[] { new KestrelTestLoggerProvider(throwOnCriticalErrors) }));
47 references to KestrelServer
Microsoft.AspNetCore.Server.Kestrel.Core (25)
HttpsConfigurationService.cs (3)
59
ILogger<
KestrelServer
> serverLogger,
244
private readonly ILogger<
KestrelServer
> _serverLogger;
249
ILogger<
KestrelServer
> serverLogger,
IHttpsConfigurationService.cs (1)
33
ILogger<
KestrelServer
> serverLogger,
Internal\Certificates\CertificateConfigLoader.cs (2)
15
public CertificateConfigLoader(IHostEnvironment hostEnvironment, ILogger<
KestrelServer
> logger)
22
public ILogger<
KestrelServer
> Logger { get; }
Internal\LoggerExtensions.cs (11)
16
private static partial void LocatedDevelopmentCertificate(this ILogger<
KestrelServer
> logger, string certificateSubjectName, string certificateThumbprint);
18
public static void LocatedDevelopmentCertificate(this ILogger<
KestrelServer
> logger, X509Certificate2 certificate) => LocatedDevelopmentCertificate(logger, certificate.Subject, certificate.Thumbprint);
21
public static partial void UnableToLocateDevelopmentCertificate(this ILogger<
KestrelServer
> logger);
24
public static partial void FailedToLocateDevelopmentCertificateFile(this ILogger<
KestrelServer
> logger, string certificatePath);
27
public static partial void FailedToLoadDevelopmentCertificate(this ILogger<
KestrelServer
> logger, string certificatePath);
30
public static partial void BadDeveloperCertificateState(this ILogger<
KestrelServer
> logger);
33
public static partial void DeveloperCertificateFirstRun(this ILogger<
KestrelServer
> logger, string message);
36
public static partial void FailedToLoadCertificate(this ILogger<
KestrelServer
> logger, string certificateFilePath);
39
public static partial void FailedToLoadCertificateKey(this ILogger<
KestrelServer
> logger, string certificateKeyFilePath);
42
public static partial void DeveloperCertificateNotTrusted(this ILogger<
KestrelServer
> logger);
45
public static partial void DeveloperCertificatePartiallyTrusted(this ILogger<
KestrelServer
> logger);
KestrelServer.cs (2)
26
/// Initializes a new instance of <see cref="
KestrelServer
"/>.
82
public void Initialize(IHostEnvironment hostEnvironment, ILogger<
KestrelServer
> serverLogger, ILogger<HttpsConnectionMiddleware> httpsLogger)
KestrelServerLimits.cs (1)
11
/// Limits for <see cref="
KestrelServer
"/>.
KestrelServerOptions.cs (3)
313
var logger = ApplicationServices!.GetRequiredService<ILogger<
KestrelServer
>>();
327
var logger = ApplicationServices.GetRequiredService<ILogger<
KestrelServer
>>();
374
private static X509Certificate2? GetDevelopmentCertificateFromStore(ILogger<
KestrelServer
> logger)
TlsConfigurationLoader.cs (2)
26
private readonly ILogger<
KestrelServer
> _serverLogger;
31
ILogger<
KestrelServer
> serverLogger,
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (22)
KestrelEventSourceTests.cs (1)
17
var esType = typeof(
KestrelServer
).Assembly.GetType(
KestrelServerOptionsTests.cs (1)
85
serviceCollection.AddSingleton(Mock.Of<ILogger<
KestrelServer
>>());
KestrelServerTests.cs (20)
51
using (
var
server = CreateServer(CreateServerOptions(), testLogger))
67
using (
var
server = CreateServer(options))
83
using (
var
server = CreateServer(options, throwOnCriticalErrors: false))
95
using (
var
server = CreateServer(CreateServerOptions()))
109
using (
var
server = CreateServer(serverOptions))
122
using (
var
server = CreateServer(new KestrelServerOptions(), testLogger))
147
using (
var
server = CreateServer(kestrelOptions, testLogger))
208
using (
var
server = CreateServer(kestrelOptions, testLogger))
230
using (
var
server = CreateServer(options, testLogger))
257
using (
var
server = CreateServer(options, testLogger))
302
serviceProvider.GetRequiredService<ILogger<
KestrelServer
>>(),
574
var
server = new KestrelServer(Options.Create(options), mockTransportFactory.Object, mockLoggerFactory.Object);
632
var
server = new KestrelServer(Options.Create(options), mockTransportFactory.Object, mockLoggerFactory.Object);
687
var
server = new KestrelServer(Options.Create(options), mockTransportFactory.Object, mockLoggerFactory.Object);
790
serviceCollection.AddSingleton(Mock.Of<ILogger<
KestrelServer
>>());
822
var
server = new KestrelServer(Options.Create(options), mockTransportFactory.Object, mockLoggerFactory.Object);
929
serviceCollection.AddSingleton(Mock.Of<ILogger<
KestrelServer
>>());
960
var
server = new KestrelServer(Options.Create(options), mockTransportFactory.Object, mockLoggerFactory.Object);
972
private static
KestrelServer
CreateServer(KestrelServerOptions options, ILogger testLogger)
977
private static
KestrelServer
CreateServer(KestrelServerOptions options, bool throwOnCriticalErrors = true)