129 references to Instance
Aspire.Components.Common.Tests (1)
TestLoggerFactory.cs (1)
21return NullLogger.Instance;
Aspire.Dashboard.Tests (8)
Integration\StartupTests.cs (4)
278}, NullLogger.Instance); 335}, NullLogger.Instance); 385}, NullLogger.Instance); 557}, NullLogger.Instance, portCount: 3);
Model\ApplicationsSelectHelpersTests.cs (4)
57var app = appVMs.GetApplication(NullLogger.Instance, "app-app-abc", canSelectGrouping: false, null!); 161var app = appVMs.GetApplication(NullLogger.Instance, "app", canSelectGrouping: false, null!); 198var app = appVMs.GetApplication(NullLogger.Instance, "app", canSelectGrouping: true, null!); 217return new OtlpApplication(applicationKey.Name, applicationKey.InstanceId!, NullLogger.Instance, new TelemetryLimitOptions());
Aspire.RabbitMQ.Client.Tests (1)
AspireRabbitMQLoggingTests.cs (1)
164NullLogger.Instance.BeginScope(state);
Microsoft.AspNetCore.Components.Server.Tests (3)
Circuits\CircuitHostTest.cs (1)
714NullLogger.Instance,
Circuits\RemoteRendererTest.cs (1)
666NullLogger.Instance);
Circuits\TestCircuitHost.cs (1)
47NullLogger.Instance,
Microsoft.AspNetCore.CookiePolicy (1)
CookiePolicyMiddleware.cs (1)
51_logger = NullLogger.Instance;
Microsoft.AspNetCore.DataProtection (1)
LoggingServiceProviderExtensions.cs (1)
40return services?.GetService<ILoggerFactory>()?.CreateLogger(type.FullName!) ?? NullLogger.Instance;
Microsoft.AspNetCore.Grpc.JsonTranscoding.Tests (1)
JsonTranscodingServerCallContextTests.cs (1)
104NullLogger.Instance);
Microsoft.AspNetCore.Hosting (1)
Internal\WebHost.cs (1)
38private ILogger _logger = NullLogger.Instance;
Microsoft.AspNetCore.Hosting.Tests (5)
Fakes\CustomLoggerFactory.cs (2)
15public ILogger CreateLogger(string categoryName) => NullLogger.Instance; 28public ILogger CreateLogger(string categoryName) => NullLogger.Instance;
HostingApplicationTests.cs (1)
194NullLogger.Instance,
HostingMetricsTests.cs (1)
201NullLogger.Instance,
WebHostBuilderTests.cs (1)
1781public ILogger CreateLogger(string categoryName) => NullLogger.Instance;
Microsoft.AspNetCore.Http.Connections (1)
Internal\HttpConnectionContext.cs (1)
84_logger = logger ?? NullLogger.Instance;
Microsoft.AspNetCore.Http.Results.Tests (6)
HttpResultsHelperTests.cs (6)
37await HttpResultsHelper.WriteResultAsJsonAsync(httpContext, NullLogger.Instance, value, jsonSerializerOptions: serializerOptions); 68await HttpResultsHelper.WriteResultAsJsonAsync(httpContext, NullLogger.Instance, value, jsonSerializerOptions: serializerOptions); 101await HttpResultsHelper.WriteResultAsJsonAsync(httpContext, NullLogger.Instance, value, jsonSerializerOptions: serializerOptions); 135await HttpResultsHelper.WriteResultAsJsonAsync<Todo>(httpContext, NullLogger.Instance, value, jsonSerializerOptions: serializerOptions); 169await HttpResultsHelper.WriteResultAsJsonAsync<JsonTodo>(httpContext, NullLogger.Instance, value, jsonSerializerOptions: serializerOptions); 197await HttpResultsHelper.WriteResultAsJsonAsync(httpContext, NullLogger.Instance, value, jsonSerializerOptions: serializerOptions);
Microsoft.AspNetCore.Mvc.Core.Test (8)
FileResultHelperTest.cs (4)
272NullLogger.Instance); 311NullLogger.Instance); 348NullLogger.Instance); 376NullLogger.Instance);
Infrastructure\ModelStateInvalidFilterTest.cs (3)
22var filter = new ModelStateInvalidFilter(options, NullLogger.Instance); 42var filter = new ModelStateInvalidFilter(options, NullLogger.Instance); 61var filter = new ModelStateInvalidFilter(options, NullLogger.Instance);
ModelBinding\Binders\BodyModelBinderTests.cs (1)
907return NullLogger.Instance;
Microsoft.AspNetCore.Mvc.NewtonsoftJson.Test (3)
NewtonsoftJsonInputFormatterTest.cs (1)
577return NullLogger.Instance;
NewtonsoftJsonPatchInputFormatterTest.cs (2)
224return NullLogger.Instance; 230NullLogger.Instance,
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.Test (1)
RuntimeViewCompilerTest.cs (1)
869: base(fileProvider, projectEngine, csharpCompiler, precompiledViews, NullLogger.Instance)
Microsoft.AspNetCore.Mvc.RazorPages.Test (12)
ApplicationModels\PageRouteModelFactoryTest.cs (8)
17var routeModelFactory = new PageRouteModelFactory(options, NullLogger.Instance); 46var routeModelFactory = new PageRouteModelFactory(options, NullLogger.Instance); 75var routeModelFactory = new PageRouteModelFactory(options, NullLogger.Instance); 103var routeModelFactory = new PageRouteModelFactory(options, NullLogger.Instance); 137var routeModelFactory = new PageRouteModelFactory(options, NullLogger.Instance); 173var routeModelFactory = new PageRouteModelFactory(options, NullLogger.Instance); 190var routeModelFactory = new PageRouteModelFactory(options, NullLogger.Instance); 209var routeModelFactory = new PageRouteModelFactory(options, NullLogger.Instance);
Infrastructure\DefaultPageFactoryProviderTest.cs (3)
251.AddSingleton<ILogger>(NullLogger.Instance) 294.AddSingleton<ILogger>(NullLogger.Instance) 332.AddSingleton<ILogger>(NullLogger.Instance)
Infrastructure\PageActionInvokerTest.cs (1)
1567logger ?? NullLogger.Instance,
Microsoft.AspNetCore.OutputCaching.Microbenchmarks (3)
EndToEndBenchmarks.cs (3)
130await OutputCacheEntryFormatter.StoreAsync(Key, entry, _tags, _options.DefaultExpirationTimeSpan, _store, NullLogger.Instance, CancellationToken.None); 146await OutputCacheEntryFormatter.StoreAsync(Key, entry, _tags, _options.DefaultExpirationTimeSpan, _store, NullLogger.Instance, CancellationToken.None); 163await OutputCacheEntryFormatter.StoreAsync(Key, entry, _tags, _options.DefaultExpirationTimeSpan, _store, NullLogger.Instance, CancellationToken.None);
Microsoft.AspNetCore.OutputCaching.Tests (8)
OutputCacheEntryFormatterTests.cs (3)
35await OutputCacheEntryFormatter.StoreAsync(key, entry, null, TimeSpan.Zero, store, NullLogger.Instance, default); 54await OutputCacheEntryFormatter.StoreAsync(key, entry, new HashSet<string>() { "tag", "タグ" }, TimeSpan.Zero, store, NullLogger.Instance, default); 72await OutputCacheEntryFormatter.StoreAsync(key, entry, null, TimeSpan.Zero, store, NullLogger.Instance, default);
OutputCacheMiddlewareTests.cs (3)
85NullLogger.Instance, 115NullLogger.Instance, 143NullLogger.Instance,
TestUtils.cs (2)
226serviceProvider.Setup(x => x.GetService(typeof(ILogger<OutputCacheMiddleware>))).Returns(testSink == null ? NullLogger.Instance : new TestLogger("OutputCachingTests", testSink, true)); 246serviceProvider.Setup(x => x.GetService(typeof(ILogger<OutputCacheMiddleware>))).Returns(testSink == null ? NullLogger.Instance : new TestLogger("OutputCachingTests", testSink, true));
Microsoft.AspNetCore.ResponseCaching.Tests (1)
TestUtils.cs (1)
229return new ResponseCachingContext(new DefaultHttpContext(), NullLogger.Instance)
Microsoft.AspNetCore.Rewrite (1)
RewriteContext.cs (1)
30public ILogger Logger { get; set; } = NullLogger.Instance;
Microsoft.AspNetCore.Rewrite.Tests (2)
IISUrlRewrite\InputParserTests.cs (2)
96var rewriteContext= new RewriteContext { HttpContext = new DefaultHttpContext(features), StaticFileProvider = null, Logger = NullLogger.Instance }; 162return new RewriteContext { HttpContext = context, StaticFileProvider = null, Logger = NullLogger.Instance };
Microsoft.AspNetCore.Routing.Tests (6)
ConstraintMatcherTest.cs (6)
98logger: NullLogger.Instance)); 118logger: NullLogger.Instance)); 138logger: NullLogger.Instance)); 158logger: NullLogger.Instance)); 178logger: NullLogger.Instance)); 190logger: NullLogger.Instance));
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (2)
AddressBinderTests.cs (2)
165NullLogger.Instance, 236NullLogger.Instance,
Microsoft.AspNetCore.SignalR.Client.Tests (1)
HttpConnectionTests.cs (1)
143.Returns((string categoryName) => (categoryName == loggerName) ? (ILogger)logger : NullLogger.Instance);
Microsoft.AspNetCore.SignalR.StackExchangeRedis.Tests (1)
Docker.cs (1)
153RunCommand(commandAndArguments, prefix, NullLogger.Instance, out output);
Microsoft.AspNetCore.SignalR.Tests (12)
Internal\MessageBufferTests.cs (12)
24using var messageBuffer = new MessageBuffer(connection, protocol, bufferLimit: 1, NullLogger.Instance); 52using var messageBuffer = new MessageBuffer(connection, protocol, bufferLimit: 100_000, NullLogger.Instance); 90using var messageBuffer = new MessageBuffer(connection, protocol, bufferLimit: 100_000, NullLogger.Instance); 130using var messageBuffer = new MessageBuffer(connection, protocol, bufferLimit: 1000, NullLogger.Instance); 179using var messageBuffer = new MessageBuffer(connection, protocol, bufferLimit: 1000, NullLogger.Instance); 223using var messageBuffer = new MessageBuffer(connection, protocol, bufferLimit: 1000, NullLogger.Instance); 247using var messageBuffer = new MessageBuffer(connection, protocol, bufferLimit: 100_000, NullLogger.Instance); 290using var messageBuffer = new MessageBuffer(connection, protocol, bufferLimit: 1, NullLogger.Instance); 327using var messageBuffer = new MessageBuffer(connection, protocol, bufferLimit: 100_000, NullLogger.Instance); 370using var messageBuffer = new MessageBuffer(connection, protocol, bufferLimit: 100_000, NullLogger.Instance, timeProvider); 407using var messageBuffer = new MessageBuffer(connection, protocol, bufferLimit: 100_000, NullLogger.Instance); 450using var messageBuffer = new MessageBuffer(connection, protocol, bufferLimit: 100_000, NullLogger.Instance, timeProvider);
Microsoft.AspNetCore.SignalR.Tests.Utils (1)
src\Shared\SignalR\WrappingLoggerFactory.cs (1)
53return NullLogger.Instance;
Microsoft.AspNetCore.SpaServices.Extensions (1)
Util\LoggerFinder.cs (1)
21: NullLogger.Instance;
Microsoft.AspNetCore.SpaServices.Extensions.Tests (1)
ListLoggerFactory.cs (1)
43? (ILogger)NullLogger.Instance
Microsoft.AspNetCore.StaticFiles.Tests (8)
RangeHelperTests.cs (3)
68var (isRangeRequest, parsedRangeResult) = RangeHelper.ParseRange(httpContext, httpContext.Request.GetTypedHeaders(), 10, NullLogger.Instance); 85var (isRangeRequest, parsedRangeResult) = RangeHelper.ParseRange(httpContext, httpContext.Request.GetTypedHeaders(), 10, NullLogger.Instance); 101var (isRangeRequest, parsedRange) = RangeHelper.ParseRange(httpContext, httpContext.Request.GetTypedHeaders(), 4, NullLogger.Instance);
StaticFileContextTest.cs (5)
24var context = new StaticFileContext(httpContext, options, NullLogger.Instance, new TestFileProvider(), contentType, subPath); 51var context = new StaticFileContext(httpContext, options, NullLogger.Instance, fileProvider, contentType, subPath); 79var context = new StaticFileContext(httpContext, options, NullLogger.Instance, fileProvider, contentType, subPath); 108var context = new StaticFileContext(httpContext, options, NullLogger.Instance, fileProvider, contentType, subPath); 136var context = new StaticFileContext(httpContext, options, NullLogger.Instance, fileProvider, contentType, subPath);
Microsoft.Extensions.Caching.Hybrid (1)
Internal\DefaultHybridCache.cs (1)
64_logger = services.GetService<ILoggerFactory>()?.CreateLogger(typeof(HybridCache)) ?? NullLogger.Instance;
Microsoft.Extensions.Logging.Abstractions (2)
NullLoggerFactory.cs (1)
28return NullLogger.Instance;
NullLoggerProvider.cs (1)
23return NullLogger.Instance;
Templates.Blazor.Tests (5)
src\ProjectTemplates\Shared\AspNetProcess.cs (5)
140}, logger: NullLogger.Instance); 177}, logger: NullLogger.Instance); 248RetryHelper.RetryRequest(() => _httpClient.GetAsync(new Uri(ListeningUri, path)), logger: NullLogger.Instance); 251=> RetryHelper.RetryRequest(() => _httpClient.SendAsync(requestFactory()), logger: NullLogger.Instance); 267}, logger: NullLogger.Instance);
Templates.Blazor.WebAssembly.Auth.Tests (5)
src\ProjectTemplates\Shared\AspNetProcess.cs (5)
140}, logger: NullLogger.Instance); 177}, logger: NullLogger.Instance); 248RetryHelper.RetryRequest(() => _httpClient.GetAsync(new Uri(ListeningUri, path)), logger: NullLogger.Instance); 251=> RetryHelper.RetryRequest(() => _httpClient.SendAsync(requestFactory()), logger: NullLogger.Instance); 267}, logger: NullLogger.Instance);
Templates.Blazor.WebAssembly.Tests (5)
src\ProjectTemplates\Shared\AspNetProcess.cs (5)
140}, logger: NullLogger.Instance); 177}, logger: NullLogger.Instance); 248RetryHelper.RetryRequest(() => _httpClient.GetAsync(new Uri(ListeningUri, path)), logger: NullLogger.Instance); 251=> RetryHelper.RetryRequest(() => _httpClient.SendAsync(requestFactory()), logger: NullLogger.Instance); 267}, logger: NullLogger.Instance);
Templates.Mvc.Tests (5)
src\ProjectTemplates\Shared\AspNetProcess.cs (5)
140}, logger: NullLogger.Instance); 177}, logger: NullLogger.Instance); 248RetryHelper.RetryRequest(() => _httpClient.GetAsync(new Uri(ListeningUri, path)), logger: NullLogger.Instance); 251=> RetryHelper.RetryRequest(() => _httpClient.SendAsync(requestFactory()), logger: NullLogger.Instance); 267}, logger: NullLogger.Instance);
Templates.Tests (5)
src\ProjectTemplates\Shared\AspNetProcess.cs (5)
140}, logger: NullLogger.Instance); 177}, logger: NullLogger.Instance); 248RetryHelper.RetryRequest(() => _httpClient.GetAsync(new Uri(ListeningUri, path)), logger: NullLogger.Instance); 251=> RetryHelper.RetryRequest(() => _httpClient.SendAsync(requestFactory()), logger: NullLogger.Instance); 267}, logger: NullLogger.Instance);