136 references to Instance
aspire (2)
Certificates\CertificateGeneration\CertificateManager.cs (2)
102: this(NullLogger.Instance, subject, version, version) 1093public CertificateManagerLogger() : this(NullLogger.Instance) { }
Aspire.Cli.Tests (21)
Certificates\NativeCertificateToolRunnerTests.cs (1)
60: CertificateManager(NullLogger.Instance, CertificateManager.LocalhostHttpsDistinguishedName, version, version)
Projects\GuestRuntimeTests.cs (20)
41var runtime = new GuestRuntime(CreateTestSpec(), NullLogger.Instance); 49var runtime = new GuestRuntime(CreateTestSpec(), NullLogger.Instance); 57var runtime = new GuestRuntime(CreateTestSpec(), NullLogger.Instance); 72var runtime = new GuestRuntime(spec, NullLogger.Instance); 91var runtime = new GuestRuntime(spec, NullLogger.Instance); 106var runtime = new GuestRuntime(spec, NullLogger.Instance); 123var runtime = new GuestRuntime(spec, NullLogger.Instance); 138var runtime = new GuestRuntime(spec, NullLogger.Instance); 157var runtime = new GuestRuntime(spec, NullLogger.Instance); 178var runtime = new GuestRuntime(spec, NullLogger.Instance); 197var runtime = new GuestRuntime(spec, NullLogger.Instance); 216var runtime = new GuestRuntime(spec, NullLogger.Instance); 234var runtime = new GuestRuntime(spec, NullLogger.Instance); 254var runtime = new GuestRuntime(spec, NullLogger.Instance); 276var runtime = new GuestRuntime(spec, NullLogger.Instance); 284var runtime = new GuestRuntime(CreateTestSpec(), NullLogger.Instance); 293var runtime = new GuestRuntime(spec, NullLogger.Instance); 314NullLogger.Instance, 341NullLogger.Instance, 375NullLogger.Instance,
Aspire.Dashboard (1)
Otlp\Http\OtlpHttpEndpointsBuilder.cs (1)
130public static readonly MessageBindable<TMessage> Empty = new MessageBindable<TMessage>() { Logger = NullLogger.Instance };
Aspire.Dashboard.Components.Tests (5)
Controls\GenAIVisualizerDialogTests.cs (2)
30var context = new OtlpContext { Logger = NullLogger.Instance, Options = new() }; 58var context = new OtlpContext { Logger = NullLogger.Instance, Options = new() };
Controls\PlotlyChartTests.cs (1)
57var logger = NullLogger.Instance;
Controls\StructuredLogDetailsTests.cs (1)
25var context = new OtlpContext { Logger = NullLogger.Instance, Options = new() };
tests\Shared\Telemetry\TelemetryTestHelpers.cs (1)
303Logger = logger ?? NullLogger.Instance
Aspire.Dashboard.Tests (29)
Integration\StartupTests.cs (4)
325}, NullLogger.Instance); 381}, NullLogger.Instance); 462}, NullLogger.Instance); 512}, NullLogger.Instance);
Model\ApplicationsSelectHelpersTests.cs (6)
57var app = appVMs.GetResource(NullLogger.Instance, "multiple-instanceabc", canSelectGrouping: false, null!); 74var app = appVMs.GetResource(NullLogger.Instance, "singleton", canSelectGrouping: false, null!); 91var app = appVMs.GetResource(NullLogger.Instance, "singleton-", canSelectGrouping: false, null!); 112var app = appVMs.GetResource(NullLogger.Instance, name, canSelectGrouping: false, null!); 224var app = appVMs.GetResource(NullLogger.Instance, "app", canSelectGrouping: false, null!); 261var app = appVMs.GetResource(NullLogger.Instance, "app", canSelectGrouping: true, null!);
Model\ResourceViewModelTests.cs (1)
222return resource.ToViewModel(replicaIndex: 0, knownPropertyLookup ?? new MockKnownPropertyLookup(), NullLogger.Instance);
Model\SpanWaterfallViewModelTests.cs (7)
22var context = new OtlpContext { Logger = NullLogger.Instance, Options = new() }; 52var context = new OtlpContext { Logger = NullLogger.Instance, Options = new() }; 82var context = new OtlpContext { Logger = NullLogger.Instance, Options = new() }; 117var context = new OtlpContext { Logger = NullLogger.Instance, Options = new() }; 178var context = new OtlpContext { Logger = NullLogger.Instance, Options = new() }; 228var context = new OtlpContext { Logger = NullLogger.Instance, Options = new() }; 250var context = new OtlpContext { Logger = NullLogger.Instance, Options = new() };
Model\TraceHelpersTests.cs (5)
18var context = new OtlpContext { Logger = NullLogger.Instance, Options = new() }; 39var context = new OtlpContext { Logger = NullLogger.Instance, Options = new() }; 66var context = new OtlpContext { Logger = NullLogger.Instance, Options = new() }; 93var context = new OtlpContext { Logger = NullLogger.Instance, Options = new() }; 127var context = new OtlpContext { Logger = NullLogger.Instance, Options = new() };
TelemetryRepositoryTests\OtlpSpanTests.cs (5)
20var context = new OtlpContext { Logger = NullLogger.Instance, Options = new() }; 71var context = new OtlpContext { Logger = NullLogger.Instance, Options = new() }; 89var context = new OtlpContext { Logger = NullLogger.Instance, Options = new() }; 109var context = new OtlpContext { Logger = NullLogger.Instance, Options = new() }; 173var context = new OtlpContext { Logger = NullLogger.Instance, Options = new() };
tests\Shared\Telemetry\TelemetryTestHelpers.cs (1)
303Logger = logger ?? NullLogger.Instance
Aspire.Hosting (7)
ApplicationModel\CommandLineArgsCallbackAnnotation.cs (1)
83public ILogger Logger { get; init; } = NullLogger.Instance;
ApplicationModel\EnvironmentCallbackContext.cs (1)
47public ILogger Logger { get; set; } = NullLogger.Instance;
ApplicationModel\ResourceExtensions.cs (2)
198.BuildAsync(new(applicationOperation), NullLogger.Instance, CancellationToken.None).ConfigureAwait(false); 242.BuildAsync(new(applicationOperation), NullLogger.Instance, CancellationToken.None).ConfigureAwait(false);
ApplicationModel\ResourceUrlsCallbackContext.cs (1)
62public ILogger Logger { get; set; } = NullLogger.Instance;
Publishing\ManifestPublishingContext.cs (2)
536.BuildAsync(ExecutionContext, NullLogger.Instance, CancellationToken) 574.BuildAsync(ExecutionContext, NullLogger.Instance, CancellationToken)
Aspire.Hosting.DevTunnels.Tests (7)
DevTunnelAccessStatusTests.cs (7)
14Assert.Equal("Denied", status.LogAnonymousAccessPolicy(NullLogger.Instance)); 24Assert.Equal("Allowed", status.LogAnonymousAccessPolicy(NullLogger.Instance)); 34Assert.Equal("Allowed", status.LogAnonymousAccessPolicy(NullLogger.Instance)); 47Assert.Equal("Denied", status.LogAnonymousAccessPolicy(NullLogger.Instance)); 59Assert.Equal("Denied", status.LogAnonymousAccessPolicy(NullLogger.Instance)); 72Assert.Equal("Allowed", status.LogAnonymousAccessPolicy(NullLogger.Instance)); 85Assert.Equal("Denied", status.LogAnonymousAccessPolicy(NullLogger.Instance));
Aspire.Hosting.RemoteHost.Tests (2)
IntegrationLoadContextTests.cs (2)
17var alc = new IntegrationLoadContext([AppContext.BaseDirectory], NullLogger.Instance); 30var alc = new IntegrationLoadContext([AppContext.BaseDirectory], NullLogger.Instance);
Aspire.Hosting.Tests (33)
ExecutionConfigurationGathererTests.cs (25)
37await gatherer.GatherAsync(context, resource, NullLogger.Instance, builder.ExecutionContext); 60await gatherer.GatherAsync(context, resource, NullLogger.Instance, builder.ExecutionContext); 80await gatherer.GatherAsync(context, resource, NullLogger.Instance, builder.ExecutionContext); 104await gatherer.GatherAsync(context, resource, NullLogger.Instance, builder.ExecutionContext); 130await gatherer.GatherAsync(context, resource, NullLogger.Instance, builder.ExecutionContext); 153await gatherer.GatherAsync(context, resource, NullLogger.Instance, builder.ExecutionContext); 173await gatherer.GatherAsync(context, resource, NullLogger.Instance, builder.ExecutionContext); 197await gatherer.GatherAsync(context, resource, NullLogger.Instance, builder.ExecutionContext); 227await gatherer.GatherAsync(context, resource, NullLogger.Instance, builder.ExecutionContext); 255await gatherer.GatherAsync(context, resource, NullLogger.Instance, builder.ExecutionContext); 285await gatherer.GatherAsync(context, resource, NullLogger.Instance, builder.ExecutionContext); 313await gatherer.GatherAsync(context, resource, NullLogger.Instance, builder.ExecutionContext); 335await gatherer.GatherAsync(context, resource, NullLogger.Instance, builder.ExecutionContext); 361await gatherer.GatherAsync(context, resource, NullLogger.Instance, builder.ExecutionContext); 395await gatherer.GatherAsync(context, resource, NullLogger.Instance, builder.ExecutionContext); 425await gatherer.GatherAsync(context, resource, NullLogger.Instance, builder.ExecutionContext); 461await gatherer.GatherAsync(context, resource, NullLogger.Instance, builder.ExecutionContext); 521await gatherer.GatherAsync(context, resource, NullLogger.Instance, builder.ExecutionContext); 584await gatherer.GatherAsync(context, resource, NullLogger.Instance, builder.ExecutionContext); 619await gatherer.GatherAsync(context, resource, NullLogger.Instance, builder.ExecutionContext); 652await gatherer.GatherAsync(context, resource, NullLogger.Instance, builder.ExecutionContext); 682await gatherer.GatherAsync(context, resource, NullLogger.Instance, builder.ExecutionContext); 702await gatherer.GatherAsync(context, resource, NullLogger.Instance, builder.ExecutionContext); 725await gatherer.GatherAsync(context, resource, NullLogger.Instance, builder.ExecutionContext); 766await gatherer.GatherAsync(context, resource, NullLogger.Instance, builder.ExecutionContext);
Utils\ArgumentEvaluator.cs (1)
21.BuildAsync(executionContext, NullLogger.Instance, CancellationToken.None)
Utils\EnvironmentVariableEvaluator.cs (1)
23.BuildAsync(executionContext, NullLogger.Instance, CancellationToken.None);
VersionChecking\PackageUpdateHelpersTests.cs (5)
55var latestVersion = PackageUpdateHelpers.GetNewerVersion(NullLogger.Instance, new SemVersion(1), packages); 103var latestVersion = PackageUpdateHelpers.GetNewerVersion(NullLogger.Instance, new SemVersion(1), packages); 151var latestVersion = PackageUpdateHelpers.GetNewerVersion(NullLogger.Instance, new SemVersion(10, prerelease: ["dev"]), packages); 165var latestVersion = PackageUpdateHelpers.GetNewerVersion(NullLogger.Instance, new SemVersion(1), packages); 213var latestVersion = PackageUpdateHelpers.GetNewerVersion(NullLogger.Instance, new SemVersion(1), packages);
WithUrlsTests.cs (1)
84ILogger logger = NullLogger.Instance;
Aspire.RabbitMQ.Client.Tests (1)
AspireRabbitMQLoggingTests.cs (1)
246NullLogger.Instance.BeginScope(state);
Aspire.RabbitMQ.Client.v6.Tests (1)
tests\Aspire.RabbitMQ.Client.Tests\AspireRabbitMQLoggingTests.cs (1)
246NullLogger.Instance.BeginScope(state);
Aspire.TestUtilities (1)
TestLoggerFactory.cs (1)
20return NullLogger.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.Hosting (1)
Internal\WebHost.cs (1)
39private ILogger _logger = NullLogger.Instance;
Microsoft.AspNetCore.Http.Connections (1)
Internal\HttpConnectionContext.cs (1)
84_logger = logger ?? NullLogger.Instance;
Microsoft.AspNetCore.HttpLogging (2)
ResponseBufferingStream.cs (2)
33: base(Stream.Null, NullLogger.Instance) 70_logger = NullLogger.Instance;
Microsoft.AspNetCore.Rewrite (1)
RewriteContext.cs (1)
30public ILogger Logger { get; set; } = NullLogger.Instance;
Microsoft.Extensions.AI (1)
ChatCompletion\FunctionInvokingChatClient.cs (1)
91_logger = (ILogger?)loggerFactory?.CreateLogger<FunctionInvokingChatClient>() ?? NullLogger.Instance;
Microsoft.Extensions.AI.Tests (4)
ChatCompletion\LoggingChatClientTests.cs (1)
20Assert.Throws<ArgumentNullException>("innerClient", () => new LoggingChatClient(null!, NullLogger.Instance));
Embeddings\LoggingEmbeddingGeneratorTests.cs (1)
19Assert.Throws<ArgumentNullException>("innerGenerator", () => new LoggingEmbeddingGenerator<string, Embedding<float>>(null!, NullLogger.Instance));
Image\LoggingImageGeneratorTests.cs (1)
20Assert.Throws<ArgumentNullException>("innerGenerator", () => new LoggingImageGenerator(null!, NullLogger.Instance));
SpeechToText\LoggingSpeechToTextClientTests.cs (1)
22Assert.Throws<ArgumentNullException>("innerClient", () => new LoggingSpeechToTextClient(null!, NullLogger.Instance));
Microsoft.Extensions.Caching.Hybrid (1)
Internal\DefaultHybridCache.cs (1)
77_logger = services.GetService<ILoggerFactory>()?.CreateLogger(typeof(HybridCache)) ?? NullLogger.Instance;
Microsoft.Extensions.Caching.Hybrid.Tests (3)
BufferReleaseTests.cs (3)
250Assert.True(obj.TryGetValue(NullLogger.Instance, out var value)); 279Assert.True(obj.TryGetValue(NullLogger.Instance, out var value)); 289Assert.False(obj.TryGetValue(NullLogger.Instance, out _));
Microsoft.Extensions.Logging (1)
LoggerFactory.cs (1)
222if (loggerInformation.Logger != NullLogger.Instance)
Microsoft.Extensions.Logging.Abstractions (2)
NullLoggerFactory.cs (1)
28return NullLogger.Instance;
NullLoggerProvider.cs (1)
23return NullLogger.Instance;
Microsoft.Extensions.ServiceDiscovery.Tests (1)
ServiceEndpointResolverTests.cs (1)
39var watcher = new ServiceEndpointWatcher([], NullLogger.Instance, "foo", TimeProvider.System, Options.Options.Create(new ServiceDiscoveryOptions()));
Microsoft.Extensions.Telemetry (1)
Logging\ExtendedLoggerFactory.cs (1)
230if (loggerInformation.Logger != NullLogger.Instance)
Microsoft.Maui (3)
Hosting\MauiAppBuilder.cs (1)
187 public ILogger CreateLogger(string categoryName) => NullLogger.Instance;
Hosting\ServiceProviderExtensions.cs (2)
15 context.Services.GetService<ILoggerFactory>()?.CreateLogger(type) ?? NullLogger.Instance; 27 services.GetService<ILoggerFactory>()?.CreateLogger(type) ?? NullLogger.Instance;
Microsoft.Maui.Maps (2)
src\Core\src\Hosting\ServiceProviderExtensions.cs (2)
15 context.Services.GetService<ILoggerFactory>()?.CreateLogger(type) ?? NullLogger.Instance; 27 services.GetService<ILoggerFactory>()?.CreateLogger(type) ?? NullLogger.Instance;