20 references to DashboardClient
Aspire.Dashboard (20)
Components\Controls\ApplicationName.razor.cs (6)
25public required IDashboardClient DashboardClient { get; init; } 32if (DashboardClient.IsEnabled && !DashboardClient.WhenConnected.IsCompletedSuccessfully) 35await DashboardClient.WhenConnected.WaitAsync(_disposalCts.Token); 45applicationName = string.Format(CultureInfo.InvariantCulture, Loc[ResourceName], DashboardClient.ApplicationName); 49applicationName = 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; } 136if (!DashboardClient.IsEnabled) 141var (snapshot, subscription) = await DashboardClient.SubscribeResourcesAsync(_resourceSubscriptionToken); 413var subscription = DashboardClient.SubscribeConsoleLogs(newConsoleLogsSubscription.Name, newConsoleLogsSubscription.CancellationToken);
Components\Pages\Resources.razor.cs (3)
34public required IDashboardClient DashboardClient { get; init; } 143if (DashboardClient.IsEnabled) 168var (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.");