20 references to DashboardClient
Aspire.Dashboard (20)
Components\Controls\ApplicationName.razor.cs (6)
22public required IDashboardClient DashboardClient { get; init; } 29if (DashboardClient.IsEnabled && !DashboardClient.WhenConnected.IsCompletedSuccessfully) 32await DashboardClient.WhenConnected.WaitAsync(_disposalCts.Token); 37_applicationName = string.Format(CultureInfo.InvariantCulture, Loc[ResourceName], DashboardClient.ApplicationName); 41_applicationName = DashboardClient.ApplicationName;
Components\Layout\MainLayout.razor.cs (1)
87if (!DashboardClient.IsEnabled)
Components\Layout\MobileNavMenu.razor.cs (2)
21public required IDashboardClient DashboardClient { get; init; } 37if (DashboardClient.IsEnabled)
Components\Pages\ConsoleLogs.razor.cs (4)
47public required IDashboardClient DashboardClient { get; init; } 130if (!DashboardClient.IsEnabled) 135var (snapshot, subscription) = await DashboardClient.SubscribeResourcesAsync(_resourceSubscriptionToken); 404var subscription = DashboardClient.SubscribeConsoleLogs(newConsoleLogsSubscription.Name, newConsoleLogsSubscription.CancellationToken);
Components\Pages\Resources.razor.cs (3)
33public required IDashboardClient DashboardClient { get; init; } 163if (DashboardClient.IsEnabled) 186var (snapshot, subscription) = await DashboardClient.SubscribeResourcesAsync(_watchTaskCancellationTokenSource.Token);
DashboardWebApplication.cs (1)
229builder.Services.TryAddScoped<IDashboardClient, DashboardClient>();
ResourceService\DashboardClient.cs (3)
54private readonly ILogger<DashboardClient> _logger; 89_logger = loggerFactory.CreateLogger<DashboardClient>(); 229throw new InvalidOperationException($"{nameof(DashboardClient)} is disabled. Check the {nameof(IsEnabled)} property before calling this.");