21 implementations of ILoggerFactory
Aspire.Components.Common.Tests (1)
TestLoggerFactory.cs (1)
11public sealed class TestLoggerFactory : ILoggerFactory
Aspire.Dashboard.Components.Tests (1)
tests\Shared\Logging\TestLoggerFactory.cs (1)
6public class TestLoggerFactory : ILoggerFactory
Aspire.Dashboard.Tests (1)
tests\Shared\Logging\TestLoggerFactory.cs (1)
6public class TestLoggerFactory : ILoggerFactory
Aspire.Hosting.Testing.Tests (1)
tests\Shared\Logging\TestLoggerFactory.cs (1)
6public class TestLoggerFactory : ILoggerFactory
Aspire.Hosting.Tests (1)
tests\Shared\Logging\TestLoggerFactory.cs (1)
6public class TestLoggerFactory : ILoggerFactory
Aspire.Playground.Tests (1)
tests\Shared\Logging\TestLoggerFactory.cs (1)
6public class TestLoggerFactory : ILoggerFactory
Microsoft.AspNetCore.DataProtection.Tests (1)
StringLoggerFactory.cs (1)
10internal sealed class StringLoggerFactory : ILoggerFactory
Microsoft.AspNetCore.Hosting.Tests (3)
Fakes\CustomLoggerFactory.cs (2)
9public class CustomLoggerFactory : ILoggerFactory 22public class NonSubLoggerFactory : ILoggerFactory
WebHostBuilderTests.cs (1)
1772private class DisposableLoggerFactory : ILoggerFactory
Microsoft.AspNetCore.InternalTesting (1)
Logging\TestLoggerFactory.cs (1)
6public class TestLoggerFactory : ILoggerFactory
Microsoft.AspNetCore.SignalR.Tests (1)
NativeAotTests.cs (1)
381public class StringLoggerFactory : ILoggerFactory
Microsoft.AspNetCore.SignalR.Tests.Utils (1)
src\Shared\SignalR\WrappingLoggerFactory.cs (1)
16public class WrappingLoggerFactory : ILoggerFactory
Microsoft.AspNetCore.SpaServices.Extensions.Tests (1)
ListLoggerFactory.cs (1)
12public class ListLoggerFactory : ILoggerFactory
Microsoft.CodeAnalysis.LanguageServer (1)
Logging\ServerLoggerFactory.cs (1)
15internal class ServerLoggerFactory : ILoggerFactory
Microsoft.Extensions.Logging (2)
LoggerFactory.cs (2)
20public class LoggerFactory : ILoggerFactory 294private sealed class DisposingLoggerFactory : ILoggerFactory
Microsoft.Extensions.Logging.Abstractions (1)
NullLoggerFactory.cs (1)
10public class NullLoggerFactory : ILoggerFactory
Microsoft.Extensions.Telemetry (1)
Logging\ExtendedLoggerFactory.cs (1)
16internal sealed class ExtendedLoggerFactory : ILoggerFactory
Microsoft.Extensions.Telemetry.Tests (1)
Logging\Utils.cs (1)
27private sealed class DisposingLoggerFactory : ILoggerFactory
Microsoft.Maui (1)
Hosting\MauiAppBuilder.cs (1)
183 private sealed class NullLoggerFactory : ILoggerFactory
1321 references to ILoggerFactory
Aspire.Components.Common.Tests (3)
ConformanceTests.cs (3)
267builder.Services.AddSingleton<ILoggerFactory, TestLoggerFactory>(); 274builder.Services.AddSingleton<ILoggerFactory, TestLoggerFactory>(); 282TestLoggerFactory loggerFactory = (TestLoggerFactory)host.Services.GetRequiredService<ILoggerFactory>();
Aspire.Confluent.Kafka (2)
AspireKafkaConsumerExtensions.cs (1)
169ILogger logger = serviceProvider.GetRequiredService<ILoggerFactory>().CreateLogger(ConfluentKafkaCommon.LogCategoryName);
AspireKafkaProducerExtensions.cs (1)
169ILogger logger = serviceProvider.GetRequiredService<ILoggerFactory>().CreateLogger(ConfluentKafkaCommon.LogCategoryName);
Aspire.Dashboard (11)
Authentication\Connection\ConnectionTypeAuthenticationHandler.cs (1)
12public ConnectionTypeAuthenticationHandler(IOptionsMonitor<ConnectionTypeAuthenticationHandlerOptions> options, ILoggerFactory logger, UrlEncoder encoder) : base(options, logger, encoder)
Authentication\FrontendCompositeAuthenticationHandler.cs (1)
15ILoggerFactory logger,
Authentication\OtlpApiKey\OtlpApiKeyAuthenticationHandler.cs (1)
17public OtlpApiKeyAuthenticationHandler(IOptionsMonitor<DashboardOptions> dashboardOptions, IOptionsMonitor<OtlpApiKeyAuthenticationHandlerOptions> options, ILoggerFactory logger, UrlEncoder encoder) : base(options, logger, encoder)
Authentication\OtlpCompositeAuthenticationHandler.cs (1)
18ILoggerFactory logger,
Authentication\UnsecuredAuthenticationHandler.cs (1)
13public UnsecuredAuthenticationHandler(IOptionsMonitor<AuthenticationSchemeOptions> options, ILoggerFactory logger, UrlEncoder encoder) : base(options, logger, encoder)
DashboardWebApplication.cs (1)
423return _app.Services.GetRequiredService<ILoggerFactory>().CreateLogger<DashboardWebApplication>();
Model\BrowserTimeProvider.cs (1)
18public BrowserTimeProvider(ILoggerFactory loggerFactory)
Otlp\Storage\TelemetryRepository.cs (1)
56public TelemetryRepository(ILoggerFactory loggerFactory, IOptions<DashboardOptions> dashboardOptions)
ResourceService\DashboardClient.cs (2)
49private readonly ILoggerFactory _loggerFactory; 72ILoggerFactory loggerFactory,
ShortcutManager.cs (1)
10public sealed class ShortcutManager(ILoggerFactory loggerFactory) : IDisposable
Aspire.Dashboard.Components.Tests (12)
Controls\ApplicationNameTests.cs (2)
22Services.AddSingleton<ILoggerFactory>(NullLoggerFactory.Instance); 40Services.AddSingleton<ILoggerFactory>(NullLoggerFactory.Instance);
Pages\ConsoleLogsTests.cs (2)
159var loggerFactory = IntegrationTestHelpers.CreateLoggerFactory(_testOutputHelper); 162Services.AddSingleton<ILoggerFactory>(loggerFactory);
Shared\IntegrationTestHelpers.cs (1)
12public static ILoggerFactory CreateLoggerFactory(ITestOutputHelper testOutputHelper, ITestSink? testSink = null)
tests\Shared\Logging\XunitLoggerFactoryExtensions.cs (6)
31public static ILoggerFactory AddXunit(this ILoggerFactory loggerFactory, ITestOutputHelper output) 37public static ILoggerFactory AddXunit(this ILoggerFactory loggerFactory, ITestOutputHelper output, LogLevel minLevel) 43public static ILoggerFactory AddXunit(this ILoggerFactory loggerFactory, ITestOutputHelper output, LogLevel minLevel, DateTimeOffset? logStart)
tests\Shared\Telemetry\TelemetryTestHelpers.cs (1)
227ILoggerFactory? loggerFactory = null)
Aspire.Dashboard.Tests (24)
Integration\DashboardClientAuthTests.cs (4)
43var loggerFactory = IntegrationTestHelpers.CreateLoggerFactory(_testOutputHelper); 59var loggerFactory = IntegrationTestHelpers.CreateLoggerFactory(_testOutputHelper); 70private static async Task<ResourceServiceServer> CreateResourceServiceServerAsync(ILoggerFactory loggerFactory, bool useHttps, Action<TestCalls>? configureCalls = null) 112ILoggerFactory loggerFactory,
Integration\IntegrationTestHelpers.cs (5)
26public static ILoggerFactory CreateLoggerFactory(ITestOutputHelper testOutputHelper, ITestSink? testSink = null) 46var loggerFactory = CreateLoggerFactory(testOutputHelper, testSink); 52ILoggerFactory loggerFactory, 143var loggerFactory = LoggerFactory.Create(builder => 154ILoggerFactory loggerFactory,
Integration\OtlpGrpcServiceTests.cs (1)
158using var loggerFactory = IntegrationTestHelpers.CreateLoggerFactory(_testOutputHelper, testSink: testSink);
Integration\StartupTests.cs (1)
188var loggerFactory = IntegrationTestHelpers.CreateLoggerFactory(testOutputHelper);
Model\ApplicationsSelectHelpersTests.cs (2)
95var factory = LoggerFactory.Create(b => b.AddProvider(new TestLoggerProvider(testSink))); 119var factory = LoggerFactory.Create(b => b.AddProvider(new TestLoggerProvider(testSink)));
TelemetryRepositoryTests\LogTests.cs (1)
707var loggerFactory = IntegrationTestHelpers.CreateLoggerFactory(_testOutputHelper);
TelemetryRepositoryTests\OtlpHelpersTests.cs (2)
415var factory = LoggerFactory.Create(b => 460var factory = LoggerFactory.Create(b =>
TelemetryRepositoryTests\TraceTests.cs (1)
100var factory = LoggerFactory.Create(b => b.AddProvider(new TestLoggerProvider(testSink)));
tests\Shared\Logging\XunitLoggerFactoryExtensions.cs (6)
31public static ILoggerFactory AddXunit(this ILoggerFactory loggerFactory, ITestOutputHelper output) 37public static ILoggerFactory AddXunit(this ILoggerFactory loggerFactory, ITestOutputHelper output, LogLevel minLevel) 43public static ILoggerFactory AddXunit(this ILoggerFactory loggerFactory, ITestOutputHelper output, LogLevel minLevel, DateTimeOffset? logStart)
tests\Shared\Telemetry\TelemetryTestHelpers.cs (1)
227ILoggerFactory? loggerFactory = null)
Aspire.Hosting (9)
Dashboard\DashboardLifecycleHook.cs (4)
32ILoggerFactory loggerFactory, 344ILoggerFactory loggerFactory, 402private static void LogMessage(ILoggerFactory loggerFactory, ConcurrentDictionary<string, ILogger> loggerCache, DashboardLogMessage logMessage) 404var logger = loggerCache.GetOrAdd(logMessage.Category, static (string category, ILoggerFactory loggerFactory) =>
Dashboard\DashboardServiceAuth.cs (1)
29ILoggerFactory logger,
Dashboard\DashboardServiceHost.cs (1)
54ILoggerFactory loggerFactory,
Dcp\DcpHostService.cs (2)
23private readonly ILoggerFactory _loggerFactory; 43ILoggerFactory loggerFactory,
Devcontainers\DevcontainerPortForwardingLifecycleHook.cs (1)
19public DevcontainerPortForwardingLifecycleHook(ILoggerFactory loggerFactory, IOptions<CodespacesOptions> codespacesOptions, IOptions<DevcontainersOptions> devcontainersOptions, DevcontainerSettingsWriter settingsWriter)
Aspire.Hosting.Containers.Tests (1)
src\Aspire.Hosting.Testing\ResourceLoggerForwarderService.cs (1)
19ILoggerFactory loggerFactory)
Aspire.Hosting.Nats (1)
NatsBuilderExtensions.cs (1)
68LoggerFactory = @event.Services.GetRequiredService<ILoggerFactory>(),
Aspire.Hosting.Testing (1)
ResourceLoggerForwarderService.cs (1)
19ILoggerFactory loggerFactory)
Aspire.Hosting.Testing.Tests (7)
tests\Aspire.Hosting.Tests\Utils\LoggerNotificationExtensions.cs (1)
116var logger = app.Services.GetRequiredService<ILoggerFactory>().CreateLogger(nameof(LoggerNotificationExtensions));
tests\Shared\Logging\XunitLoggerFactoryExtensions.cs (6)
31public static ILoggerFactory AddXunit(this ILoggerFactory loggerFactory, ITestOutputHelper output) 37public static ILoggerFactory AddXunit(this ILoggerFactory loggerFactory, ITestOutputHelper output, LogLevel minLevel) 43public static ILoggerFactory AddXunit(this ILoggerFactory loggerFactory, ITestOutputHelper output, LogLevel minLevel, DateTimeOffset? logStart)
Aspire.Hosting.Tests (11)
Dashboard\DashboardLifecycleHookTests.cs (2)
33var factory = LoggerFactory.Create(b => 104ILoggerFactory? loggerFactory = null,
Dashboard\DashboardServiceTests.cs (1)
76var loggerFactory = LoggerFactory.Create(builder =>
src\Aspire.Hosting.Testing\ResourceLoggerForwarderService.cs (1)
19ILoggerFactory loggerFactory)
tests\Shared\Logging\XunitLoggerFactoryExtensions.cs (6)
31public static ILoggerFactory AddXunit(this ILoggerFactory loggerFactory, ITestOutputHelper output) 37public static ILoggerFactory AddXunit(this ILoggerFactory loggerFactory, ITestOutputHelper output, LogLevel minLevel) 43public static ILoggerFactory AddXunit(this ILoggerFactory loggerFactory, ITestOutputHelper output, LogLevel minLevel, DateTimeOffset? logStart)
Utils\LoggerNotificationExtensions.cs (1)
116var logger = app.Services.GetRequiredService<ILoggerFactory>().CreateLogger(nameof(LoggerNotificationExtensions));
Aspire.Milvus.Client (1)
AspireMilvusExtensions.cs (1)
106return new MilvusClient(settings.Endpoint, apiKey: settings.Key, database: settings.Database, loggerFactory: serviceProvider.GetRequiredService<ILoggerFactory>());
Aspire.MongoDB.Driver (1)
AspireMongoDBDriverExtensions.cs (1)
196clientSettings.LoggingSettings ??= new LoggingSettings(serviceProvider.GetService<ILoggerFactory>());
Aspire.NATS.Net (1)
AspireNatsClientExtensions.cs (1)
133LoggerFactory = provider.GetRequiredService<ILoggerFactory>(),
Aspire.Playground.Tests (8)
Infrastructure\DistributedApplicationExtensions.cs (1)
213var logger = app.Services.GetRequiredService<ILoggerFactory>().CreateLogger(nameof(TryApplyEfMigrationsAsync));
tests\Aspire.Hosting.Tests\Utils\LoggerNotificationExtensions.cs (1)
116var logger = app.Services.GetRequiredService<ILoggerFactory>().CreateLogger(nameof(LoggerNotificationExtensions));
tests\Shared\Logging\XunitLoggerFactoryExtensions.cs (6)
31public static ILoggerFactory AddXunit(this ILoggerFactory loggerFactory, ITestOutputHelper output) 37public static ILoggerFactory AddXunit(this ILoggerFactory loggerFactory, ITestOutputHelper output, LogLevel minLevel) 43public static ILoggerFactory AddXunit(this ILoggerFactory loggerFactory, ITestOutputHelper output, LogLevel minLevel, DateTimeOffset? logStart)
Aspire.Pomelo.EntityFrameworkCore.MySql (1)
AspireEFMySqlExtensions.cs (1)
94if (serviceProvider.GetService<ILoggerFactory>() is { } loggerFactory)
Aspire.Pomelo.EntityFrameworkCore.MySql.Tests (1)
EnrichMySqlTests.cs (1)
35if (serviceProvider.GetService<ILoggerFactory>() is { } loggerFactory)
Aspire.Qdrant.Client (1)
AspireQdrantExtensions.cs (1)
104return new QdrantClient(settings.Endpoint, apiKey: settings.Key, loggerFactory: serviceProvider.GetRequiredService<ILoggerFactory>());
Aspire.RabbitMQ.Client (2)
RabbitMQEventSourceLogForwarder.cs (2)
18public RabbitMQEventSourceLogForwarder(ILoggerFactory loggerFactory) 24/// Initiates the log forwarding from the RabbitMQ event sources to a provided <see cref="ILoggerFactory"/>, call <see cref="Dispose"/> to stop forwarding.
Aspire.StackExchange.Redis (1)
AspireRedisExtensions.cs (1)
165configurationOptions.LoggerFactory ??= serviceProvider.GetService<ILoggerFactory>();
AutobahnTestApp (1)
Startup.cs (1)
11public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory)
AzureAppServicesHostingStartupSample (1)
Startup.cs (1)
8public void Configure(IApplicationBuilder app, ILoggerFactory loggerfactory)
AzureAppServicesSample (1)
Startup.cs (1)
19public void Configure(IApplicationBuilder app, ILoggerFactory loggerfactory)
BasicWebSite (1)
BasicAuthenticationHandler.cs (1)
13public BasicAuthenticationHandler(IOptionsMonitor<AuthenticationSchemeOptions> options, ILoggerFactory logger, UrlEncoder encoder)
BuildValidator (3)
LocalReferenceResolver.cs (1)
54public static LocalReferenceResolver Create(Options options, ILoggerFactory loggerFactory)
Program.cs (2)
114var loggerFactory = LoggerFactory.Create(builder => 234private static bool ValidateFiles(IEnumerable<AssemblyInfo> assemblyInfos, Options options, ILoggerFactory loggerFactory)
ClientSample (2)
LoggingMessageHandler.cs (2)
15public LoggingMessageHandler(ILoggerFactory loggerFactory) 20public LoggingMessageHandler(ILoggerFactory loggerFactory, HttpMessageHandler innerHandler) : base(innerHandler)
ConcurrencyLimiterSample (1)
Startup.cs (1)
17public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory)
CustomAuthorizationFailureResponse (1)
Authentication\SampleAuthenticationHandler.cs (1)
15public SampleAuthenticationHandler(IOptionsMonitor<AuthenticationSchemeOptions> options, ILoggerFactory logger, UrlEncoder encoder) : base(options, logger, encoder)
CustomEncryptorSample (2)
CustomXmlDecryptor.cs (1)
17_logger = services.GetRequiredService<ILoggerFactory>().CreateLogger<CustomXmlDecryptor>();
CustomXmlEncryptor.cs (1)
17_logger = services.GetRequiredService<ILoggerFactory>().CreateLogger<CustomXmlEncryptor>();
Diagnostics.EFCore.FunctionalTests (3)
DatabaseErrorPageMiddlewareTest.cs (3)
390app.ApplicationServices.GetService<ILoggerFactory>().AddProvider(logProvider); 423.UseLoggerFactory(context.RequestServices.GetService<ILoggerFactory>()) 536app.ApplicationServices.GetService<ILoggerFactory>().AddProvider(logProvider);
DynamicSchemes (1)
SimpleAuthHandler.cs (1)
17public SimpleAuthHandler(IOptionsMonitor<SimpleOptions> options, ILoggerFactory logger, UrlEncoder encoder) : base(options, logger, encoder)
HtmlGenerationWebSite (1)
TestCacheTagHelper.cs (1)
19ILoggerFactory loggerFactory) : base(factory, htmlEncoder)
Http3SampleApp (2)
Program.cs (1)
120using var httpEventSource = new HttpEventSourceListener(host.Services.GetRequiredService<ILoggerFactory>());
src\Shared\HttpClient\HttpEventSourceListener.cs (1)
17public HttpEventSourceListener(ILoggerFactory loggerFactory)
Identity.DefaultUI.WebSite (1)
Services\ContosoAuthenticationHandler.cs (1)
16ILoggerFactory logger,
IdentitySample.DefaultUI (1)
Startup.cs (1)
53public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILoggerFactory loggerFactory)
IdentitySample.Mvc (3)
Controllers\AccountController.cs (1)
29ILoggerFactory loggerFactory)
Controllers\ManageController.cs (1)
27ILoggerFactory loggerFactory)
Startup.cs (1)
58public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILoggerFactory loggerFactory)
IIS.FunctionalTests (3)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\IISTestSiteFixture.cs (3)
18private ILoggerFactory _loggerFactory; 118private ILoggerFactory _loggerFactory; 120public ILoggerFactory LoggerFactory
IIS.LongTests (3)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\IISTestSiteFixture.cs (3)
18private ILoggerFactory _loggerFactory; 118private ILoggerFactory _loggerFactory; 120public ILoggerFactory LoggerFactory
IIS.NewHandler.FunctionalTests (3)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\IISTestSiteFixture.cs (3)
18private ILoggerFactory _loggerFactory; 118private ILoggerFactory _loggerFactory; 120public ILoggerFactory LoggerFactory
IIS.NewShim.FunctionalTests (3)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\IISTestSiteFixture.cs (3)
18private ILoggerFactory _loggerFactory; 118private ILoggerFactory _loggerFactory; 120public ILoggerFactory LoggerFactory
IIS.ShadowCopy.Tests (3)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\IISTestSiteFixture.cs (3)
18private ILoggerFactory _loggerFactory; 118private ILoggerFactory _loggerFactory; 120public ILoggerFactory LoggerFactory
IIS.Tests (6)
Utilities\TestServer.cs (6)
46private readonly ILoggerFactory _loggerFactory; 61private TestServer(Action<IApplicationBuilder> appBuilder, ILoggerFactory loggerFactory, bool isHttps) 70public static async Task<TestServer> Create(Action<IApplicationBuilder> appBuilder, ILoggerFactory loggerFactory, IISServerOptions options, bool isHttps = false) 81public static Task<TestServer> Create(RequestDelegate app, ILoggerFactory loggerFactory) 86public static Task<TestServer> Create(RequestDelegate app, ILoggerFactory loggerFactory, IISServerOptions options) 91public static Task<TestServer> CreateHttps(RequestDelegate app, ILoggerFactory loggerFactory)
IISExpress.FunctionalTests (3)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\IISTestSiteFixture.cs (3)
18private ILoggerFactory _loggerFactory; 118private ILoggerFactory _loggerFactory; 120public ILoggerFactory LoggerFactory
IISSample (1)
Startup.cs (1)
33public void Configure(IApplicationBuilder app, ILoggerFactory loggerfactory, IAuthenticationSchemeProvider authSchemeProvider)
InMemory.FunctionalTests (8)
HttpsConnectionMiddlewareTests.cs (2)
1479var loggerFactory = testLogger is null ? (ILoggerFactory)NullLoggerFactory.Instance : new LoggerFactory(new[] { new KestrelTestLoggerProvider(testLogger) });
ResponseTests.cs (1)
4678ILoggerFactory loggerFactory,
src\Servers\Kestrel\shared\test\Http3\Http3InMemory.cs (1)
38public Http3InMemory(ServiceContext serviceContext, FakeTimeProvider fakeTimeProvider, ITimeoutHandler timeoutHandler, ILoggerFactory loggerFactory)
src\Servers\Kestrel\shared\test\TestServiceContext.cs (4)
22public TestServiceContext(ILoggerFactory loggerFactory = null, KestrelTrace kestrelTrace = null, bool disableHttp1LineFeedTerminators = true, KestrelMetrics metrics = null) 31private static KestrelTrace CreateLoggingTrace(ILoggerFactory loggerFactory) 50private void Initialize(ILoggerFactory loggerFactory, KestrelTrace kestrelTrace, bool disableHttp1LineFeedTerminators, KestrelMetrics metrics) 72public ILoggerFactory LoggerFactory { get; set; }
Interop.FunctionalTests (2)
Http2\Http2RequestTests.cs (1)
262logger = host.Services.GetRequiredService<ILoggerFactory>().CreateLogger("Test");
src\Shared\HttpClient\HttpEventSourceListener.cs (1)
17public HttpEventSourceListener(ILoggerFactory loggerFactory)
InteropClient (3)
InteropClient.cs (2)
84private ILoggerFactory loggerFactory; 107loggerFactory = serviceProvider.GetRequiredService<ILoggerFactory>();
src\Shared\HttpClient\HttpEventSourceListener.cs (1)
17public HttpEventSourceListener(ILoggerFactory loggerFactory)
Kestrel.SampleApp (1)
Startup.cs (1)
27public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory)
LocalizationWebsite (5)
StartupBuilderAPIs.cs (1)
19ILoggerFactory loggerFactory,
StartupGetAllStrings.cs (1)
20ILoggerFactory loggerFactory,
StartupResourcesAtRootFolder.cs (1)
21ILoggerFactory loggerFactory,
StartupResourcesInClassLibrary.cs (1)
20ILoggerFactory loggerFactory,
StartupResourcesInFolder.cs (1)
21ILoggerFactory loggerFactory,
Microsoft.AspNetCore (4)
WebApplication.cs (1)
36Logger = host.Services.GetRequiredService<ILoggerFactory>().CreateLogger(Environment.ApplicationName ?? nameof(WebApplication));
WebHost.cs (3)
127/// configure the <see cref="ILoggerFactory"/> to log to the console and debug output, 147/// configure the <see cref="ILoggerFactory"/> to log to the console and debug output, 297/// configure the <see cref="ILoggerFactory"/> to log to the console and debug output,
Microsoft.AspNetCore.Antiforgery (1)
Internal\DefaultAntiforgery.cs (1)
30ILoggerFactory loggerFactory)
Microsoft.AspNetCore.Antiforgery.Test (7)
DefaultAntiforgeryTest.cs (7)
349var loggerFactory = new Mock<ILoggerFactory>(); 1280var loggerFactory = new Mock<ILoggerFactory>(); 1318var loggerFactory = new Mock<ILoggerFactory>(); 1352var loggerFactory = new Mock<ILoggerFactory>(); 1392var loggerFactory = httpContext.RequestServices.GetRequiredService<ILoggerFactory>(); 1404builder.AddSingleton<ILoggerFactory>(new LoggerFactory());
Microsoft.AspNetCore.Authentication (20)
AuthenticationHandler.cs (4)
113/// <param name="logger">The <see cref="ILoggerFactory"/>.</param> 117protected AuthenticationHandler(IOptionsMonitor<TOptions> options, ILoggerFactory logger, UrlEncoder encoder, ISystemClock clock) 129/// <param name="logger">The <see cref="ILoggerFactory"/>.</param> 133protected AuthenticationHandler(IOptionsMonitor<TOptions> options, ILoggerFactory logger, UrlEncoder encoder)
PolicySchemeHandler.cs (4)
20/// <param name="logger">The <see cref="ILoggerFactory"/>.</param> 24public PolicySchemeHandler(IOptionsMonitor<PolicySchemeOptions> options, ILoggerFactory logger, UrlEncoder encoder, ISystemClock clock) : base(options, logger, encoder, clock) 31/// <param name="logger">The <see cref="ILoggerFactory"/>.</param> 33public PolicySchemeHandler(IOptionsMonitor<PolicySchemeOptions> options, ILoggerFactory logger, UrlEncoder encoder) : base(options, logger, encoder)
RemoteAuthenticationHandler.cs (4)
44/// <param name="logger">The <see cref="ILoggerFactory"/>.</param> 48protected RemoteAuthenticationHandler(IOptionsMonitor<TOptions> options, ILoggerFactory logger, UrlEncoder encoder, ISystemClock clock) 55/// <param name="logger">The <see cref="ILoggerFactory"/>.</param> 57protected RemoteAuthenticationHandler(IOptionsMonitor<TOptions> options, ILoggerFactory logger, UrlEncoder encoder)
SignInAuthenticationHandler.cs (4)
21/// <param name="logger">The <see cref="ILoggerFactory"/>.</param> 25public SignInAuthenticationHandler(IOptionsMonitor<TOptions> options, ILoggerFactory logger, UrlEncoder encoder, ISystemClock clock) : base(options, logger, encoder, clock) 32/// <param name="logger">The <see cref="ILoggerFactory"/>.</param> 34public SignInAuthenticationHandler(IOptionsMonitor<TOptions> options, ILoggerFactory logger, UrlEncoder encoder) : base(options, logger, encoder)
SignOutAuthenticationHandler.cs (4)
20/// <param name="logger">The <see cref="ILoggerFactory"/>.</param> 24public SignOutAuthenticationHandler(IOptionsMonitor<TOptions> options, ILoggerFactory logger, UrlEncoder encoder, ISystemClock clock) : base(options, logger, encoder, clock) 31/// <param name="logger">The <see cref="ILoggerFactory"/>.</param> 33public SignOutAuthenticationHandler(IOptionsMonitor<TOptions> options, ILoggerFactory logger, UrlEncoder encoder) : base(options, logger, encoder)
Microsoft.AspNetCore.Authentication.BearerToken (1)
BearerTokenHandler.cs (1)
16internal sealed class BearerTokenHandler(IOptionsMonitor<BearerTokenOptions> optionsMonitor, ILoggerFactory loggerFactory, UrlEncoder urlEncoder)
Microsoft.AspNetCore.Authentication.Certificate (1)
CertificateAuthenticationHandler.cs (1)
21ILoggerFactory logger,
Microsoft.AspNetCore.Authentication.Cookies (4)
CookieAuthenticationHandler.cs (4)
40/// <param name="logger">The <see cref="ILoggerFactory"/>.</param> 44public CookieAuthenticationHandler(IOptionsMonitor<CookieAuthenticationOptions> options, ILoggerFactory logger, UrlEncoder encoder, ISystemClock clock) 52/// <param name="logger">The <see cref="ILoggerFactory"/>.</param> 54public CookieAuthenticationHandler(IOptionsMonitor<CookieAuthenticationOptions> options, ILoggerFactory logger, UrlEncoder encoder)
Microsoft.AspNetCore.Authentication.Facebook (2)
FacebookHandler.cs (2)
27public FacebookHandler(IOptionsMonitor<FacebookOptions> options, ILoggerFactory logger, UrlEncoder encoder, ISystemClock clock) 35public FacebookHandler(IOptionsMonitor<FacebookOptions> options, ILoggerFactory logger, UrlEncoder encoder)
Microsoft.AspNetCore.Authentication.Google (2)
GoogleHandler.cs (2)
28public GoogleHandler(IOptionsMonitor<GoogleOptions> options, ILoggerFactory logger, UrlEncoder encoder, ISystemClock clock) 36public GoogleHandler(IOptionsMonitor<GoogleOptions> options, ILoggerFactory logger, UrlEncoder encoder)
Microsoft.AspNetCore.Authentication.JwtBearer (2)
JwtBearerHandler.cs (2)
27public JwtBearerHandler(IOptionsMonitor<JwtBearerOptions> options, ILoggerFactory logger, UrlEncoder encoder, ISystemClock clock) 35public JwtBearerHandler(IOptionsMonitor<JwtBearerOptions> options, ILoggerFactory logger, UrlEncoder encoder)
Microsoft.AspNetCore.Authentication.MicrosoftAccount (2)
MicrosoftAccountHandler.cs (2)
28public MicrosoftAccountHandler(IOptionsMonitor<MicrosoftAccountOptions> options, ILoggerFactory logger, UrlEncoder encoder, ISystemClock clock) 36public MicrosoftAccountHandler(IOptionsMonitor<MicrosoftAccountOptions> options, ILoggerFactory logger, UrlEncoder encoder)
Microsoft.AspNetCore.Authentication.Negotiate (2)
NegotiateHandler.cs (2)
35public NegotiateHandler(IOptionsMonitor<NegotiateOptions> options, ILoggerFactory logger, UrlEncoder encoder, ISystemClock clock) 43public NegotiateHandler(IOptionsMonitor<NegotiateOptions> options, ILoggerFactory logger, UrlEncoder encoder)
Microsoft.AspNetCore.Authentication.OAuth (2)
OAuthHandler.cs (2)
45public OAuthHandler(IOptionsMonitor<TOptions> options, ILoggerFactory logger, UrlEncoder encoder, ISystemClock clock) 53public OAuthHandler(IOptionsMonitor<TOptions> options, ILoggerFactory logger, UrlEncoder encoder)
Microsoft.AspNetCore.Authentication.OpenIdConnect (4)
OpenIdConnectHandler.cs (4)
51/// <param name="logger">The <see cref="ILoggerFactory"/>.</param> 56public OpenIdConnectHandler(IOptionsMonitor<OpenIdConnectOptions> options, ILoggerFactory logger, HtmlEncoder htmlEncoder, UrlEncoder encoder, ISystemClock clock) 66/// <param name="logger">The <see cref="ILoggerFactory"/>.</param> 69public OpenIdConnectHandler(IOptionsMonitor<OpenIdConnectOptions> options, ILoggerFactory logger, HtmlEncoder htmlEncoder, UrlEncoder encoder)
Microsoft.AspNetCore.Authentication.Test (2)
DynamicSchemeTests.cs (1)
111public TestHandler(IOptionsMonitor<TestOptions> options, ILoggerFactory logger, UrlEncoder encoder) : base(options, logger, encoder)
TestHandlers.cs (1)
14public TestAuthHandler(IOptionsMonitor<AuthenticationSchemeOptions> options, ILoggerFactory logger, UrlEncoder encoder) : base(options, logger, encoder)
Microsoft.AspNetCore.Authentication.Twitter (2)
TwitterHandler.cs (2)
42public TwitterHandler(IOptionsMonitor<TwitterOptions> options, ILoggerFactory logger, UrlEncoder encoder, ISystemClock clock) 50public TwitterHandler(IOptionsMonitor<TwitterOptions> options, ILoggerFactory logger, UrlEncoder encoder)
Microsoft.AspNetCore.Authentication.WsFederation (2)
WsFederationHandler.cs (2)
31public WsFederationHandler(IOptionsMonitor<WsFederationOptions> options, ILoggerFactory logger, UrlEncoder encoder, ISystemClock clock) 42public WsFederationHandler(IOptionsMonitor<WsFederationOptions> options, ILoggerFactory logger, UrlEncoder encoder)
Microsoft.AspNetCore.BrowserTesting (5)
BrowserManager.cs (3)
31private readonly ILoggerFactory _loggerFactory; 33private BrowserManager(BrowserManagerConfiguration configuration, ILoggerFactory loggerFactory) 43public static async Task<BrowserManager> CreateAsync(BrowserManagerConfiguration configuration, ILoggerFactory loggerFactory)
ContextInformation.cs (2)
14private readonly ILoggerFactory _factory; 17public ContextInformation(ILoggerFactory factory)
Microsoft.AspNetCore.Components (7)
RenderTree\Renderer.cs (4)
67/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 68public Renderer(IServiceProvider serviceProvider, ILoggerFactory loggerFactory) 78/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 80public Renderer(IServiceProvider serviceProvider, ILoggerFactory loggerFactory, IComponentActivator componentActivator)
Routing\Router.cs (1)
48[Inject] private ILoggerFactory LoggerFactory { get; set; }
Routing\RouteTableFactory.cs (1)
124serviceProvider.GetRequiredService<ILoggerFactory>(),
src\Http\Routing\src\Tree\TreeRouteBuilder.cs (1)
47ILoggerFactory loggerFactory,
Microsoft.AspNetCore.Components.Endpoints (5)
DependencyInjection\DefaultRazorComponentsServiceOptionsConfiguration.cs (1)
16ILoggerFactory loggerFactory,
FormMapping\Factories\ComplexTypeConverterFactory.cs (1)
12internal class ComplexTypeConverterFactory(FormDataMapperOptions options, ILoggerFactory loggerFactory) : IFormDataConverterFactory
FormMapping\FormDataMapperOptions.cs (1)
25public FormDataMapperOptions(ILoggerFactory loggerFactory)
FormMapping\Metadata\FormDataMetadataFactory.cs (1)
14internal partial class FormDataMetadataFactory(List<IFormDataConverterFactory> factories, ILoggerFactory loggerFactory)
Rendering\EndpointHtmlRenderer.cs (1)
52public EndpointHtmlRenderer(IServiceProvider serviceProvider, ILoggerFactory loggerFactory)
Microsoft.AspNetCore.Components.Endpoints.Tests (4)
EndpointHtmlRendererTest.cs (3)
665collection.TryAddSingleton<ILoggerFactory>(NullLoggerFactory.Instance); 1643public TestEndpointHtmlRenderer(IServiceProvider serviceProvider, ILoggerFactory loggerFactory) : base(serviceProvider, loggerFactory) 1672services.AddSingleton<ILoggerFactory, NullLoggerFactory>();
ImportMapTest.cs (1)
23services.AddSingleton<ILoggerFactory>(NullLoggerFactory.Instance);
Microsoft.AspNetCore.Components.Server (4)
Circuits\CircuitFactory.cs (2)
19private readonly ILoggerFactory _loggerFactory; 26ILoggerFactory loggerFactory,
Circuits\RemoteRenderer.cs (1)
42ILoggerFactory loggerFactory,
Circuits\RevalidatingServerAuthenticationStateProvider.cs (1)
24public RevalidatingServerAuthenticationStateProvider(ILoggerFactory loggerFactory)
Microsoft.AspNetCore.Components.Server.Tests (2)
Circuits\ComponentHubTest.cs (1)
192ILoggerFactory loggerFactory,
Circuits\RemoteRendererTest.cs (1)
704public TestRemoteRenderer(IServiceProvider serviceProvider, ILoggerFactory loggerFactory, CircuitOptions options, CircuitClientProxy client, IServerComponentDeserializer serverComponentDeserializer, ILogger logger)
Microsoft.AspNetCore.Components.Tests (1)
Routing\RouterTest.cs (1)
23services.AddSingleton<ILoggerFactory>(NullLoggerFactory.Instance);
Microsoft.AspNetCore.Components.Web (5)
HtmlRendering\HtmlRenderer.cs (1)
23public HtmlRenderer(IServiceProvider services, ILoggerFactory loggerFactory)
HtmlRendering\StaticHtmlRenderer.cs (2)
31/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 32public StaticHtmlRenderer(IServiceProvider serviceProvider, ILoggerFactory loggerFactory)
WebRenderer.cs (2)
29/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 34ILoggerFactory loggerFactory,
Microsoft.AspNetCore.Components.WebAssembly (4)
Hosting\WebAssemblyHost.cs (2)
151var loggerFactory = Services.GetRequiredService<ILoggerFactory>();
Rendering\WebAssemblyRenderer.cs (1)
30public WebAssemblyRenderer(IServiceProvider serviceProvider, ResourceAssetCollection resourceCollection, ILoggerFactory loggerFactory, JSComponentInterop jsComponentInterop)
Services\WebAssemblyNavigationManager.cs (1)
29public void CreateLogger(ILoggerFactory loggerFactory)
Microsoft.AspNetCore.Components.WebAssembly.Tests (1)
Hosting\WebAssemblyHostBuilderTest.cs (1)
215typeof(ILoggerFactory),
Microsoft.AspNetCore.Components.WebView (3)
PageContext.cs (2)
47var loggerFactory = ServiceProvider.GetRequiredService<ILoggerFactory>();
Services\WebViewRenderer.cs (1)
22ILoggerFactory loggerFactory,
Microsoft.AspNetCore.Components.WebView.Maui (1)
src\BlazorWebView\src\SharedSource\StaticContentHotReloadManager.cs (1)
113 [Inject] private ILoggerFactory LoggerFactory { get; set; } = default!;
Microsoft.AspNetCore.Components.WebView.WindowsForms (1)
src\BlazorWebView\src\SharedSource\StaticContentHotReloadManager.cs (1)
113 [Inject] private ILoggerFactory LoggerFactory { get; set; } = default!;
Microsoft.AspNetCore.Components.WebView.Wpf (1)
src\BlazorWebView\src\SharedSource\StaticContentHotReloadManager.cs (1)
113 [Inject] private ILoggerFactory LoggerFactory { get; set; } = default!;
Microsoft.AspNetCore.ConcurrencyLimiter (2)
ConcurrencyLimiterMiddleware.cs (2)
25/// <param name="loggerFactory">The <see cref="ILoggerFactory"/> used for logging.</param> 28public ConcurrencyLimiterMiddleware(RequestDelegate next, ILoggerFactory loggerFactory, IQueuePolicy queue, IOptions<ConcurrencyLimiterOptions> options)
Microsoft.AspNetCore.ConcurrencyLimiter.Tests (1)
src\Shared\EventSource.Testing\TestCounterListener.cs (1)
22public TestCounterListener(ILoggerFactory loggerFactory, string eventSourceName, string[] counterNames)
Microsoft.AspNetCore.CookiePolicy (2)
CookiePolicyMiddleware.cs (2)
34/// <param name="factory">The <see cref="ILoggerFactory"/>.</param> 35public CookiePolicyMiddleware(RequestDelegate next, IOptions<CookiePolicyOptions> options, ILoggerFactory factory)
Microsoft.AspNetCore.Cors (8)
Infrastructure\CorsMiddleware.cs (6)
28/// <param name="loggerFactory">An instance of <see cref="ILoggerFactory"/>.</param> 32ILoggerFactory loggerFactory) 42/// <param name="loggerFactory">An instance of <see cref="ILoggerFactory"/>.</param> 47ILoggerFactory loggerFactory, 66/// <param name="loggerFactory">An instance of <see cref="ILoggerFactory"/>.</param> 71ILoggerFactory loggerFactory)
Infrastructure\CorsService.cs (2)
26/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 27public CorsService(IOptions<CorsOptions> options, ILoggerFactory loggerFactory)
Microsoft.AspNetCore.DataProtection (60)
AuthenticatedEncryption\AuthenticatedEncryptorFactory.cs (3)
24private readonly ILoggerFactory _loggerFactory; 29/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 30public AuthenticatedEncryptorFactory(ILoggerFactory loggerFactory)
AuthenticatedEncryption\CngCbcAuthenticatedEncryptorFactory.cs (2)
29/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 30public CngCbcAuthenticatedEncryptorFactory(ILoggerFactory loggerFactory)
AuthenticatedEncryption\CngGcmAuthenticatedEncryptorFactory.cs (2)
29/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 30public CngGcmAuthenticatedEncryptorFactory(ILoggerFactory loggerFactory)
AuthenticatedEncryption\ManagedAuthenticatedEncryptorFactory.cs (2)
24/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 25public ManagedAuthenticatedEncryptorFactory(ILoggerFactory loggerFactory)
DataProtectionBuilderExtensions.cs (12)
175var loggerFactory = services.GetService<ILoggerFactory>() ?? NullLoggerFactory.Instance; 199var loggerFactory = services.GetService<ILoggerFactory>() ?? NullLoggerFactory.Instance; 222var loggerFactory = services.GetService<ILoggerFactory>() ?? NullLoggerFactory.Instance; 257var loggerFactory = services.GetService<ILoggerFactory>() ?? NullLoggerFactory.Instance; 328var loggerFactory = services.GetService<ILoggerFactory>() ?? NullLoggerFactory.Instance; 382var loggerFactory = services.GetService<ILoggerFactory>() ?? NullLoggerFactory.Instance;
DataProtectionServiceCollectionExtensions.cs (2)
87var loggerFactory = s.GetService<ILoggerFactory>() ?? NullLoggerFactory.Instance;
EphemeralDataProtectionProvider.cs (4)
41/// <param name="loggerFactory">The <see cref="ILoggerFactory" />.</param> 42public EphemeralDataProtectionProvider(ILoggerFactory loggerFactory) 78public EphemeralKeyRing(ILoggerFactory loggerFactory) 98private static IAuthenticatedEncryptor? GetDefaultEncryptor(ILoggerFactory loggerFactory)
Internal\DataProtectionHostedService.cs (1)
23public DataProtectionHostedService(IKeyRingProvider keyRingProvider, ILoggerFactory loggerFactory)
Internal\KeyManagementOptionsPostSetup.cs (3)
32private readonly ILoggerFactory? _loggerFactory; // Null iff _keyDirectoryPath is null 41public KeyManagementOptionsPostSetup(IConfiguration configuration, ILoggerFactory loggerFactory) 107public ReadOnlyFileSystemXmlRepository(DirectoryInfo directory, ILoggerFactory loggerFactory)
Internal\KeyManagementOptionsSetup.cs (3)
17private readonly ILoggerFactory _loggerFactory; 24public KeyManagementOptionsSetup(ILoggerFactory loggerFactory) 34public KeyManagementOptionsSetup(ILoggerFactory loggerFactory, IRegistryPolicyResolver? registryPolicyResolver)
KeyManagement\DefaultKeyResolver.cs (1)
60public DefaultKeyResolver(IOptions<KeyManagementOptions> keyManagementOptions, ILoggerFactory loggerFactory)
KeyManagement\KeyRingBasedDataProtectionProvider.cs (1)
16public KeyRingBasedDataProtectionProvider(IKeyRingProvider keyRingProvider, ILoggerFactory loggerFactory)
KeyManagement\KeyRingProvider.cs (1)
48ILoggerFactory loggerFactory)
KeyManagement\XmlKeyManager.cs (5)
57private readonly ILoggerFactory _loggerFactory; 81/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 83public XmlKeyManager(IOptions<KeyManagementOptions> keyManagementOptions, IActivator activator, ILoggerFactory loggerFactory) 91ILoggerFactory loggerFactory, 129ILoggerFactory loggerFactory,
LoggingServiceProviderExtensions.cs (5)
17/// This is equivalent to <see cref="LoggerFactoryExtensions.CreateLogger{T}(ILoggerFactory)"/>. 21/// <see cref="IServiceProvider"/> cannot produce an <see cref="ILoggerFactory"/>. 30/// This is equivalent to <see cref="LoggerFactoryExtensions.CreateLogger{T}(ILoggerFactory)"/>. 34/// <see cref="IServiceProvider"/> cannot produce an <see cref="ILoggerFactory"/>. 40return services?.GetService<ILoggerFactory>()?.CreateLogger(type.FullName!) ?? NullLogger.Instance;
Repositories\EphemeralXmlRepository.cs (1)
21public EphemeralXmlRepository(ILoggerFactory loggerFactory)
Repositories\FileSystemXmlRepository.cs (2)
28/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 29public FileSystemXmlRepository(DirectoryInfo directory, ILoggerFactory loggerFactory)
Repositories\RegistryXmlRepository.cs (2)
31/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 32public RegistryXmlRepository(RegistryKey registryKey, ILoggerFactory loggerFactory)
TypeForwardingActivator.cs (1)
24public TypeForwardingActivator(IServiceProvider services, ILoggerFactory loggerFactory)
XmlEncryption\CertificateXmlEncryptor.cs (3)
30public CertificateXmlEncryptor(string thumbprint, ICertificateResolver certificateResolver, ILoggerFactory loggerFactory) 43public CertificateXmlEncryptor(X509Certificate2 certificate, ILoggerFactory loggerFactory) 51internal CertificateXmlEncryptor(ILoggerFactory loggerFactory, IInternalCertificateXmlEncryptor? encryptor)
XmlEncryption\DpapiNGXmlEncryptor.cs (2)
34/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 35public DpapiNGXmlEncryptor(string protectionDescriptorRule, DpapiNGProtectionDescriptorFlags flags, ILoggerFactory loggerFactory)
XmlEncryption\DpapiXmlEncryptor.cs (2)
32/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 33public DpapiXmlEncryptor(bool protectToLocalMachine, ILoggerFactory loggerFactory)
Microsoft.AspNetCore.DataProtection.EntityFrameworkCore (4)
EntityFrameworkCoreDataProtectionExtensions.cs (2)
29var loggerFactory = services.GetService<ILoggerFactory>() ?? NullLoggerFactory.Instance;
EntityFrameworkCoreXmlRepository.cs (2)
27/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 32public EntityFrameworkCoreXmlRepository(IServiceProvider services, ILoggerFactory loggerFactory)
Microsoft.AspNetCore.DataProtection.Tests (6)
KeyManagement\XmlKeyManagerTests.cs (1)
595private static IReadOnlyCollection<IKey> RunGetAllKeysCore(string xml, IActivator activator, ILoggerFactory loggerFactory = null)
ServiceCollectionTests.cs (5)
45services1.GetRequiredService<ILoggerFactory>().GetType(), 46services2.GetRequiredService<ILoggerFactory>().GetType()); 57Assert.Null(services.GetService<ILoggerFactory>()); 83.AddSingleton<ILoggerFactory>(NullLoggerFactory.Instance) 116.AddSingleton<ILoggerFactory>(NullLoggerFactory.Instance)
Microsoft.AspNetCore.Diagnostics (8)
DeveloperExceptionPage\DeveloperExceptionPageMiddleware.cs (2)
25/// <param name="loggerFactory">The <see cref="ILoggerFactory"/> used for logging.</param> 32ILoggerFactory loggerFactory,
DeveloperExceptionPage\DeveloperExceptionPageMiddlewareImpl.cs (1)
48ILoggerFactory loggerFactory,
ExceptionHandler\ExceptionHandlerExtensions.cs (2)
118var loggerFactory = app.ApplicationServices.GetRequiredService<ILoggerFactory>();
ExceptionHandler\ExceptionHandlerMiddleware.cs (2)
24/// <param name="loggerFactory">The <see cref="ILoggerFactory"/> used for logging.</param> 29ILoggerFactory loggerFactory,
ExceptionHandler\ExceptionHandlerMiddlewareImpl.cs (1)
35ILoggerFactory loggerFactory,
Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore (2)
DatabaseErrorPageMiddleware.cs (2)
47/// The <see cref="ILoggerFactory" /> for the application. This middleware both produces logging messages and 54ILoggerFactory loggerFactory,
Microsoft.AspNetCore.Diagnostics.Tests (1)
ExceptionHandlerTest.cs (1)
618services.AddSingleton<ILoggerFactory>(loggerFactory);
Microsoft.AspNetCore.FunctionalTests (12)
WebApplicationFunctionalTests.cs (9)
32var factory = (ILoggerFactory)app.Services.GetService(typeof(ILoggerFactory)); 75var factory = (ILoggerFactory)app.Services.GetService(typeof(ILoggerFactory)); 127var factory = (ILoggerFactory)app.Services.GetService(typeof(ILoggerFactory));
WebHostFunctionalTests.cs (3)
124var factory = (ILoggerFactory)webHost.Services.GetService(typeof(ILoggerFactory));
Microsoft.AspNetCore.Grpc.JsonTranscoding (7)
Internal\Binding\JsonTranscodingProviderServiceBinder.cs (2)
37private readonly ILoggerFactory _loggerFactory; 46ILoggerFactory loggerFactory,
Internal\Binding\JsonTranscodingServiceMethodProvider.cs (2)
20private readonly ILoggerFactory _loggerFactory; 25ILoggerFactory loggerFactory,
Internal\CallHandlers\ServerCallHandlerBase.cs (1)
27ILoggerFactory loggerFactory,
Internal\CallHandlers\ServerStreamingServerCallHandler.cs (1)
20ILoggerFactory loggerFactory,
Internal\CallHandlers\UnaryServerCallHandler.cs (1)
22ILoggerFactory loggerFactory,
Microsoft.AspNetCore.Grpc.Swagger.Tests (3)
Services\GreeterService.cs (1)
14public GreeterService(ILoggerFactory loggerFactory)
Services\XmlDocService.cs (1)
14public XmlDocService(ILoggerFactory loggerFactory)
Services\XmlDocServiceWithComments.cs (1)
17public XmlDocServiceWithComments(ILoggerFactory loggerFactory)
Microsoft.AspNetCore.Hosting (4)
GenericHost\GenericWebHostService.cs (1)
21ILoggerFactory loggerFactory,
Internal\WebHost.cs (1)
129_logger = _applicationServices.GetRequiredService<ILoggerFactory>().CreateLogger("Microsoft.AspNetCore.Hosting.Diagnostics");
WebHostBuilder.cs (1)
117/// The <see cref="IConfiguration"/> and <see cref="ILoggerFactory"/> on the <see cref="WebHostBuilderContext"/> are uninitialized at this stage.
WebHostBuilderExtensions.cs (1)
216/// The <see cref="IConfiguration"/> and <see cref="ILoggerFactory"/> on the <see cref="WebHostBuilderContext"/> are uninitialized at this stage.
Microsoft.AspNetCore.Hosting.Abstractions (1)
IWebHostBuilder.cs (1)
26/// The <see cref="IConfiguration"/> and <see cref="ILoggerFactory"/> on the <see cref="WebHostBuilderContext"/> are uninitialized at this stage.
Microsoft.AspNetCore.Hosting.FunctionalTests (3)
LinkedApplicationTests.cs (1)
15using (StartLog(out var loggerFactory))
ShutdownTests.cs (1)
40using (StartLog(out var loggerFactory))
WebHostBuilderTests.cs (1)
22using (StartLog(out var loggerFactory))
Microsoft.AspNetCore.Hosting.Tests (11)
Fakes\StartupWithILoggerFactory.cs (4)
12public ILoggerFactory ConstructorLoggerFactory { get; set; } 14public ILoggerFactory ConfigureLoggerFactory { get; set; } 16public StartupWithILoggerFactory(ILoggerFactory constructorLoggerFactory) 26public void Configure(IApplicationBuilder builder, ILoggerFactory loggerFactory)
src\Shared\EventSource.Testing\TestCounterListener.cs (1)
22public TestCounterListener(ILoggerFactory loggerFactory, string eventSourceName, string[] counterNames)
WebHostBuilderTests.cs (6)
208Assert.NotNull(host.Services.GetService<ILoggerFactory>()); 875.ConfigureServices(collection => collection.AddSingleton<ILoggerFactory>(factory)) 879var factoryFromHost = host.Services.GetService<ILoggerFactory>(); 1067var loggerFactory = app.ApplicationServices.GetService<ILoggerFactory>();
Microsoft.AspNetCore.Hosting.TestSites (1)
StartupShutdown.cs (1)
14public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory, IHostApplicationLifetime lifetime)
Microsoft.AspNetCore.Http.Connections (9)
Internal\HttpConnectionContext.cs (1)
444ILoggerFactory loggerFactory,
Internal\HttpConnectionDispatcher.cs (2)
43private readonly ILoggerFactory _loggerFactory; 53public HttpConnectionDispatcher(HttpConnectionManager manager, ILoggerFactory loggerFactory, HttpConnectionsMetrics metrics)
Internal\HttpConnectionManager.cs (1)
30public HttpConnectionManager(ILoggerFactory loggerFactory, IHostApplicationLifetime appLifetime, IOptions<ConnectionOptions> connectionOptions, HttpConnectionsMetrics metrics)
Internal\Transports\LongPollingServerTransport.cs (2)
17public LongPollingServerTransport(CancellationToken timeoutToken, PipeReader application, ILoggerFactory loggerFactory) 21public LongPollingServerTransport(CancellationToken timeoutToken, PipeReader application, ILoggerFactory loggerFactory, HttpConnectionContext? connection)
Internal\Transports\ServerSentEventsServerTransport.cs (2)
17public ServerSentEventsServerTransport(PipeReader application, string connectionId, ILoggerFactory loggerFactory) 21public ServerSentEventsServerTransport(PipeReader application, string connectionId, HttpConnectionContext? connection, ILoggerFactory loggerFactory)
Internal\Transports\WebSocketsServerTransport.cs (1)
23public WebSocketsServerTransport(WebSocketOptions options, IDuplexPipe application, HttpConnectionContext connection, ILoggerFactory loggerFactory)
Microsoft.AspNetCore.Http.Connections.Client (12)
HttpConnection.cs (4)
51private readonly ILoggerFactory _loggerFactory; 119public HttpConnection(Uri url, HttpTransportType transports, ILoggerFactory? loggerFactory) 135public HttpConnection(HttpConnectionOptions httpConnectionOptions, ILoggerFactory? loggerFactory) 168internal HttpConnection(HttpConnectionOptions httpConnectionOptions, ILoggerFactory loggerFactory, ITransportFactory transportFactory)
HttpConnectionFactory.cs (2)
21private readonly ILoggerFactory _loggerFactory; 28public HttpConnectionFactory(IOptions<HttpConnectionOptions> options, ILoggerFactory loggerFactory)
Internal\DefaultTransportFactory.cs (2)
17private readonly ILoggerFactory _loggerFactory; 20public DefaultTransportFactory(HttpTransportType requestedTransportType, ILoggerFactory loggerFactory, HttpClient? httpClient, HttpConnectionOptions httpConnectionOptions, Func<Task<string?>> accessTokenProvider)
Internal\LoggingHttpMessageHandler.cs (1)
18public LoggingHttpMessageHandler(HttpMessageHandler inner, ILoggerFactory loggerFactory) : base(inner)
Internal\LongPollingTransport.cs (1)
36public LongPollingTransport(HttpClient httpClient, HttpConnectionOptions? httpConnectionOptions = null, ILoggerFactory? loggerFactory = null)
Internal\ServerSentEventsTransport.cs (1)
37public ServerSentEventsTransport(HttpClient httpClient, HttpConnectionOptions? httpConnectionOptions = null, ILoggerFactory? loggerFactory = null)
Internal\WebSocketsTransport.cs (1)
74public WebSocketsTransport(HttpConnectionOptions httpConnectionOptions, ILoggerFactory loggerFactory, Func<Task<string?>> accessTokenProvider, HttpClient? httpClient,
Microsoft.AspNetCore.Http.Connections.Tests (8)
HttpConnectionDispatcherTests.cs (7)
3623private readonly ILoggerFactory _loggerFactory; 3625public ForwardingLoggerProvider(ILoggerFactory loggerFactory) 3641ILoggerFactory loggerFactory) 3682private static async Task CheckTransportSupported(HttpTransportType supportedTransports, HttpTransportType transportType, int status, ILoggerFactory loggerFactory) 3765private static HttpConnectionManager CreateConnectionManager(ILoggerFactory loggerFactory, HttpConnectionsMetrics metrics = null) 3770private static HttpConnectionManager CreateConnectionManager(ILoggerFactory loggerFactory, TimeSpan? disconnectTimeout, HttpConnectionsMetrics metrics = null) 3798private static HttpConnectionDispatcher CreateDispatcher(HttpConnectionManager manager, ILoggerFactory loggerFactory, HttpConnectionsMetrics metrics = null)
HttpConnectionManagerTests.cs (1)
428private static HttpConnectionManager CreateConnectionManager(ILoggerFactory loggerFactory, IHostApplicationLifetime lifetime = null, HttpConnectionsMetrics metrics = null)
Microsoft.AspNetCore.Http.Extensions (5)
RequestDelegateFactory.cs (2)
2792var loggerFactory = httpContext.RequestServices.GetRequiredService<ILoggerFactory>();
src\Components\Endpoints\src\FormMapping\Factories\ComplexTypeConverterFactory.cs (1)
12internal class ComplexTypeConverterFactory(FormDataMapperOptions options, ILoggerFactory loggerFactory) : IFormDataConverterFactory
src\Components\Endpoints\src\FormMapping\FormDataMapperOptions.cs (1)
25public FormDataMapperOptions(ILoggerFactory loggerFactory)
src\Components\Endpoints\src\FormMapping\Metadata\FormDataMetadataFactory.cs (1)
14internal partial class FormDataMetadataFactory(List<IFormDataConverterFactory> factories, ILoggerFactory loggerFactory)
Microsoft.AspNetCore.Http.Extensions.Tests (2)
ProblemDetailsDefaultWriterTest.cs (1)
696services.AddSingleton<ILoggerFactory>(NullLoggerFactory.Instance);
RequestDelegateGenerator\RequestDelegateCreationTests.KeyServices.cs (1)
259if (serviceType == typeof(Microsoft.Extensions.Logging.ILoggerFactory))
Microsoft.AspNetCore.Http.Results (78)
Accepted.cs (2)
64var loggerFactory = httpContext.RequestServices.GetRequiredService<ILoggerFactory>();
AcceptedAtRoute.cs (2)
94var loggerFactory = httpContext.RequestServices.GetRequiredService<ILoggerFactory>();
AcceptedAtRouteOfT.cs (2)
108var loggerFactory = httpContext.RequestServices.GetRequiredService<ILoggerFactory>();
AcceptedOfT.cs (2)
85var loggerFactory = httpContext.RequestServices.GetRequiredService<ILoggerFactory>();
BadRequest.cs (2)
39var loggerFactory = httpContext.RequestServices.GetRequiredService<ILoggerFactory>();
BadRequestOfT.cs (2)
50var loggerFactory = httpContext.RequestServices.GetRequiredService<ILoggerFactory>();
ChallengeHttpResult.cs (2)
75var loggerFactory = httpContext.RequestServices.GetRequiredService<ILoggerFactory>();
Conflict.cs (2)
39var loggerFactory = httpContext.RequestServices.GetRequiredService<ILoggerFactory>();
ConflictOfT.cs (2)
50var loggerFactory = httpContext.RequestServices.GetRequiredService<ILoggerFactory>();
ContentHttpResult.cs (2)
63var loggerFactory = httpContext.RequestServices.GetRequiredService<ILoggerFactory>();
Created.cs (2)
64var loggerFactory = httpContext.RequestServices.GetRequiredService<ILoggerFactory>();
CreatedAtRoute.cs (2)
94var loggerFactory = httpContext.RequestServices.GetRequiredService<ILoggerFactory>();
CreatedAtRouteOfT.cs (2)
108var loggerFactory = httpContext.RequestServices.GetRequiredService<ILoggerFactory>();
CreatedOfT.cs (2)
84var loggerFactory = httpContext.RequestServices.GetRequiredService<ILoggerFactory>();
FileContentHttpResult.cs (2)
112var loggerFactory = httpContext.RequestServices.GetRequiredService<ILoggerFactory>();
FileStreamHttpResult.cs (2)
118var loggerFactory = httpContext.RequestServices.GetRequiredService<ILoggerFactory>();
ForbidHttpResult.cs (2)
86var loggerFactory = httpContext.RequestServices.GetRequiredService<ILoggerFactory>();
InternalServerError.cs (2)
39var loggerFactory = httpContext.RequestServices.GetRequiredService<ILoggerFactory>();
InternalServerErrorOfT.cs (2)
50var loggerFactory = httpContext.RequestServices.GetRequiredService<ILoggerFactory>();
JsonHttpResultOfT.cs (2)
94var loggerFactory = httpContext.RequestServices.GetRequiredService<ILoggerFactory>();
NoContent.cs (2)
38var loggerFactory = httpContext.RequestServices.GetRequiredService<ILoggerFactory>();
NotFound.cs (2)
38var loggerFactory = httpContext.RequestServices.GetRequiredService<ILoggerFactory>();
NotFoundOfT.cs (2)
49var loggerFactory = httpContext.RequestServices.GetRequiredService<ILoggerFactory>();
Ok.cs (2)
38var loggerFactory = httpContext.RequestServices.GetRequiredService<ILoggerFactory>();
OkOfT.cs (2)
49var loggerFactory = httpContext.RequestServices.GetRequiredService<ILoggerFactory>();
PhysicalFileHttpResult.cs (2)
122var loggerFactory = httpContext.RequestServices.GetRequiredService<ILoggerFactory>();
ProblemHttpResult.cs (2)
53var loggerFactory = httpContext.RequestServices.GetRequiredService<ILoggerFactory>();
PushStreamHttpResult.cs (2)
106var loggerFactory = httpContext.RequestServices.GetRequiredService<ILoggerFactory>();
RedirectHttpResult.cs (2)
94var loggerFactory = httpContext.RequestServices.GetRequiredService<ILoggerFactory>();
RedirectToRouteHttpResult.cs (2)
175var loggerFactory = httpContext.RequestServices.GetRequiredService<ILoggerFactory>();
SignInHttpResult.cs (2)
61var loggerFactory = httpContext.RequestServices.GetRequiredService<ILoggerFactory>();
SignOutHttpResult.cs (2)
75var loggerFactory = httpContext.RequestServices.GetRequiredService<ILoggerFactory>();
StatusCodeHttpResult.cs (2)
42var loggerFactory = httpContext.RequestServices.GetRequiredService<ILoggerFactory>();
UnauthorizedHttpResult.cs (2)
35var loggerFactory = httpContext.RequestServices.GetRequiredService<ILoggerFactory>();
UnprocessableEntity.cs (2)
39var loggerFactory = httpContext.RequestServices.GetRequiredService<ILoggerFactory>();
UnprocessableEntityOfT.cs (2)
50var loggerFactory = httpContext.RequestServices.GetRequiredService<ILoggerFactory>();
Utf8ContentHttpResult.cs (2)
58var loggerFactory = httpContext.RequestServices.GetRequiredService<ILoggerFactory>();
ValidationProblem.cs (2)
56var loggerFactory = httpContext.RequestServices.GetRequiredService<ILoggerFactory>();
VirtualFileHttpResult.cs (2)
117var loggerFactory = httpContext.RequestServices.GetRequiredService<ILoggerFactory>();
Microsoft.AspNetCore.Http.Results.Tests (38)
BadRequestOfTResultTests.cs (1)
182services.AddSingleton<ILoggerFactory, NullLoggerFactory>();
BadRequestResultTests.cs (1)
95services.AddSingleton<ILoggerFactory, NullLoggerFactory>();
ChallengeResultTests.cs (1)
68services.AddSingleton<ILoggerFactory>(NullLoggerFactory.Instance);
ConflictOfTResultTests.cs (1)
160services.AddSingleton<ILoggerFactory, NullLoggerFactory>();
ConflictResultTests.cs (1)
96services.AddSingleton<ILoggerFactory, NullLoggerFactory>();
ContentResultTests.cs (1)
174services.AddSingleton<ILoggerFactory>(NullLoggerFactory.Instance);
CreatedAtRouteOfTResultTests.cs (1)
191services.AddSingleton<ILoggerFactory, NullLoggerFactory>();
CreatedAtRouteResultTests.cs (1)
137services.AddSingleton<ILoggerFactory, NullLoggerFactory>();
CreatedOfTResultTests.cs (1)
188services.AddSingleton<ILoggerFactory, NullLoggerFactory>();
CreatedResultTests.cs (1)
125services.AddSingleton<ILoggerFactory, NullLoggerFactory>();
FileContentResultTests.cs (1)
31.AddSingleton<ILoggerFactory, NullLoggerFactory>()
ForbidResultTests.cs (1)
135services.AddSingleton<ILoggerFactory>(NullLoggerFactory.Instance);
HttpResultsHelperTests.cs (1)
245services.AddSingleton<ILoggerFactory, NullLoggerFactory>();
InternalServerErrorOfTResultTests.cs (1)
182services.AddSingleton<ILoggerFactory, NullLoggerFactory>();
InternalServerErrorResultTests.cs (1)
95services.AddSingleton<ILoggerFactory, NullLoggerFactory>();
JsonResultTests.cs (1)
316services.AddSingleton<ILoggerFactory>(NullLoggerFactory.Instance);
LocalRedirectResultTests.cs (1)
124serviceCollection.AddSingleton<ILoggerFactory>(NullLoggerFactory.Instance);
NoContentResultTests.cs (1)
92services.AddSingleton<ILoggerFactory>(NullLoggerFactory.Instance);
NotFoundOfTResultTests.cs (1)
151services.AddSingleton<ILoggerFactory, NullLoggerFactory>();
NotFoundResultTests.cs (1)
100services.AddSingleton<ILoggerFactory, NullLoggerFactory>();
OkOfTResultTests.cs (1)
159services.AddSingleton<ILoggerFactory, NullLoggerFactory>();
OkResultTests.cs (1)
94services.AddSingleton<ILoggerFactory, NullLoggerFactory>();
ProblemResultTests.cs (1)
254services.AddSingleton<ILoggerFactory>(NullLoggerFactory.Instance);
RedirectToRouteResultTests.cs (1)
114services.AddSingleton<ILoggerFactory>(NullLoggerFactory.Instance);
ResultsOfTTests.cs (1)
56services.AddSingleton<ILoggerFactory>(NullLoggerFactory.Instance);
SignInResultTests.cs (1)
100services.AddSingleton<ILoggerFactory>(NullLoggerFactory.Instance);
SignOutResultTests.cs (1)
99services.AddSingleton<ILoggerFactory>(NullLoggerFactory.Instance);
src\Shared\ResultsTests\FileContentResultTestBase.cs (1)
356services.AddSingleton<ILoggerFactory>(NullLoggerFactory.Instance);
src\Shared\ResultsTests\FileStreamResultTestBase.cs (1)
445services.AddSingleton<ILoggerFactory>(NullLoggerFactory.Instance);
src\Shared\ResultsTests\PhysicalFileResultTestBase.cs (1)
461services.AddSingleton<ILoggerFactory>(NullLoggerFactory.Instance);
src\Shared\ResultsTests\RedirectResultTestBase.cs (1)
64serviceCollection.AddTransient<ILoggerFactory, NullLoggerFactory>();
src\Shared\ResultsTests\VirtualFileResultTestBase.cs (1)
492services.AddSingleton<ILoggerFactory>(NullLoggerFactory.Instance);
StatusCodeResultTests.cs (1)
49services.AddSingleton<ILoggerFactory>(NullLoggerFactory.Instance);
UnauthorizedResultTests.cs (1)
59services.AddSingleton<ILoggerFactory>(NullLoggerFactory.Instance);
UnprocessableEntityOfTResultTests.cs (1)
159services.AddSingleton<ILoggerFactory, NullLoggerFactory>();
UnprocessableEntityResultTests.cs (1)
95services.AddSingleton<ILoggerFactory, NullLoggerFactory>();
Utf8ContentResultTests.cs (1)
92services.AddSingleton<ILoggerFactory>(NullLoggerFactory.Instance);
ValidationProblemResultTests.cs (1)
180services.AddSingleton<ILoggerFactory>(NullLoggerFactory.Instance);
Microsoft.AspNetCore.Http.Tests (1)
ResponseCookiesTest.cs (1)
34services.AddSingleton<ILoggerFactory>(loggerFactory);
Microsoft.AspNetCore.HttpLogging (2)
FileLoggerProcessor.cs (1)
40public FileLoggerProcessor(IOptionsMonitor<W3CLoggerOptions> options, IHostEnvironment environment, ILoggerFactory factory)
W3CLoggerProcessor.cs (1)
19public W3CLoggerProcessor(IOptionsMonitor<W3CLoggerOptions> options, IHostEnvironment environment, ILoggerFactory factory) : base(options, environment, factory)
Microsoft.AspNetCore.HttpLogging.Tests (1)
TestW3CLoggerProcessor.cs (1)
18public TestW3CLoggerProcessor(IOptionsMonitor<W3CLoggerOptions> options, IHostEnvironment environment, ILoggerFactory factory) : base(options, environment, factory)
Microsoft.AspNetCore.HttpOverrides (3)
CertificateForwardingMiddleware.cs (1)
29ILoggerFactory loggerFactory,
ForwardedHeadersMiddleware.cs (2)
44/// <param name="loggerFactory">The <see cref="ILoggerFactory"/> used for logging.</param> 46public ForwardedHeadersMiddleware(RequestDelegate next, ILoggerFactory loggerFactory, IOptions<ForwardedHeadersOptions> options)
Microsoft.AspNetCore.HttpsPolicy (3)
HstsMiddleware.cs (1)
33public HstsMiddleware(RequestDelegate next, IOptions<HstsOptions> options, ILoggerFactory loggerFactory)
HttpsRedirectionMiddleware.cs (2)
36public HttpsRedirectionMiddleware(RequestDelegate next, IOptions<HttpsRedirectionOptions> options, IConfiguration config, ILoggerFactory loggerFactory) 66public HttpsRedirectionMiddleware(RequestDelegate next, IOptions<HttpsRedirectionOptions> options, IConfiguration config, ILoggerFactory loggerFactory,
Microsoft.AspNetCore.HttpsPolicy.Tests (12)
HstsMiddlewareTests.cs (5)
186services.AddSingleton<ILoggerFactory>(loggerFactory); 236services.AddSingleton<ILoggerFactory>(loggerFactory); 291services.AddSingleton<ILoggerFactory>(loggerFactory); 343services.AddSingleton<ILoggerFactory>(loggerFactory); 390services.AddSingleton<ILoggerFactory>(loggerFactory);
HttpsRedirectionMiddlewareTests.cs (7)
34services.AddSingleton<ILoggerFactory>(loggerFactory); 84services.AddSingleton<ILoggerFactory>(loggerFactory); 140services.AddSingleton<ILoggerFactory>(loggerFactory); 245services.AddSingleton<ILoggerFactory>(loggerFactory); 331services.AddSingleton<ILoggerFactory>(loggerFactory); 384services.AddSingleton<ILoggerFactory>(loggerFactory); 426services.AddSingleton<ILoggerFactory>(loggerFactory);
Microsoft.AspNetCore.Identity (5)
IdentityServiceCollectionExtensions.cs (1)
189private sealed class CompositeIdentityHandler(IOptionsMonitor<AuthenticationSchemeOptions> options, ILoggerFactory logger, UrlEncoder encoder)
SecurityStampValidator.cs (2)
27public SecurityStampValidator(IOptions<SecurityStampValidatorOptions> options, SignInManager<TUser> signInManager, ISystemClock clock, ILoggerFactory logger) 44public SecurityStampValidator(IOptions<SecurityStampValidatorOptions> options, SignInManager<TUser> signInManager, ILoggerFactory logger)
TwoFactorSecurityStampValidator.cs (2)
26public TwoFactorSecurityStampValidator(IOptions<SecurityStampValidatorOptions> options, SignInManager<TUser> signInManager, ISystemClock clock, ILoggerFactory logger) : base(options, signInManager, clock, logger) 35public TwoFactorSecurityStampValidator(IOptions<SecurityStampValidatorOptions> options, SignInManager<TUser> signInManager, ILoggerFactory logger) : base(options, signInManager, logger)
Microsoft.AspNetCore.InternalTesting (22)
AssemblyTestLog.cs (12)
32private readonly ILoggerFactory _globalLoggerFactory; 46private AssemblyTestLog(ILoggerFactory globalLoggerFactory, ILogger globalLogger, string baseDirectory, Assembly assembly, IServiceProvider serviceProvider) 59public IDisposable StartTestLog(ITestOutputHelper output, string className, out ILoggerFactory loggerFactory, [CallerMemberName] string testName = null) => 63public IDisposable StartTestLog(ITestOutputHelper output, string className, out ILoggerFactory loggerFactory, LogLevel minLogLevel, [CallerMemberName] string testName = null) => 66internal IDisposable StartTestLog(ITestOutputHelper output, string className, out ILoggerFactory loggerFactory, LogLevel minLogLevel, out string resolvedTestName, out string logOutputDirectory, [CallerMemberName] string testName = null) 70var factory = serviceProvider.GetRequiredService<ILoggerFactory>(); 93public ILoggerFactory CreateLoggerFactory(ITestOutputHelper output, string className, [CallerMemberName] string testName = null, DateTimeOffset? logStart = null) 97public ILoggerFactory CreateLoggerFactory(ITestOutputHelper output, string className, LogLevel minLogLevel, [CallerMemberName] string testName = null, DateTimeOffset? logStart = null) 98=> CreateLoggerServices(output, className, minLogLevel, out var _, out var _, testName, logStart).GetRequiredService<ILoggerFactory>(); 210var loggerFactory = serviceProvider.GetRequiredService<ILoggerFactory>();
LoggedTest\LoggedTestBase.cs (4)
41public ILoggerFactory LoggerFactory { get; set; } 49public IDisposable StartLog(out ILoggerFactory loggerFactory, [CallerMemberName] string testName = null) => StartLog(out loggerFactory, LogLevel.Debug, testName); 53public IDisposable StartLog(out ILoggerFactory loggerFactory, LogLevel minLogLevel, [CallerMemberName] string testName = null) 77out var loggerFactory,
Logging\XunitLoggerFactoryExtensions.cs (6)
31public static ILoggerFactory AddXunit(this ILoggerFactory loggerFactory, ITestOutputHelper output) 37public static ILoggerFactory AddXunit(this ILoggerFactory loggerFactory, ITestOutputHelper output, LogLevel minLevel) 43public static ILoggerFactory AddXunit(this ILoggerFactory loggerFactory, ITestOutputHelper output, LogLevel minLevel, DateTimeOffset? logStart)
Microsoft.AspNetCore.InternalTesting.Tests (15)
AssemblyTestLogTests.cs (8)
58loggerFactory: out var testLoggerFactory, 79using (assemblyLog.StartTestLog(output, "NonExistant.Test.Class", out var loggerFactory)) 110loggerFactory: out var testLoggerFactory, 136loggerFactory: out var testLoggerFactory, 206loggerFactory: out var testLoggerFactory, 252loggerFactory: out var testLoggerFactory, 287loggerFactory: out var testLoggerFactory, 331loggerFactory: out var testLoggerFactory,
LoggedTestXunitTests.cs (1)
114Assert.Same(loggerFactory, serviceCollection.BuildServiceProvider().GetRequiredService<ILoggerFactory>());
XunitLoggerProviderTest.cs (6)
18var loggerFactory = CreateTestLogger(builder => builder 37var loggerFactory = CreateTestLogger(builder => builder 51var loggerFactory = CreateTestLogger(builder => builder 70var loggerFactory = CreateTestLogger(builder => builder 86private static ILoggerFactory CreateTestLogger(Action<ILoggingBuilder> configure) 91.GetRequiredService<ILoggerFactory>();
Microsoft.AspNetCore.Localization (2)
RequestLocalizationMiddleware.cs (2)
32/// <param name="loggerFactory">The <see cref="ILoggerFactory"/> used for logging.</param> 33public RequestLocalizationMiddleware(RequestDelegate next, IOptions<RequestLocalizationOptions> options, ILoggerFactory loggerFactory)
Microsoft.AspNetCore.Localization.Tests (2)
CookieRequestCultureProviderTest.cs (2)
204services.AddSingleton(typeof(ILoggerFactory), loggerFactory); 264services.AddSingleton(typeof(ILoggerFactory), loggerFactory);
Microsoft.AspNetCore.Mvc.ApiExplorer (3)
ApiDescriptionGroupCollectionProvider.cs (1)
39ILoggerFactory loggerFactory) : this(actionDescriptorCollectionProvider, apiDescriptionProviders)
DependencyInjection\EndpointMethodInfoApiExplorerServiceCollectionExtensions.cs (1)
28sp.GetRequiredService<ILoggerFactory>()));
DependencyInjection\MvcApiExplorerMvcCoreBuilderExtensions.cs (1)
38sp.GetRequiredService<ILoggerFactory>()));
Microsoft.AspNetCore.Mvc.Core (140)
ChallengeResult.cs (2)
96var loggerFactory = httpContext.RequestServices.GetRequiredService<ILoggerFactory>();
Filters\DisableRequestSizeLimitFilter.cs (1)
20public DisableRequestSizeLimitFilter(ILoggerFactory loggerFactory)
Filters\OutputCacheFilter.cs (2)
20/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 21public OutputCacheFilter(ILoggerFactory loggerFactory)
Filters\RequestFormLimitsFilter.cs (1)
16public RequestFormLimitsFilter(ILoggerFactory loggerFactory)
Filters\RequestSizeLimitFilter.cs (1)
21public RequestSizeLimitFilter(ILoggerFactory loggerFactory)
Filters\ResponseCacheFilter.cs (2)
21/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 22public ResponseCacheFilter(CacheProfile cacheProfile, ILoggerFactory loggerFactory)
ForbidResult.cs (2)
97var loggerFactory = httpContext.RequestServices.GetRequiredService<ILoggerFactory>();
Formatters\FormatFilter.cs (2)
26/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 27public FormatFilter(IOptions<MvcOptions> options, ILoggerFactory loggerFactory)
Infrastructure\ActionSelector.cs (2)
34/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 38ILoggerFactory loggerFactory)
Infrastructure\ConfigureCompatibilityOptions.cs (2)
26/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 29ILoggerFactory loggerFactory,
Infrastructure\ControllerActionInvokerProvider.cs (2)
31ILoggerFactory loggerFactory, 41ILoggerFactory loggerFactory,
Infrastructure\DefaultOutputFormatterSelector.cs (1)
37public DefaultOutputFormatterSelector(IOptions<MvcOptions> options, ILoggerFactory loggerFactory)
Infrastructure\FileContentResultExecutor.cs (1)
20public FileContentResultExecutor(ILoggerFactory loggerFactory)
Infrastructure\FileResultExecutorBase.cs (2)
77/// <param name="factory">The <see cref="ILoggerFactory"/>.</param> 79protected static ILogger CreateLogger<T>(ILoggerFactory factory)
Infrastructure\FileStreamResultExecutor.cs (1)
20public FileStreamResultExecutor(ILoggerFactory loggerFactory)
Infrastructure\LocalRedirectResultExecutor.cs (1)
26public LocalRedirectResultExecutor(ILoggerFactory loggerFactory, IUrlHelperFactory urlHelperFactory)
Infrastructure\ModelStateInvalidFilterFactory.cs (2)
22var loggerFactory = serviceProvider.GetRequiredService<ILoggerFactory>();
Infrastructure\MvcCoreMvcOptionsSetup.cs (2)
26private readonly ILoggerFactory _loggerFactory; 34public MvcCoreMvcOptionsSetup(IHttpRequestStreamReaderFactory readerFactory, ILoggerFactory loggerFactory, IOptions<JsonOptions> jsonOptions)
Infrastructure\ObjectResultExecutor.cs (2)
25/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 30ILoggerFactory loggerFactory,
Infrastructure\PhysicalFileResultExecutor.cs (1)
20public PhysicalFileResultExecutor(ILoggerFactory loggerFactory)
Infrastructure\RedirectResultExecutor.cs (1)
23public RedirectResultExecutor(ILoggerFactory loggerFactory, IUrlHelperFactory urlHelperFactory)
Infrastructure\RedirectToActionResultExecutor.cs (1)
24public RedirectToActionResultExecutor(ILoggerFactory loggerFactory, IUrlHelperFactory urlHelperFactory)
Infrastructure\RedirectToPageResultExecutor.cs (1)
24public RedirectToPageResultExecutor(ILoggerFactory loggerFactory, IUrlHelperFactory urlHelperFactory)
Infrastructure\RedirectToRouteResultExecutor.cs (1)
24public RedirectToRouteResultExecutor(ILoggerFactory loggerFactory, IUrlHelperFactory urlHelperFactory)
Infrastructure\VirtualFileResultExecutor.cs (1)
25public VirtualFileResultExecutor(ILoggerFactory loggerFactory, IWebHostEnvironment hostingEnvironment)
ModelBinding\Binders\ArrayModelBinder.cs (6)
24/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 25public ArrayModelBinder(IModelBinder elementBinder, ILoggerFactory loggerFactory) 36/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 49ILoggerFactory loggerFactory, 61/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 78ILoggerFactory loggerFactory,
ModelBinding\Binders\ArrayModelBinderProvider.cs (2)
28var loggerFactory = context.Services.GetRequiredService<ILoggerFactory>();
ModelBinding\Binders\BodyModelBinder.cs (4)
48/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 52ILoggerFactory? loggerFactory) 65/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 70ILoggerFactory? loggerFactory,
ModelBinding\Binders\BodyModelBinderProvider.cs (5)
21private readonly ILoggerFactory _loggerFactory; 39/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 40public BodyModelBinderProvider(IList<IInputFormatter> formatters, IHttpRequestStreamReaderFactory readerFactory, ILoggerFactory loggerFactory) 50/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 55ILoggerFactory loggerFactory,
ModelBinding\Binders\ByteArrayModelBinder.cs (2)
20/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 21public ByteArrayModelBinder(ILoggerFactory loggerFactory)
ModelBinding\Binders\ByteArrayModelBinderProvider.cs (2)
23var loggerFactory = context.Services.GetRequiredService<ILoggerFactory>();
ModelBinding\Binders\CollectionModelBinder.cs (6)
34/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 35public CollectionModelBinder(IModelBinder elementBinder, ILoggerFactory loggerFactory) 46/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 54ILoggerFactory loggerFactory, 71/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 81ILoggerFactory loggerFactory,
ModelBinding\Binders\CollectionModelBinderProvider.cs (2)
60var loggerFactory = context.Services.GetRequiredService<ILoggerFactory>();
ModelBinding\Binders\ComplexObjectModelBinderProvider.cs (2)
24var loggerFactory = context.Services.GetRequiredService<ILoggerFactory>();
ModelBinding\Binders\ComplexTypeModelBinder.cs (4)
44/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 47ILoggerFactory loggerFactory) 58/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 67ILoggerFactory loggerFactory,
ModelBinding\Binders\ComplexTypeModelBinderProvider.cs (2)
31var loggerFactory = context.Services.GetRequiredService<ILoggerFactory>();
ModelBinding\Binders\DateTimeModelBinder.cs (2)
23/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 24public DateTimeModelBinder(DateTimeStyles supportedStyles, ILoggerFactory loggerFactory)
ModelBinding\Binders\DateTimeModelBinderProvider.cs (2)
27var loggerFactory = context.Services.GetRequiredService<ILoggerFactory>();
ModelBinding\Binders\DecimalModelBinder.cs (2)
25/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 26public DecimalModelBinder(NumberStyles supportedStyles, ILoggerFactory loggerFactory)
ModelBinding\Binders\DictionaryModelBinder.cs (6)
27/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 28public DictionaryModelBinder(IModelBinder keyBinder, IModelBinder valueBinder, ILoggerFactory loggerFactory) 41/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 57ILoggerFactory loggerFactory, 75/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 95ILoggerFactory loggerFactory,
ModelBinding\Binders\DictionaryModelBinderProvider.cs (2)
35var loggerFactory = context.Services.GetRequiredService<ILoggerFactory>();
ModelBinding\Binders\DoubleModelBinder.cs (2)
25/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 26public DoubleModelBinder(NumberStyles supportedStyles, ILoggerFactory loggerFactory)
ModelBinding\Binders\EnumTypeModelBinder.cs (2)
23/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>,</param> 30ILoggerFactory loggerFactory)
ModelBinding\Binders\EnumTypeModelBinderProvider.cs (2)
32var loggerFactory = context.Services.GetRequiredService<ILoggerFactory>();
ModelBinding\Binders\FloatingPointTypeModelBinderProvider.cs (2)
28var loggerFactory = context.Services.GetRequiredService<ILoggerFactory>();
ModelBinding\Binders\FloatModelBinder.cs (2)
25/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 26public FloatModelBinder(NumberStyles supportedStyles, ILoggerFactory loggerFactory)
ModelBinding\Binders\FormCollectionModelBinder.cs (2)
24/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 25public FormCollectionModelBinder(ILoggerFactory loggerFactory)
ModelBinding\Binders\FormCollectionModelBinderProvider.cs (2)
36var loggerFactory = context.Services.GetRequiredService<ILoggerFactory>();
ModelBinding\Binders\FormFileModelBinder.cs (2)
25/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 26public FormFileModelBinder(ILoggerFactory loggerFactory)
ModelBinding\Binders\FormFileModelBinderProvider.cs (2)
29var loggerFactory = context.Services.GetRequiredService<ILoggerFactory>();
ModelBinding\Binders\HeaderModelBinder.cs (4)
24/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 25public HeaderModelBinder(ILoggerFactory loggerFactory) 33/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 36public HeaderModelBinder(ILoggerFactory loggerFactory, IModelBinder innerModelBinder)
ModelBinding\Binders\HeaderModelBinderProvider.cs (2)
29var loggerFactory = context.Services.GetRequiredService<ILoggerFactory>();
ModelBinding\Binders\KeyValuePairModelBinder.cs (2)
26/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 27public KeyValuePairModelBinder(IModelBinder keyBinder, IModelBinder valueBinder, ILoggerFactory loggerFactory)
ModelBinding\Binders\KeyValuePairModelBinderProvider.cs (2)
34var loggerFactory = context.Services.GetRequiredService<ILoggerFactory>();
ModelBinding\Binders\SimpleTypeModelBinder.cs (2)
24/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 25public SimpleTypeModelBinder(Type type, ILoggerFactory loggerFactory)
ModelBinding\Binders\SimpleTypeModelBinderProvider.cs (2)
23var loggerFactory = context.Services.GetRequiredService<ILoggerFactory>();
ModelBinding\Binders\TryParseModelBinder.cs (2)
32/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 33public TryParseModelBinder(Type modelType, ILoggerFactory loggerFactory)
ModelBinding\Binders\TryParseModelBinderProvider.cs (2)
21var loggerFactory = context.Services.GetRequiredService<ILoggerFactory>();
ModelBinding\ModelBinderFactory.cs (2)
45var loggerFactory = serviceProvider.GetRequiredService<ILoggerFactory>();
ModelBinding\ParameterBinder.cs (2)
28/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 35ILoggerFactory loggerFactory)
ResponseCacheAttribute.cs (2)
122var loggerFactory = serviceProvider.GetRequiredService<ILoggerFactory>();
Routing\ControllerRequestDelegateFactory.cs (2)
33ILoggerFactory loggerFactory, 43ILoggerFactory loggerFactory,
Routing\MvcAttributeRouteHandler.cs (1)
24ILoggerFactory loggerFactory)
Routing\MvcRouteHandler.cs (1)
23ILoggerFactory loggerFactory)
SignInResult.cs (2)
83var loggerFactory = httpContext.RequestServices.GetRequiredService<ILoggerFactory>();
SignOutResult.cs (2)
113var loggerFactory = httpContext.RequestServices.GetRequiredService<ILoggerFactory>();
StatusCodeResult.cs (2)
39var factory = httpContext.RequestServices.GetRequiredService<ILoggerFactory>();
Microsoft.AspNetCore.Mvc.Core.Test (54)
ChallengeResultTest.cs (1)
71services.AddSingleton<ILoggerFactory>(NullLoggerFactory.Instance);
ContentResultTest.cs (1)
270services.AddSingleton<ILoggerFactory>(NullLoggerFactory.Instance);
ControllerBaseTest.cs (1)
3198services.AddSingleton<ILoggerFactory>(NullLoggerFactory.Instance);
Controllers\ControllerBinderDelegateProviderTest.cs (1)
1252services.AddSingleton<ILoggerFactory>(NullLoggerFactory.Instance);
FileContentResultTest.cs (1)
34.AddSingleton<ILoggerFactory>(NullLoggerFactory.Instance)
FileResultHelperTest.cs (3)
79.AddSingleton<ILoggerFactory>(NullLoggerFactory.Instance) 464services.AddSingleton<ILoggerFactory>(NullLoggerFactory.Instance); 506public EmptyFileResultExecutor(ILoggerFactory loggerFactory)
FileStreamResultTest.cs (1)
25.AddSingleton<ILoggerFactory, NullLoggerFactory>()
Filters\MiddlewareFilterTest.cs (1)
336services.AddSingleton<ILoggerFactory>(NullLoggerFactory.Instance);
ForbidResultTest.cs (1)
142.AddSingleton<ILoggerFactory>(NullLoggerFactory.Instance)
HttpActionResultTests.cs (1)
54services.AddSingleton<ILoggerFactory>(NullLoggerFactory.Instance);
HttpOkResultTest.cs (1)
45services.AddSingleton<ILoggerFactory>(NullLoggerFactory.Instance);
HttpStatusCodeResultTests.cs (1)
51services.AddSingleton<ILoggerFactory>(NullLoggerFactory.Instance);
Infrastructure\ActionSelectorTest.cs (1)
1063private static ActionSelector CreateSelector(IReadOnlyList<ActionDescriptor> actions, ILoggerFactory loggerFactory = null)
Infrastructure\ConfigureCompatibilityOptionsTest.cs (1)
110ILoggerFactory loggerFactory,
Infrastructure\ControllerActionInvokerTest.cs (2)
1406context.Setup(c => c.RequestServices.GetService(typeof(ILoggerFactory))) 1708services.AddSingleton<ILoggerFactory>(NullLoggerFactory.Instance);
Infrastructure\DefaultApiProblemDetailsWriterTest.cs (1)
219services.AddSingleton<ILoggerFactory>(NullLoggerFactory.Instance);
Infrastructure\JsonResultExecutorTestBase.cs (2)
476protected abstract IActionResultExecutor<JsonResult> CreateExecutor(ILoggerFactory loggerFactory); 485services.AddSingleton<ILoggerFactory>(NullLoggerFactory.Instance);
Infrastructure\ObjectResultExecutorTest.cs (1)
462services.AddSingleton<ILoggerFactory>(NullLoggerFactory.Instance);
Infrastructure\SystemTextJsonResultExecutorTest.cs (1)
13protected override IActionResultExecutor<JsonResult> CreateExecutor(ILoggerFactory loggerFactory)
LocalRedirectResultTest.cs (1)
141serviceCollection.AddTransient<ILoggerFactory, LoggerFactory>();
ModelBinding\Binders\HeaderModelBinderTests.cs (1)
342services.AddSingleton<ILoggerFactory, NullLoggerFactory>();
ModelBinding\Binders\TryParseTypeModelBinderTest.cs (1)
502private static IModelBinder CreateBinder(Type modelType, ILoggerFactory loggerFactory = null) =>
ModelBinding\DefaultModelBindingContextTest.cs (1)
158services.AddSingleton<ILoggerFactory>(NullLoggerFactory.Instance);
ModelBinding\ModelBinderFactoryTest.cs (1)
642services.AddSingleton<ILoggerFactory>(NullLoggerFactory.Instance);
ModelBinding\ModelBindingHelperTest.cs (1)
1496services.AddSingleton<ILoggerFactory>(NullLoggerFactory.Instance);
ModelBinding\ParameterBinderTest.cs (2)
707services.AddSingleton<ILoggerFactory>(NullLoggerFactory.Instance); 744ILoggerFactory loggerFactory = null)
ModelBinding\TestModelBinderProviderContext.cs (1)
100services.AddSingleton<ILoggerFactory, NullLoggerFactory>();
ObjectResultTests.cs (1)
165services.AddSingleton<ILoggerFactory>(NullLoggerFactory.Instance);
PhysicalFileResultTest.cs (2)
39public TestPhysicalFileResultExecutor(ILoggerFactory loggerFactory) 60services.AddSingleton<ILoggerFactory>(NullLoggerFactory.Instance);
RedirectResultTest.cs (1)
30serviceCollection.AddTransient<ILoggerFactory, NullLoggerFactory>();
RedirectToActionResultTest.cs (1)
152services.AddSingleton<ILoggerFactory>(NullLoggerFactory.Instance);
RedirectToPageResultTest.cs (1)
306services.AddSingleton<ILoggerFactory>(NullLoggerFactory.Instance);
RedirectToRouteResultTest.cs (1)
189services.AddSingleton<ILoggerFactory>(NullLoggerFactory.Instance);
ResponseCacheAttributeTest.cs (2)
339.Setup(s => s.GetService(typeof(ILoggerFactory))) 340.Returns(Mock.Of<ILoggerFactory>());
Routing\AttributeRouteTest.cs (3)
77.Setup(s => s.GetService(typeof(ILoggerFactory))) 767.AddSingleton<ILoggerFactory>(NullLoggerFactory.Instance) 809.AddSingleton<ILoggerFactory>(NullLoggerFactory.Instance)
Routing\AttributeRoutingTest.cs (1)
181.AddSingleton<ILoggerFactory>(NullLoggerFactory.Instance)
Routing\MvcRouteHandlerTests.cs (1)
53ILoggerFactory loggerFactory = null,
SignInResultTest.cs (1)
103.AddSingleton<ILoggerFactory>(NullLoggerFactory.Instance)
SignOutResultTest.cs (1)
168.AddSingleton<ILoggerFactory>(NullLoggerFactory.Instance)
src\Shared\ResultsTests\FileContentResultTestBase.cs (1)
356services.AddSingleton<ILoggerFactory>(NullLoggerFactory.Instance);
src\Shared\ResultsTests\FileStreamResultTestBase.cs (1)
445services.AddSingleton<ILoggerFactory>(NullLoggerFactory.Instance);
src\Shared\ResultsTests\PhysicalFileResultTestBase.cs (1)
461services.AddSingleton<ILoggerFactory>(NullLoggerFactory.Instance);
src\Shared\ResultsTests\RedirectResultTestBase.cs (1)
64serviceCollection.AddTransient<ILoggerFactory, NullLoggerFactory>();
src\Shared\ResultsTests\VirtualFileResultTestBase.cs (1)
492services.AddSingleton<ILoggerFactory>(NullLoggerFactory.Instance);
VirtualFileResultTest.cs (1)
87.AddTransient<ILoggerFactory, NullLoggerFactory>()
Microsoft.AspNetCore.Mvc.Core.TestCommon (1)
TestModelBinderFactory.cs (1)
83services.AddSingleton<ILoggerFactory, NullLoggerFactory>();
Microsoft.AspNetCore.Mvc.Cors (2)
CorsAuthorizationFilter.cs (2)
37/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 41ILoggerFactory loggerFactory)
Microsoft.AspNetCore.Mvc.Cors.Test (3)
CorsApplicationModelProviderTest.cs (1)
142new CorsAuthorizationFilter(Mock.Of<ICorsService>(), Mock.Of<ICorsPolicyProvider>(), Mock.Of<ILoggerFactory>()));
CorsAuthorizationFilterTest.cs (2)
123return new CorsAuthorizationFilter(corsService, policyProvider.Object, Mock.Of<ILoggerFactory>()) 145services.AddSingleton<ILoggerFactory>(NullLoggerFactory.Instance);
Microsoft.AspNetCore.Mvc.Formatters.Xml (14)
DependencyInjection\XmlDataContractSerializerMvcOptionsSetup.cs (3)
20private readonly ILoggerFactory _loggerFactory; 25/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 26public XmlDataContractSerializerMvcOptionsSetup(ILoggerFactory loggerFactory)
DependencyInjection\XmlSerializerMvcOptionsSetup.cs (3)
18private readonly ILoggerFactory _loggerFactory; 23/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 24public XmlSerializerMvcOptionsSetup(ILoggerFactory loggerFactory)
XmlDataContractSerializerOutputFormatter.cs (4)
44/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 45public XmlDataContractSerializerOutputFormatter(ILoggerFactory loggerFactory) 63/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 64public XmlDataContractSerializerOutputFormatter(XmlWriterSettings writerSettings, ILoggerFactory loggerFactory)
XmlSerializerOutputFormatter.cs (4)
43/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 44public XmlSerializerOutputFormatter(ILoggerFactory loggerFactory) 62/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 63public XmlSerializerOutputFormatter(XmlWriterSettings writerSettings, ILoggerFactory loggerFactory)
Microsoft.AspNetCore.Mvc.FunctionalTests (5)
Infrastructure\MvcEncodedTestFixtureOfT.cs (1)
16public MvcEncodedTestFixture(ILoggerFactory outputHelper) : base(outputHelper) { }
Infrastructure\MvcTestFixture.cs (4)
18private ILoggerFactory _loggerFactory; 20public MvcTestFixture(ILoggerFactory loggerFactory) 27ILoggerFactory loggerFactory = _loggerFactory; 40services.AddSingleton<ILoggerFactory>(loggerFactory);
Microsoft.AspNetCore.Mvc.IntegrationTests (4)
AuthorizeFilterIntegrationTest.cs (1)
182.AddSingleton<ILoggerFactory>(NullLoggerFactory.Instance)
ComplexRecordIntegrationTest.cs (1)
3028public NumberModelBinder(ILoggerFactory loggerFactory)
ComplexTypeIntegrationTestBase.cs (1)
3243public NumberModelBinder(ILoggerFactory loggerFactory)
ModelBindingTestHelper.cs (1)
197.AddSingleton<ILoggerFactory>(NullLoggerFactory.Instance)
Microsoft.AspNetCore.Mvc.Localization.Test (2)
MvcLocalizationMvcBuilderExtensionsTest.cs (1)
107builder.Services.AddSingleton<ILoggerFactory>(NullLoggerFactory.Instance);
MvcLocalizationMvcCoreBuilderExtensionsTest.cs (1)
107builder.Services.AddSingleton<ILoggerFactory>(NullLoggerFactory.Instance);
Microsoft.AspNetCore.Mvc.NewtonsoftJson (2)
DependencyInjection\NewtonsoftJsonMvcOptionsSetup.cs (2)
22private readonly ILoggerFactory _loggerFactory; 28ILoggerFactory loggerFactory,
Microsoft.AspNetCore.Mvc.NewtonsoftJson.Test (3)
NewtonsoftJsonResultExecutorTest.cs (1)
16protected override IActionResultExecutor<JsonResult> CreateExecutor(ILoggerFactory loggerFactory)
src\Mvc\Mvc.Core\test\Infrastructure\JsonResultExecutorTestBase.cs (2)
476protected abstract IActionResultExecutor<JsonResult> CreateExecutor(ILoggerFactory loggerFactory); 485services.AddSingleton<ILoggerFactory>(NullLoggerFactory.Instance);
Microsoft.AspNetCore.Mvc.Razor (8)
Compilation\DefaultViewCompilerProvider.cs (1)
16ILoggerFactory loggerFactory)
RazorViewEngine.cs (1)
54ILoggerFactory loggerFactory,
TagHelpers\BodyTagHelper.cs (2)
22/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 23public BodyTagHelper(ITagHelperComponentManager manager, ILoggerFactory loggerFactory)
TagHelpers\HeadTagHelper.cs (2)
22/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 23public HeadTagHelper(ITagHelperComponentManager manager, ILoggerFactory loggerFactory)
TagHelpers\TagHelperComponentTagHelper.cs (2)
28/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 34ILoggerFactory loggerFactory)
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation (2)
RazorProjectPageRouteModelProvider.cs (1)
24ILoggerFactory loggerFactory)
RuntimeViewCompilerProvider.cs (1)
29ILoggerFactory loggerFactory)
Microsoft.AspNetCore.Mvc.Razor.Test (2)
RazorHotReloadTest.cs (1)
80.AddSingleton<ILoggerFactory>(NullLoggerFactory.Instance)
TagHelpers\TagHelperComponentTagHelperTest.cs (1)
314ILoggerFactory loggerFactory)
Microsoft.AspNetCore.Mvc.RazorPages (7)
ApplicationModels\ResponseCacheFilterApplicationModelProvider.cs (2)
14private readonly ILoggerFactory _loggerFactory; 16public ResponseCacheFilterApplicationModelProvider(IOptions<MvcOptions> mvcOptionsAccessor, ILoggerFactory loggerFactory)
Filters\PageResponseCacheFilter.cs (2)
22/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 23public PageResponseCacheFilter(CacheProfile cacheProfile, ILoggerFactory loggerFactory)
Infrastructure\PageActionInvokerProvider.cs (1)
39ILoggerFactory loggerFactory,
Infrastructure\PageRequestDelegateFactory.cs (2)
40ILoggerFactory loggerFactory, 54ILoggerFactory loggerFactory,
Microsoft.AspNetCore.Mvc.RazorPages.Test (4)
ApplicationModels\ResponseCacheFilterApplicationModelProviderTest.cs (3)
23var provider = new ResponseCacheFilterApplicationModelProvider(options, Mock.Of<ILoggerFactory>()); 57var provider = new ResponseCacheFilterApplicationModelProvider(options, Mock.Of<ILoggerFactory>()); 104var provider = new ResponseCacheFilterApplicationModelProvider(options, Mock.Of<ILoggerFactory>());
Infrastructure\PageBinderFactoryTest.cs (1)
786services.AddSingleton<ILoggerFactory>(NullLoggerFactory.Instance);
Microsoft.AspNetCore.Mvc.TagHelpers (2)
Cache\DistributedCacheTagHelperService.cs (2)
45/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 50ILoggerFactory loggerFactory)
Microsoft.AspNetCore.Mvc.Test (1)
MvcOptionsSetupTest.cs (1)
293.AddTransient<ILoggerFactory, LoggerFactory>()
Microsoft.AspNetCore.Mvc.ViewFeatures (11)
CookieTempDataProvider.cs (2)
35/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 40ILoggerFactory loggerFactory,
Filters\AutoValidateAntiforgeryTokenAuthorizationFilter.cs (1)
13public AutoValidateAntiforgeryTokenAuthorizationFilter(IAntiforgery antiforgery, ILoggerFactory loggerFactory)
Filters\ValidateAntiforgeryTokenAuthorizationFilter.cs (1)
15public ValidateAntiforgeryTokenAuthorizationFilter(IAntiforgery antiforgery, ILoggerFactory loggerFactory)
PartialViewResultExecutor.cs (2)
33/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 41ILoggerFactory loggerFactory,
ViewComponentResultExecutor.cs (2)
39/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 46ILoggerFactory loggerFactory,
ViewComponents\DefaultViewComponentInvokerFactory.cs (1)
20ILoggerFactory loggerFactory)
ViewResultExecutor.cs (2)
33/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 41ILoggerFactory loggerFactory,
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (3)
PageRemoteAttributeTest.cs (1)
187.AddSingleton<ILoggerFactory>(new NullLoggerFactory());
RemoteAttributeTest.cs (1)
488.AddSingleton<ILoggerFactory>(new NullLoggerFactory());
ViewComponentResultTest.cs (1)
674services.AddSingleton<ILoggerFactory>(NullLoggerFactory.Instance);
Microsoft.AspNetCore.OpenApi.Tests (1)
Extensions\OpenApiEndpointRouteBuilderExtensionsTests.cs (1)
212.AddSingleton<ILoggerFactory>(NullLoggerFactory.Instance)
Microsoft.AspNetCore.OutputCaching (3)
OutputCacheMiddleware.cs (3)
35/// <param name="loggerFactory">The <see cref="ILoggerFactory"/> used for logging.</param> 41ILoggerFactory loggerFactory, 57ILoggerFactory loggerFactory,
Microsoft.AspNetCore.RequestDecompression.Tests (6)
RequestDecompressionMiddlewareTests.cs (6)
213services.AddSingleton<ILoggerFactory>(loggerFactory); 283services.AddSingleton<ILoggerFactory>(loggerFactory); 359services.AddSingleton<ILoggerFactory>(loggerFactory); 454services.AddSingleton<ILoggerFactory>(loggerFactory); 540services.AddSingleton<ILoggerFactory>(loggerFactory); 698services.AddSingleton<ILoggerFactory>(loggerFactory);
Microsoft.AspNetCore.ResponseCaching (3)
ResponseCachingMiddleware.cs (3)
37/// <param name="loggerFactory">The <see cref="ILoggerFactory"/> used for logging.</param> 42ILoggerFactory loggerFactory, 60ILoggerFactory loggerFactory,
Microsoft.AspNetCore.ResponseCaching.Tests (1)
TestUtils.cs (1)
221testSink == null ? (ILoggerFactory)NullLoggerFactory.Instance : new TestLoggerFactory(testSink, true),
Microsoft.AspNetCore.ResponseCompression.Tests (4)
ResponseCompressionMiddlewareTest.cs (4)
449services.AddSingleton<ILoggerFactory>(loggerFactory); 510services.AddSingleton<ILoggerFactory>(loggerFactory); 573services.AddSingleton<ILoggerFactory>(loggerFactory); 1251services.AddSingleton<ILoggerFactory>(loggerFactory);
Microsoft.AspNetCore.Rewrite (3)
RewriteBuilderExtensions.cs (2)
58var loggerFactory = app.ApplicationServices.GetRequiredService<ILoggerFactory>();
RewriteMiddleware.cs (1)
35ILoggerFactory loggerFactory,
Microsoft.AspNetCore.Routing (10)
DependencyInjection\RoutingServiceCollectionExtensions.cs (2)
61var loggerFactory = s.GetRequiredService<ILoggerFactory>();
Matching\DfaMatcherBuilder.cs (2)
20private readonly ILoggerFactory _loggerFactory; 37ILoggerFactory loggerFactory,
RouteBase.cs (2)
318var factory = context.RequestServices.GetRequiredService<ILoggerFactory>();
RouterMiddleware.cs (2)
23/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 27ILoggerFactory loggerFactory,
Tree\TreeRouteBuilder.cs (2)
42/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 47ILoggerFactory loggerFactory,
Microsoft.AspNetCore.Routing.Microbenchmarks (1)
Matching\MatcherBuilderMultipleEntryBenchmark.cs (1)
18private ILoggerFactory _loggerFactory;
Microsoft.AspNetCore.Routing.Tests (17)
Builder\RouteHandlerEndpointRouteBuilderExtensionsTest.cs (1)
1076public ServiceAccessingEndpointFilter(ILoggerFactory loggerFactory, EndpointFilterFactoryContext routeHandlerContext)
DefaultLinkParserTest.cs (3)
27var parser = CreateLinkParser(services => { services.AddSingleton<ILoggerFactory>(loggerFactory); }, endpoint); 49var parser = CreateLinkParser(services => { services.AddSingleton<ILoggerFactory>(loggerFactory); }, endpoint1, endpoint2); 73var parser = CreateLinkParser(services => { services.AddSingleton<ILoggerFactory>(loggerFactory); }, endpoint0, endpoint1, endpoint2);
LinkParserTestBase.cs (1)
68serviceProvider.GetRequiredService<ILoggerFactory>().CreateLogger<DefaultLinkParser>(),
Matching\DfaMatcherTest.cs (2)
27ILoggerFactory loggerFactory = null) 52serviceCollection.AddSingleton<ILoggerFactory>(loggerFactory);
RouteCollectionTest.cs (4)
590ILoggerFactory loggerFactory = null, 621services.AddSingleton<ILoggerFactory>(NullLoggerFactory.Instance); 643ILoggerFactory loggerFactory = null, 663context.Setup(m => m.RequestServices.GetService(typeof(ILoggerFactory)))
RouteTest.cs (4)
581private static RouteContext CreateRouteContext(string requestPath, ILoggerFactory factory = null) 592context.Setup(m => m.RequestServices.GetService(typeof(ILoggerFactory))) 654services.AddSingleton<ILoggerFactory>(NullLoggerFactory.Instance); 1516services.AddSingleton<ILoggerFactory>(NullLoggerFactory.Instance);
Tree\TreeRouterTest.cs (2)
1990context.Setup(m => m.RequestServices.GetService(typeof(ILoggerFactory))) 2004mockHttpContext.Setup(h => h.RequestServices.GetService(typeof(ILoggerFactory)))
Microsoft.AspNetCore.Server.HttpSys (2)
HttpSysListener.cs (1)
46public HttpSysListener(HttpSysOptions options, ILoggerFactory loggerFactory)
MessagePump.cs (1)
30public MessagePump(IOptions<HttpSysOptions> options, ILoggerFactory loggerFactory, IAuthenticationSchemeProvider authentication)
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (14)
Utilities.cs (14)
43internal static IServer CreateHttpServer(out string baseAddress, RequestDelegate app, ILoggerFactory loggerFactory) 49internal static IServer CreateHttpServer(out string baseAddress, RequestDelegate app, Action<HttpSysOptions> configureOptions, ILoggerFactory loggerFactory) 55internal static IServer CreateHttpServerReturnRoot(string path, out string root, RequestDelegate app, ILoggerFactory loggerFactory) 61internal static IServer CreateHttpAuthServer(AuthenticationSchemes authType, bool allowAnonymous, out string baseAddress, RequestDelegate app, ILoggerFactory loggerFactory) 71internal static IHost CreateDynamicHost(AuthenticationSchemes authType, bool allowAnonymous, out string root, RequestDelegate app, ILoggerFactory loggerFactory) 80internal static IHost CreateDynamicHost(out string baseAddress, Action<HttpSysOptions> configureOptions, RequestDelegate app, ILoggerFactory loggerFactory) 85internal static IHost CreateDynamicHost(string basePath, out string root, out string baseAddress, Action<HttpSysOptions> configureOptions, RequestDelegate app, ILoggerFactory loggerFactory) 114internal static MessagePump CreatePump(ILoggerFactory loggerFactory) 117internal static MessagePump CreatePump(Action<HttpSysOptions> configureOptions, ILoggerFactory loggerFactory) 124internal static IServer CreateDynamicHttpServer(string basePath, out string root, out string baseAddress, Action<HttpSysOptions> configureOptions, RequestDelegate app, ILoggerFactory loggerFactory) 139internal static IServer CreateDynamicHttpsServer(out string baseAddress, RequestDelegate app, ILoggerFactory loggerFactory) 144internal static IServer CreateDynamicHttpsServer(string basePath, out string root, out string baseAddress, Action<HttpSysOptions> configureOptions, RequestDelegate app, ILoggerFactory loggerFactory = null) 179private readonly ILoggerFactory _loggerFactory; 181public ForwardingLoggerProvider(ILoggerFactory loggerFactory)
Microsoft.AspNetCore.Server.HttpSys.NonHelixTests (3)
DelegateOutOfProcTests.cs (1)
19using var _ = StartLog(out var loggerFactory);
Utilities.cs (2)
33internal static MessagePump CreatePump(ILoggerFactory loggerFactory = null) 36internal static MessagePump CreatePump(Action<HttpSysOptions> configureOptions, ILoggerFactory loggerFactory = null)
Microsoft.AspNetCore.Server.IISIntegration (4)
IISMiddleware.cs (4)
42/// <param name="loggerFactory">The <see cref="ILoggerFactory" />.</param> 49ILoggerFactory loggerFactory, 62/// <param name="loggerFactory">The <see cref="ILoggerFactory" />.</param> 69ILoggerFactory loggerFactory,
Microsoft.AspNetCore.Server.IntegrationTesting (10)
Common\DeploymentResult.cs (3)
14private readonly ILoggerFactory _loggerFactory; 42public DeploymentResult(ILoggerFactory loggerFactory, DeploymentParameters deploymentParameters, string applicationBaseUri) 46public DeploymentResult(ILoggerFactory loggerFactory, DeploymentParameters deploymentParameters, string applicationBaseUri, string contentRoot, CancellationToken hostShutdownToken)
Common\LoggingHandler.cs (1)
13public LoggingHandler(ILoggerFactory loggerFactory, HttpMessageHandler innerHandler) : base(innerHandler)
Deployers\ApplicationDeployer.cs (2)
21public ApplicationDeployer(DeploymentParameters deploymentParameters, ILoggerFactory loggerFactory) 69protected ILoggerFactory LoggerFactory { get; }
Deployers\ApplicationDeployerFactory.cs (1)
20public static ApplicationDeployer Create(DeploymentParameters deploymentParameters, ILoggerFactory loggerFactory)
Deployers\NginxDeployer.cs (1)
23public NginxDeployer(DeploymentParameters deploymentParameters, ILoggerFactory loggerFactory)
Deployers\RemoteWindowsDeployer\RemoteWindowsDeployer.cs (1)
24public RemoteWindowsDeployer(RemoteWindowsDeploymentParameters deploymentParameters, ILoggerFactory loggerFactory)
Deployers\SelfHostDeployer.cs (1)
27public SelfHostDeployer(DeploymentParameters deploymentParameters, ILoggerFactory loggerFactory)
Microsoft.AspNetCore.Server.IntegrationTesting.IIS (7)
ApplicationDeployerFactory.cs (1)
20public static ApplicationDeployer Create(DeploymentParameters deploymentParameters, ILoggerFactory loggerFactory)
IISDeployer.cs (2)
38public IISDeployer(DeploymentParameters deploymentParameters, ILoggerFactory loggerFactory) 43public IISDeployer(IISDeploymentParameters deploymentParameters, ILoggerFactory loggerFactory)
IISDeployerBase.cs (1)
15public IISDeployerBase(IISDeploymentParameters deploymentParameters, ILoggerFactory loggerFactory)
IISDeploymentResult.cs (1)
18public IISDeploymentResult(ILoggerFactory loggerFactory,
IISExpressDeployer.cs (2)
31public IISExpressDeployer(DeploymentParameters deploymentParameters, ILoggerFactory loggerFactory) 36public IISExpressDeployer(IISDeploymentParameters deploymentParameters, ILoggerFactory loggerFactory)
Microsoft.AspNetCore.Server.Kestrel.Core (13)
Internal\Infrastructure\KestrelTrace.cs (1)
16public KestrelTrace(ILoggerFactory loggerFactory)
Internal\KestrelServerImpl.cs (2)
41ILoggerFactory loggerFactory, 75private static ServiceContext CreateServiceContext(IOptions<KestrelServerOptions> options, ILoggerFactory loggerFactory, DiagnosticSource? diagnosticSource, KestrelMetrics metrics)
KestrelServer.cs (2)
30/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 31public KestrelServer(IOptions<KestrelServerOptions> options, IConnectionListenerFactory transportFactory, ILoggerFactory loggerFactory)
ListenOptionsHttpsExtensions.cs (4)
194var loggerFactory = listenOptions.KestrelServerOptions.ApplicationServices.GetRequiredService<ILoggerFactory>(); 257var loggerFactory = listenOptions.KestrelServerOptions.ApplicationServices.GetRequiredService<ILoggerFactory>();
Middleware\HttpsConnectionMiddleware.cs (2)
58public HttpsConnectionMiddleware(ConnectionDelegate next, HttpsConnectionAdapterOptions options, HttpProtocols httpProtocols, ILoggerFactory loggerFactory, KestrelMetrics metrics) 120ILoggerFactory loggerFactory,
Middleware\ListenOptionsConnectionLoggingExtensions.cs (2)
36var loggerFactory = listenOptions.KestrelServerOptions.ApplicationServices.GetRequiredService<ILoggerFactory>();
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (11)
KestrelServerTests.cs (7)
271var mockLoggerFactory = new Mock<ILoggerFactory>(); 294ILoggerFactory loggerFactory = null, 571var mockLoggerFactory = new Mock<ILoggerFactory>(); 629var mockLoggerFactory = new Mock<ILoggerFactory>(); 684var mockLoggerFactory = new Mock<ILoggerFactory>(); 785var mockLoggerFactory = new Mock<ILoggerFactory>(); 924var mockLoggerFactory = new Mock<ILoggerFactory>();
src\Servers\Kestrel\shared\test\TestServiceContext.cs (4)
22public TestServiceContext(ILoggerFactory loggerFactory = null, KestrelTrace kestrelTrace = null, bool disableHttp1LineFeedTerminators = true, KestrelMetrics metrics = null) 31private static KestrelTrace CreateLoggingTrace(ILoggerFactory loggerFactory) 50private void Initialize(ILoggerFactory loggerFactory, KestrelTrace kestrelTrace, bool disableHttp1LineFeedTerminators, KestrelMetrics metrics) 72public ILoggerFactory LoggerFactory { get; set; }
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (1)
src\Servers\Kestrel\shared\test\Http3\Http3InMemory.cs (1)
38public Http3InMemory(ServiceContext serviceContext, FakeTimeProvider fakeTimeProvider, ITimeoutHandler timeoutHandler, ILoggerFactory loggerFactory)
Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes (3)
Internal\NamedPipeConnectionListener.cs (1)
37ILoggerFactory loggerFactory,
Internal\NamedPipeTransportFactory.cs (2)
17private readonly ILoggerFactory _loggerFactory; 22ILoggerFactory loggerFactory,
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (1)
QuicTransportFactory.cs (1)
21public QuicTransportFactory(ILoggerFactory loggerFactory, IOptions<QuicTransportOptions> options)
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.Tests (4)
QuicTestHelpers.cs (3)
31ILoggerFactory loggerFactory = null, 48ILoggerFactory loggerFactory = null, 67ILoggerFactory loggerFactory = null,
src\Shared\HttpClient\HttpEventSourceListener.cs (1)
17public HttpEventSourceListener(ILoggerFactory loggerFactory)
Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets (4)
Client\SocketConnectionFactory.cs (1)
24public SocketConnectionFactory(IOptions<SocketTransportOptions> options, ILoggerFactory loggerFactory)
SocketConnectionListener.cs (1)
25ILoggerFactory loggerFactory)
SocketTransportFactory.cs (2)
18private readonly ILoggerFactory _logger; 27ILoggerFactory loggerFactory)
Microsoft.AspNetCore.Session (7)
DistributedSession.cs (2)
55/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 63ILoggerFactory loggerFactory,
DistributedSessionStore.cs (3)
16private readonly ILoggerFactory _loggerFactory; 22/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 23public DistributedSessionStore(IDistributedCache cache, ILoggerFactory loggerFactory)
SessionMiddleware.cs (2)
31/// <param name="loggerFactory">The <see cref="ILoggerFactory"/> representing the factory that used to create logger instances.</param> 37ILoggerFactory loggerFactory,
Microsoft.AspNetCore.Session.Tests (12)
SessionTests.cs (12)
351services.AddSingleton(typeof(ILoggerFactory), loggerFactory); 409services.AddSingleton(typeof(ILoggerFactory), loggerFactory); 478services.AddSingleton(typeof(ILoggerFactory), NullLoggerFactory.Instance); 663services.AddSingleton(typeof(ILoggerFactory), loggerFactory); 712services.AddSingleton(typeof(ILoggerFactory), loggerFactory); 761services.AddSingleton(typeof(ILoggerFactory), loggerFactory); 809services.AddSingleton(typeof(ILoggerFactory), loggerFactory); 861services.AddSingleton(typeof(ILoggerFactory), loggerFactory); 924services.AddSingleton(typeof(ILoggerFactory), loggerFactory); 990services.AddSingleton(typeof(ILoggerFactory), loggerFactory); 1055services.AddSingleton(typeof(ILoggerFactory), loggerFactory); 1107services.AddSingleton(typeof(ILoggerFactory), loggerFactory);
Microsoft.AspNetCore.SignalR.Client.Core (7)
HubConnection.cs (3)
75private readonly ILoggerFactory _loggerFactory; 208public HubConnection(IConnectionFactory connectionFactory, IHubProtocol protocol, EndPoint endPoint, IServiceProvider serviceProvider, ILoggerFactory loggerFactory, IRetryPolicy reconnectPolicy) 229ILoggerFactory loggerFactory)
Internal\InvocationRequest.cs (4)
48public static InvocationRequest Invoke(CancellationToken cancellationToken, Type resultType, string invocationId, ILoggerFactory loggerFactory, HubConnection hubConnection, Activity? activity, out Task<object?> result) 56ILoggerFactory loggerFactory, HubConnection hubConnection, Activity? activity, out ChannelReader<object?> result) 83public Streaming(CancellationToken cancellationToken, Type resultType, string invocationId, ILoggerFactory loggerFactory, HubConnection hubConnection, Activity? activity) 171public NonStreaming(CancellationToken cancellationToken, Type resultType, string invocationId, ILoggerFactory loggerFactory, HubConnection hubConnection, Activity? activity)
Microsoft.AspNetCore.SignalR.Client.FunctionalTests (2)
HubConnectionTests.cs (2)
39ILoggerFactory loggerFactory = null, 73private static Func<EndPoint, ValueTask<ConnectionContext>> GetHttpConnectionFactory(string url, ILoggerFactory loggerFactory, string path, HttpTransportType transportType, TransferFormat transferFormat)
Microsoft.AspNetCore.SignalR.Client.Tests (9)
HttpConnectionTests.cs (1)
140var mockLoggerFactory = new Mock<ILoggerFactory>();
HttpConnectionTests.Helpers.cs (2)
21ILoggerFactory loggerFactory = null, 45ILoggerFactory loggerFactory = null,
HubConnectionBuilderExtensionsTests.cs (2)
96var loggerFactory = serviceProvider.GetService<ILoggerFactory>();
HubConnectionTests.cs (1)
845new Mock<IServiceProvider>().Object, new Mock<ILoggerFactory>().Object, new Mock<IRetryPolicy>().Object);
HubConnectionTests.Helpers.cs (1)
18ILoggerFactory loggerFactory = null,
MockHubConnection.cs (1)
21ILoggerFactory loggerFactory = null;
TestHttpMessageHandler.cs (1)
38public TestHttpMessageHandler(ILoggerFactory loggerFactory, bool autoNegotiate = true, bool handleFirstPoll = true)
Microsoft.AspNetCore.SignalR.Core (3)
HubConnectionContext.cs (1)
70public HubConnectionContext(ConnectionContext connectionContext, HubConnectionContextOptions contextOptions, ILoggerFactory loggerFactory)
HubConnectionHandler.cs (2)
23private readonly ILoggerFactory _loggerFactory; 53ILoggerFactory loggerFactory,
Microsoft.AspNetCore.SignalR.Microbenchmarks (1)
DefaultHubDispatcherBenchmark.cs (1)
87public NoErrorHubConnectionContext(ConnectionContext connectionContext, HubConnectionContextOptions contextOptions, ILoggerFactory loggerFactory)
Microsoft.AspNetCore.SignalR.Specification.Tests (1)
src\SignalR\common\testassets\Tests.Utils\HubConnectionContextUtils.cs (1)
44public MockHubConnectionContext(ConnectionContext connectionContext, HubConnectionContextOptions contextOptions, ILoggerFactory loggerFactory)
Microsoft.AspNetCore.SignalR.StackExchangeRedis.Tests (3)
RedisEndToEnd.cs (1)
215private static HubConnection CreateConnection(string url, HttpTransportType transportType, IHubProtocol protocol, ILoggerFactory loggerFactory, string userName = null)
RedisHubLifetimeManagerTests.cs (1)
96var mockLoggerFactory = new Mock<ILoggerFactory>();
RedisServerFixture.cs (1)
20private readonly ILoggerFactory _loggerFactory;
Microsoft.AspNetCore.SignalR.Tests (2)
HubConnectionHandlerTestUtils\Utils.cs (2)
56public static IServiceProvider CreateServiceProvider(Action<ServiceCollection> addServices = null, ILoggerFactory loggerFactory = null) 75public static Connections.ConnectionHandler GetHubConnectionHandler(Type hubType, ILoggerFactory loggerFactory = null, Action<ServiceCollection> addServices = null)
Microsoft.AspNetCore.SignalR.Tests.Utils (13)
HubConnectionBuilderTestExtensions.cs (1)
13public static IHubConnectionBuilder WithLoggerFactory(this IHubConnectionBuilder hubConnectionBuilder, ILoggerFactory loggerFactory)
HubConnectionContextUtils.cs (1)
44public MockHubConnectionContext(ConnectionContext connectionContext, HubConnectionContextOptions contextOptions, ILoggerFactory loggerFactory)
ServerLogScope.cs (2)
12private readonly ILoggerFactory _loggerFactory; 19public ServerLogScope(InProcessTestServer serverFixture, ILoggerFactory loggerFactory, IDisposable wrappedDisposable)
src\Shared\SignalR\InProcessTestServer.cs (5)
38private readonly ILoggerFactory _loggerFactory; 61public static async Task<InProcessTestServer<TStartup>> StartServer(ILoggerFactory loggerFactory, Action<KestrelServerOptions> configureKestrelServerOptions = null, IDisposable disposable = null) 72private InProcessTestServer(ILoggerFactory loggerFactory, Action<KestrelServerOptions> configureKestrelServerOptions, IDisposable disposable) 174private readonly ILoggerFactory _loggerFactory; 176public ForwardingLoggerProvider(ILoggerFactory loggerFactory)
src\Shared\SignalR\VerifyNoErrorScope.cs (2)
18public ILoggerFactory LoggerFactory { get; } 22public VerifyNoErrorsScope(ILoggerFactory loggerFactory = null, IDisposable wrappedDisposable = null, Func<WriteContext, bool> expectedErrorsFilter = null)
src\Shared\SignalR\WrappingLoggerFactory.cs (2)
18private readonly ILoggerFactory _innerLoggerFactory; 21public WrappingLoggerFactory(ILoggerFactory innerLoggerFactory)
Microsoft.AspNetCore.SpaServices.Extensions (2)
Util\LoggerFinder.cs (2)
18var loggerFactory = appBuilder.ApplicationServices.GetService<ILoggerFactory>();
Microsoft.AspNetCore.SpaServices.Extensions.Tests (1)
SpaServicesExtensionsTests.cs (1)
61services.AddSingleton<ILoggerFactory>(ListLoggerFactory);
Microsoft.AspNetCore.StaticFiles (2)
StaticFileMiddleware.cs (2)
31/// <param name="loggerFactory">An <see cref="ILoggerFactory"/> instance used to create loggers.</param> 32public StaticFileMiddleware(RequestDelegate next, IWebHostEnvironment hostingEnv, IOptions<StaticFileOptions> options, ILoggerFactory loggerFactory)
Microsoft.AspNetCore.Tests (2)
WebApplicationTests.cs (2)
2425Assert.Contains(builder.Services, service => service.ServiceType == typeof(ILoggerFactory)); 2851public UberHandler(IOptionsMonitor<AuthenticationSchemeOptions> options, ILoggerFactory logger, UrlEncoder encoder) : base(options, logger, encoder) { }
Microsoft.AspNetCore.WebSockets (2)
WebSocketMiddleware.cs (2)
34/// <param name="loggerFactory">An <see cref="ILoggerFactory"/> instance used to create loggers.</param> 35public WebSocketMiddleware(RequestDelegate next, IOptions<WebSocketOptions> options, ILoggerFactory loggerFactory)
Microsoft.AspNetCore.WebSockets.ConformanceTests (3)
Autobahn\AutobahnTester.cs (2)
18private readonly ILoggerFactory _loggerFactory; 23public AutobahnTester(ILoggerFactory loggerFactory, AutobahnSpec baseSpec)
AutobahnTests.cs (1)
32using (StartLog(out var loggerFactory))
Microsoft.AspNetCore.WebSockets.Tests (1)
KestrelWebSocketHelpers.cs (1)
18public static IAsyncDisposable CreateServer(ILoggerFactory loggerFactory, out int port, Func<HttpContext, Task> app, Action<WebSocketOptions> configure = null)
Microsoft.CodeAnalysis.LanguageServer (35)
BrokeredServices\BrokeredServiceBridgeProvider.cs (1)
28public BrokeredServiceBridgeProvider(ILoggerFactory loggerFactory, BrokeredServiceTraceListener brokeredServiceTraceListener)
BrokeredServices\BrokeredServiceTraceListener.cs (1)
21public BrokeredServiceTraceListener(ILoggerFactory loggerFactory)
BrokeredServices\Services\BrokeredServiceBridgeManifest\BrokeredServiceBridgeManifestService.cs (1)
31public BrokeredServiceBridgeManifest(ServiceBrokerFactory serviceBrokerFactory, ILoggerFactory loggerFactory)
CustomExportAssemblyLoader.cs (1)
17internal class CustomExportAssemblyLoader(ExtensionAssemblyManager extensionAssemblyManager, ILoggerFactory loggerFactory) : IAssemblyLoader
DotnetCliHelper.cs (1)
24public DotnetCliHelper(ILoggerFactory loggerFactory)
ExportProviderBuilder.cs (1)
27ILoggerFactory loggerFactory)
ExtensionTypeRefResolver.cs (1)
11internal sealed class ExtensionTypeRefResolver(IAssemblyLoader assemblyLoader, ILoggerFactory loggerFactory) : AbstractTypeRefResolver
HostWorkspace\ExtensionManager.cs (1)
15internal sealed class LanguageServerExtensionManager(ILoggerFactory loggerFactory) : AbstractExtensionManager
HostWorkspace\FileWatching\DelegatingFileChangeWatcher.cs (1)
28ILoggerFactory loggerFactory,
HostWorkspace\LanguageServerProjectSystem.cs (2)
51private readonly ILoggerFactory _loggerFactory; 71ILoggerFactory loggerFactory,
HostWorkspace\LanguageServerWorkspaceFactory.cs (1)
32ILoggerFactory loggerFactory)
HostWorkspace\ProjectInitializationHandler.cs (1)
35public ProjectInitializationHandler(IServiceBrokerProvider serviceBrokerProvider, ILoggerFactory loggerFactory)
HostWorkspace\ProjectTelemetry\ProjectLoadTelemetryReporter.cs (1)
18internal class ProjectLoadTelemetryReporter(ILoggerFactory loggerFactory, ServerConfiguration serverConfiguration)
HostWorkspace\Razor\RazorWorkspaceListenerInitializer.cs (2)
17private readonly ILoggerFactory _loggerFactory; 27public RazorWorkspaceListenerInitializer(LanguageServerWorkspaceFactory workspaceFactory, ILoggerFactory loggerFactory)
HostWorkspace\VSCodeAnalyzerLoaderProviderFactory.cs (1)
19ILoggerFactory loggerFactory,
HostWorkspace\WorkspaceProject.cs (1)
21public WorkspaceProject(ProjectSystemProject project, SolutionServices solutionServices, ProjectTargetFrameworkManager targetFrameworkManager, ILoggerFactory logger)
HostWorkspace\WorkspaceProjectFactoryService.cs (2)
26private readonly ILoggerFactory _loggerFactory; 30public WorkspaceProjectFactoryService(LanguageServerWorkspaceFactory workspaceFactory, ProjectInitializationHandler projectInitializationHandler, ILoggerFactory loggerFactory)
Logging\LspLogMessageLogger.cs (1)
17internal sealed class LspLogMessageLogger(string categoryName, ILoggerFactory fallbackLoggerFactory, ServerConfiguration serverConfiguration) : ILogger
Logging\LspLogMessageLoggerProvider.cs (1)
9internal class LspLogMessageLoggerProvider(ILoggerFactory fallbackLoggerFactory, ServerConfiguration serverConfiguration) : ILoggerProvider
Logging\ServerLoggerFactory.cs (5)
12[Export(typeof(ILoggerFactory))] 17private ILoggerFactory? _loggerFactory; 25public void SetFactory(ILoggerFactory loggerFactory) 31void ILoggerFactory.AddProvider(ILoggerProvider provider) 37ILogger ILoggerFactory.CreateLogger(string categoryName)
Program.cs (1)
45using var loggerFactory = LoggerFactory.Create(builder =>
Services\ExtensionAssemblyManager.cs (3)
48public static ExtensionAssemblyManager Create(ServerConfiguration serverConfiguration, ILoggerFactory loggerFactory) 139private static void ResolveDevKitAssemblies(string devKitDependencyPath, ILoggerFactory loggerFactory) 204public ExtensionAssemblyLoadContext(string extensionDirectory, ILoggerFactory loggerFactory) : base(extensionDirectory)
Services\StarredCompletions\StarredCompletionsAssemblyHelper.cs (1)
41internal static void InitializeInstance(string? completionsAssemblyLocation, ExtensionAssemblyManager extensionAssemblyManager, ILoggerFactory loggerFactory, ServiceBrokerFactory serviceBrokerFactory)
Testing\RunTestsHandler.cs (1)
21internal class RunTestsHandler(DotnetCliHelper dotnetCliHelper, TestDiscoverer testDiscoverer, TestRunner testRunner, ServerConfiguration serverConfiguration, ILoggerFactory loggerFactory)
Testing\TestDiscoverer.cs (1)
24internal partial class TestDiscoverer(ILoggerFactory loggerFactory)
Testing\TestRunner.cs (1)
19internal partial class TestRunner(ILoggerFactory loggerFactory)
Microsoft.CodeAnalysis.LanguageServer.UnitTests (2)
Utilities\LanguageServerTestComposition.cs (1)
24ILoggerFactory loggerFactory,
Utilities\TestOutputLogger.cs (1)
13public readonly ILoggerFactory Factory;
Microsoft.CodeAnalysis.Rebuild.UnitTests (4)
CompilationOptionsReaderTests.cs (1)
36var factory = LoggerFactory.Create(configure => { });
CSharpRebuildTests.cs (1)
30var factory = LoggerFactory.Create(configure => { });
RoundTripUtil.cs (2)
44var factory = LoggerFactory.Create(configure => { }); 77var factory = LoggerFactory.Create(configure => { });
Microsoft.CodeAnalysis.Workspaces.MSBuild (7)
MSBuild\BuildHostProcessManager.cs (3)
26private readonly ILoggerFactory? _loggerFactory; 33public BuildHostProcessManager(ImmutableDictionary<string, string>? globalMSBuildProperties = null, string? binaryLogPath = null, ILoggerFactory? loggerFactory = null) 375public BuildHostProcess(Process process, string pipeName, ILoggerFactory? loggerFactory)
MSBuild\DiagnosticReporterLoggerProvider.cs (1)
28public static ILoggerFactory CreateLoggerFactoryForDiagnosticReporter(DiagnosticReporter reporter)
MSBuild\MSBuildProjectLoader.cs (2)
26private readonly Microsoft.Extensions.Logging.ILoggerFactory _loggerFactory; 36Microsoft.Extensions.Logging.ILoggerFactory loggerFactory,
MSBuild\MSBuildWorkspace.cs (1)
33private readonly Microsoft.Extensions.Logging.ILoggerFactory _loggerFactory;
Microsoft.Extensions.Caching.Hybrid (1)
Internal\DefaultHybridCache.cs (1)
64_logger = services.GetService<ILoggerFactory>()?.CreateLogger(typeof(HybridCache)) ?? NullLogger.Instance;
Microsoft.Extensions.Caching.Hybrid.Tests (2)
ServiceConstructionTests.cs (2)
214public CustomMemoryCache(IOptions<MemoryCacheOptions> options, ILoggerFactory loggerFactory) 227public CustomMemoryDistributedCache(IOptions<MemoryDistributedCacheOptions> options, ILoggerFactory loggerFactory)
Microsoft.Extensions.Caching.Memory (2)
MemoryCache.cs (1)
47public MemoryCache(IOptions<MemoryCacheOptions> optionsAccessor, ILoggerFactory loggerFactory)
MemoryDistributedCache.cs (1)
33public MemoryDistributedCache(IOptions<MemoryDistributedCacheOptions> optionsAccessor, ILoggerFactory loggerFactory)
Microsoft.Extensions.Caching.StackExchangeRedis.Tests (2)
CacheServiceExtensionsTests.cs (2)
100var loggerFactory = new Mock<ILoggerFactory>(); 107services.AddScoped(typeof(ILoggerFactory), _ => loggerFactory.Object);
Microsoft.Extensions.Diagnostics.HealthChecks.Common.Tests (3)
TelemetryHealthChecksPublisherExtensionsTests.cs (3)
21.AddSingleton<ILoggerFactory, LoggerFactory>() 38.AddSingleton<ILoggerFactory, LoggerFactory>() 58.AddSingleton<ILoggerFactory, LoggerFactory>()
Microsoft.Extensions.Diagnostics.HealthChecks.Tests (2)
DefaultHealthCheckServiceTest.cs (1)
341b.Services.AddSingleton<ILoggerFactory>(loggerFactory);
HealthCheckPublisherHostedServiceTest.cs (1)
781serviceCollection.AddSingleton<ILoggerFactory>(new TestLoggerFactory(sink, enabled: true));
Microsoft.Extensions.Diagnostics.Testing.Tests (6)
Logging\FakeLoggerExtensionsTests.cs (6)
22var factory = serviceProvider.GetService<ILoggerFactory>(); 38var factory = serviceProvider.GetService<ILoggerFactory>(); 66var factory = serviceProvider.GetService<ILoggerFactory>()!;
Microsoft.Extensions.Hosting (9)
Host.cs (4)
26/// <item><description>configure the <see cref="ILoggerFactory"/> to log to the console, debug, and event source output</description></item> 47/// <item><description>configure the <see cref="ILoggerFactory"/> to log to the console, debug, and event source output</description></item> 70/// <item><description>configure the <see cref="ILoggerFactory"/> to log to the console, debug, and event source output</description></item> 90/// <item><description>configure the <see cref="ILoggerFactory"/> to log to the console, debug, and event source output</description></item>
HostApplicationBuilder.cs (2)
48/// <item><description>configure the <see cref="ILoggerFactory"/> to log to the console, debug, and event source output</description></item> 70/// <item><description>configure the <see cref="ILoggerFactory"/> to log to the console, debug, and event source output</description></item>
HostApplicationBuilderSettings.cs (1)
37/// * configure the <see cref="ILoggerFactory"/> to log to the console, debug, and event source output
HostingHostBuilderExtensions.cs (1)
188/// * configure the <see cref="ILoggerFactory"/> to log to the console, debug, and event source output
Internal\ConsoleLifetime.cs (1)
46public ConsoleLifetime(IOptions<ConsoleLifetimeOptions> options, IHostEnvironment environment, IHostApplicationLifetime applicationLifetime, IOptions<HostOptions> hostOptions, ILoggerFactory loggerFactory)
Microsoft.Extensions.Hosting.Systemd (2)
SystemdLifetime.cs (2)
31/// <param name="loggerFactory">The <see cref="ILoggerFactory"/> used to instantiate the lifetime logger.</param> 32public SystemdLifetime(IHostEnvironment environment, IHostApplicationLifetime applicationLifetime, ISystemdNotifier systemdNotifier, ILoggerFactory loggerFactory)
Microsoft.Extensions.Hosting.WindowsServices (4)
WindowsServiceLifetime.cs (4)
31/// <param name="loggerFactory">The <see cref="ILoggerFactory"/> used to instantiate the lifetime logger.</param> 33public WindowsServiceLifetime(IHostEnvironment environment, IHostApplicationLifetime applicationLifetime, ILoggerFactory loggerFactory, IOptions<HostOptions> optionsAccessor) 43/// <param name="loggerFactory">The <see cref="ILoggerFactory"/> used to instantiate the lifetime logger.</param> 46public WindowsServiceLifetime(IHostEnvironment environment, IHostApplicationLifetime applicationLifetime, ILoggerFactory loggerFactory, IOptions<HostOptions> optionsAccessor, IOptions<WindowsServiceLifetimeOptions> windowsServiceOptionsAccessor)
Microsoft.Extensions.Http (4)
DefaultHttpClientFactory.cs (1)
99() => _services.GetRequiredService<ILoggerFactory>().CreateLogger<DefaultHttpClientFactory>(),
Logging\LoggingHttpMessageHandlerBuilderFilter.cs (3)
18private ILoggerFactory? _loggerFactory; 19private ILoggerFactory LoggerFactory => _loggerFactory ??= _serviceProvider.GetRequiredService<ILoggerFactory>();
Microsoft.Extensions.Http.Resilience.PerformanceTests (2)
HttpClientFactory.cs (2)
54services.RemoveAll<ILoggerFactory>(); 55services.AddSingleton<ILoggerFactory>(NullLoggerFactory.Instance);
Microsoft.Extensions.Localization (3)
ResourceManagerStringLocalizerFactory.cs (3)
29private readonly ILoggerFactory _loggerFactory; 35/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 38ILoggerFactory loggerFactory)
Microsoft.Extensions.Localization.Tests (1)
ResourceManagerStringLocalizerFactoryTest.cs (1)
31ILoggerFactory loggerFactory)
Microsoft.Extensions.Logging (8)
LoggerFactory.cs (7)
107/// Creates new instance of <see cref="ILoggerFactory"/> configured using provided <paramref name="configure"/> delegate. 110/// <returns>The <see cref="ILoggerFactory"/> that was created.</returns> 111public static ILoggerFactory Create(Action<ILoggingBuilder> configure) 116ILoggerFactory loggerFactory = serviceProvider.GetRequiredService<ILoggerFactory>(); 296private readonly ILoggerFactory _loggerFactory; 300public DisposingLoggerFactory(ILoggerFactory loggerFactory, ServiceProvider serviceProvider)
LoggingServiceCollectionExtensions.cs (1)
38services.TryAdd(ServiceDescriptor.Singleton<ILoggerFactory, LoggerFactory>());
Microsoft.Extensions.Logging.Abstractions (5)
LoggerFactoryExtensions.cs (2)
20public static ILogger<T> CreateLogger<T>(this ILoggerFactory factory) 32public static ILogger CreateLogger(this ILoggerFactory factory, Type type)
LoggerT.cs (2)
12/// provided <see cref="ILoggerFactory"/>. 25public Logger(ILoggerFactory factory)
NullLoggerFactory.cs (1)
7/// An <see cref="ILoggerFactory"/> used to create an instance of
Microsoft.Extensions.Logging.Console (16)
ConsoleLoggerExtensions.Obsolete.cs (16)
24public static Logging.ILoggerFactory AddConsole(this Logging.ILoggerFactory factory, Extensions.Configuration.IConfiguration configuration) 38public static Logging.ILoggerFactory AddConsole(this Logging.ILoggerFactory factory, Console.IConsoleLoggerSettings settings) 53public static Logging.ILoggerFactory AddConsole(this Logging.ILoggerFactory factory, Logging.LogLevel minLevel, bool includeScopes) 67public static Logging.ILoggerFactory AddConsole(this Logging.ILoggerFactory factory, Logging.LogLevel minLevel) 81public static Logging.ILoggerFactory AddConsole(this Logging.ILoggerFactory factory, bool includeScopes) 96public static Logging.ILoggerFactory AddConsole(this Logging.ILoggerFactory factory, System.Func<string, Logging.LogLevel, bool> filter, bool includeScopes) 110public static Logging.ILoggerFactory AddConsole(this Logging.ILoggerFactory factory, System.Func<string, Logging.LogLevel, bool> filter) 123public static Logging.ILoggerFactory AddConsole(this Logging.ILoggerFactory factory)
Microsoft.Extensions.Logging.Debug (7)
DebugLoggerFactoryExtensions.cs (7)
13/// Extension methods for the <see cref="ILoggerFactory"/> class. 24public static ILoggerFactory AddDebug(this ILoggerFactory factory, LogLevel minLevel) => AddDebug(factory); 33public static ILoggerFactory AddDebug(this ILoggerFactory factory, Func<string, LogLevel, bool> filter) => AddDebug(factory); 41public static ILoggerFactory AddDebug(this ILoggerFactory factory)
Microsoft.Extensions.Logging.EventLog (7)
EventLoggerFactoryExtensions.cs (7)
13/// Extension methods for the <see cref="ILoggerFactory"/> class. 24public static ILoggerFactory AddEventLog(this ILoggerFactory factory, EventLog.EventLogSettings settings) 40public static ILoggerFactory AddEventLog(this ILoggerFactory factory, LogLevel minLevel) => 49public static ILoggerFactory AddEventLog(this ILoggerFactory factory) => AddEventLog(factory, LogLevel.Information);
Microsoft.Extensions.Logging.EventSource (4)
EventSourceLoggerFactoryExtensions.cs (4)
14/// Extension methods for the <see cref="ILoggerFactory"/> class. 22/// <returns>The <see cref="ILoggerFactory"/> so that additional calls can be chained.</returns> 25public static ILoggerFactory AddEventSourceLogger(this ILoggerFactory factory)
Microsoft.Extensions.Logging.TraceSource (16)
TraceSourceFactoryExtensions.cs (16)
20/// <param name="factory">The <see cref="ILoggerFactory"/> to use.</param> 23/// <returns>The <see cref="ILoggerFactory"/> so that additional calls can be chained.</returns> 26public static ILoggerFactory AddTraceSource(this ILoggerFactory factory, System.Diagnostics.SourceSwitch sourceSwitch, System.Diagnostics.TraceListener listener) 40/// <param name="factory">The <see cref="ILoggerFactory"/> to use.</param> 42/// <returns>The <see cref="ILoggerFactory"/> so that additional calls can be chained.</returns> 45public static ILoggerFactory AddTraceSource(this ILoggerFactory factory, System.Diagnostics.SourceSwitch sourceSwitch) 58/// <param name="factory">The <see cref="ILoggerFactory"/> to use.</param> 61/// <returns>The <see cref="ILoggerFactory"/> so that additional calls can be chained.</returns> 64public static ILoggerFactory AddTraceSource(this ILoggerFactory factory, string switchName, System.Diagnostics.TraceListener listener) 78/// <param name="factory">The <see cref="ILoggerFactory"/> to use.</param> 80/// <returns>The <see cref="ILoggerFactory"/> so that additional calls can be chained.</returns> 83public static ILoggerFactory AddTraceSource(this ILoggerFactory factory, string switchName)
Microsoft.Extensions.Telemetry (4)
Logging\LoggingEnrichmentExtensions.cs (2)
37builder.Services.TryAddEnumerable(ServiceDescriptor.Singleton<ILoggerFactory, ExtendedLoggerFactory>()); 55builder.Services.TryAddEnumerable(ServiceDescriptor.Singleton<ILoggerFactory, ExtendedLoggerFactory>());
Logging\LoggingRedactionExtensions.cs (2)
37builder.Services.TryAddEnumerable(ServiceDescriptor.Singleton<ILoggerFactory, ExtendedLoggerFactory>()); 54builder.Services.TryAddEnumerable(ServiceDescriptor.Singleton<ILoggerFactory, ExtendedLoggerFactory>());
Microsoft.Extensions.Telemetry.PerformanceTests (1)
ExtendedLoggerBench.cs (1)
76return serviceCollection.BuildServiceProvider().GetRequiredService<ILoggerFactory>().CreateLogger("Benchmark");
Microsoft.Extensions.Telemetry.Tests (27)
Logging\ExtendedLoggerFactoryTests.cs (18)
22var factory = Utils.CreateLoggerFactory(); 31using var factory = Utils.CreateLoggerFactory(); 39var factory = Utils.CreateLoggerFactory(); 47var factory = Utils.CreateLoggerFactory(); 61var factory = Utils.CreateLoggerFactory(); 81using var factory = Utils.CreateLoggerFactory(); 110var factory = Utils.CreateLoggerFactory(); 196using var loggerFactory = Utils.CreateLoggerFactory(builder => 246using var loggerFactory = Utils.CreateLoggerFactory(builder => 279using var loggerFactory = Utils.CreateLoggerFactory(builder => 308using var loggerFactory = Utils.CreateLoggerFactory(builder => 336using var loggerFactory = Utils.CreateLoggerFactory(builder => 410using var loggerFactory = Utils.CreateLoggerFactory(builder => 434using var loggerFactory = Utils.CreateLoggerFactory(); 465using var loggerFactory = Utils.CreateLoggerFactory(); 478using var loggerFactory = Utils.CreateLoggerFactory(); 491using var loggerFactory = Utils.CreateLoggerFactory(); 533var factory = Utils.CreateLoggerFactory(builder => builder.Services.AddSingleton(_ => provider.Object));
Logging\ExtendedLoggerTests.cs (4)
641using var factory = Utils.CreateLoggerFactory( 669using var factory = Utils.CreateLoggerFactory( 699using var factory = Utils.CreateLoggerFactory( 734using var factory = Utils.CreateLoggerFactory(
Logging\Utils.cs (5)
12public static ILoggerFactory CreateLoggerFactory(Action<ILoggingBuilder>? configure = null) 23ILoggerFactory loggerFactory = serviceProvider.GetRequiredService<ILoggerFactory>(); 29private readonly ILoggerFactory _loggerFactory; 33public DisposingLoggerFactory(ILoggerFactory loggerFactory, ServiceProvider serviceProvider)
Microsoft.Gen.Logging.Generated.Tests (1)
Utils.cs (1)
91var logger = serviceProvider.GetRequiredService<ILoggerFactory>().CreateLogger(nameof(Utils));
Microsoft.Maui (3)
Hosting\EssentialsMauiAppBuilderExtensions.cs (1)
160 services.GetService<ILoggerFactory>()?
Hosting\MauiAppBuilder.cs (1)
179 Services.TryAdd(ServiceDescriptor.Singleton<ILoggerFactory, NullLoggerFactory>());
Hosting\ServiceProviderExtensions.cs (1)
20 services.GetService<ILoggerFactory>()?.CreateLogger(loggerName);
Microsoft.Maui.Maps (1)
src\Core\src\Hosting\ServiceProviderExtensions.cs (1)
20 services.GetService<ILoggerFactory>()?.CreateLogger(loggerName);
Microsoft.ML.GenAI.Samples (1)
Llama\SFT_Llama_3_2_1B.cs (1)
25using var loggerFactory = LoggerFactory.Create(builder => builder.AddConsole());
Microsoft.VisualStudio.LanguageServices.DevKit (2)
Logging\VSCodeTelemetryLogger.cs (1)
34public VSCodeTelemetryLogger(ILoggerFactory loggerFactory)
SourceLink\VSCodePdbSourceDocumentLogger.cs (1)
16internal class VSCodePdbSourceDocumentLogger(ILoggerFactory loggerFactory) : IPdbSourceDocumentLogger
MiddlewareAnalysisSample (1)
Startup.cs (1)
16public void Configure(IApplicationBuilder app, ILoggerFactory factory, DiagnosticListener diagnosticListener)
PathSchemeSelection (1)
Startup.cs (1)
44public ApiAuthHandler(IOptionsMonitor<AuthenticationSchemeOptions> options, ILoggerFactory logger, UrlEncoder encoder) : base(options, logger, encoder)
Sandbox (1)
Services\GreeterService.cs (1)
18public GreeterService(ILoggerFactory loggerFactory)
ServerComparison.FunctionalTests (5)
HelloWorldTest.cs (2)
38using (StartLog(out var loggerFactory, 127using (StartLog(out var loggerFactory, LogLevel.Debug, testName))
NtlmAuthenticationTest.cs (1)
35using (StartLog(out var loggerFactory, testName))
ResponseCompressionTests.cs (1)
89using (StartLog(out var loggerFactory,
ResponseTests.cs (1)
82using (StartLog(out var loggerFactory,
ServerComparison.TestSites (4)
Startup.cs (1)
13public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory)
StartupNtlmAuthentication.cs (1)
27public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory)
StartupResponseCompression.cs (1)
19public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory)
StartupResponses.cs (1)
13public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory)
Sockets.BindTests (4)
src\Servers\Kestrel\shared\test\TestServiceContext.cs (4)
22public TestServiceContext(ILoggerFactory loggerFactory = null, KestrelTrace kestrelTrace = null, bool disableHttp1LineFeedTerminators = true, KestrelMetrics metrics = null) 31private static KestrelTrace CreateLoggingTrace(ILoggerFactory loggerFactory) 50private void Initialize(ILoggerFactory loggerFactory, KestrelTrace kestrelTrace, bool disableHttp1LineFeedTerminators, KestrelMetrics metrics) 72public ILoggerFactory LoggerFactory { get; set; }
Sockets.FunctionalTests (4)
src\Servers\Kestrel\shared\test\TestServiceContext.cs (4)
22public TestServiceContext(ILoggerFactory loggerFactory = null, KestrelTrace kestrelTrace = null, bool disableHttp1LineFeedTerminators = true, KestrelMetrics metrics = null) 31private static KestrelTrace CreateLoggingTrace(ILoggerFactory loggerFactory) 50private void Initialize(ILoggerFactory loggerFactory, KestrelTrace kestrelTrace, bool disableHttp1LineFeedTerminators, KestrelMetrics metrics) 72public ILoggerFactory LoggerFactory { get; set; }
Stress.ApiService (2)
Program.cs (2)
136app.MapGet("/many-logs", (ILoggerFactory loggerFactory, CancellationToken cancellationToken) => 189app.MapGet("/log-formatting", (ILoggerFactory loggerFactory) =>
SystemdTestApp (1)
Startup.cs (1)
21public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory)
TestProject.AppHost (1)
src\Aspire.Hosting.Testing\ResourceLoggerForwarderService.cs (1)
19ILoggerFactory loggerFactory)
Wasm.Performance.ConsoleHost (3)
ConsoleHostRenderer.cs (1)
15public ConsoleHostRenderer(IServiceProvider serviceProvider, ILoggerFactory loggerFactory)
Scenarios\ComponentRenderingScenarioBase.cs (2)
30var loggerFactory = serviceProvider.GetRequiredService<ILoggerFactory>();