15 references to TryGetCurrentState
Aspire.Hosting (7)
ApplicationModel\ResourceCommandService.cs (1)
47
if (!_resourceNotificationService.
TryGetCurrentState
(resourceId, out var resourceEvent))
Ats\NotificationExports.cs (1)
68
if (notificationService.
TryGetCurrentState
(resourceName, out var resourceEvent))
DistributedApplication.cs (2)
612
app.ResourceNotifications.
TryGetCurrentState
(instance.Name, out var resourceEvent);
618
app.ResourceNotifications.
TryGetCurrentState
(resource.Name, out var resourceEvent);
Exec\ExecResourceManager.cs (1)
127
if (!_resourceNotificationService.
TryGetCurrentState
(dcpExecResourceName, out var resourceEvent))
Orchestrator\ApplicationOrchestrator.cs (2)
495
if (_notificationService.
TryGetCurrentState
(context.DcpResourceName, out var previousResourceEvent))
516
if (_notificationService.
TryGetCurrentState
(context.DcpResourceName, out var currentResourceEvent))
Aspire.Hosting.DotnetTool.Tests (2)
DotnetToolFunctionalTests.cs.cs (2)
28
Assert.True(app.ResourceNotifications.
TryGetCurrentState
(resource.Resource.Name, out var resourceState));
50
Assert.True(app.ResourceNotifications.
TryGetCurrentState
(resource.Resource.Name, out var resourceState));
Aspire.Hosting.Tests (6)
Orchestrator\ApplicationOrchestratorTests.cs (6)
630
var parentState = resourceNotificationService.
TryGetCurrentState
("parent-container-dcp", out var parentEvent) ? parentEvent.Snapshot.State?.Text : null;
631
var childContainerState = resourceNotificationService.
TryGetCurrentState
(childContainer.Resource.Name, out var childContainerEvent) ? childContainerEvent.Snapshot.State?.Text : null;
632
var customChildState = resourceNotificationService.
TryGetCurrentState
(customChild.Resource.Name, out var customChildEvent) ? customChildEvent.Snapshot.State?.Text : null;
677
var parentState = resourceNotificationService.
TryGetCurrentState
("parent-container-dcp", out var parentEvent) ? parentEvent.Snapshot.State?.Text : null;
678
var childProjectState = resourceNotificationService.
TryGetCurrentState
(childProject.Resource.Name, out var childProjectEvent) ? childProjectEvent.Snapshot.State?.Text : null;
679
var customChildState = resourceNotificationService.
TryGetCurrentState
(customChild.Resource.Name, out var customChildEvent) ? customChildEvent.Snapshot.State?.Text : null;