205 instantiations of ResourceStateSnapshot
Aspire.Hosting (15)
ApplicationModel\CommandsConfigurationExtensions.cs (7)
238: s with { State = new ResourceStateSnapshot(KnownResourceStates.Building, KnownResourceStateStyles.Info) } 283State = new ResourceStateSnapshot(KnownResourceStates.FailedToStart, KnownResourceStateStyles.Error) 297State = new ResourceStateSnapshot(KnownResourceStates.FailedToStart, KnownResourceStateStyles.Error) 330State = new ResourceStateSnapshot(KnownResourceStates.Starting, KnownResourceStateStyles.Info) 348State = new ResourceStateSnapshot(priorState, KnownResourceStateStyles.Info) 363State = new ResourceStateSnapshot(KnownResourceStates.FailedToStart, KnownResourceStateStyles.Error) 375State = new ResourceStateSnapshot(KnownResourceStates.Finished, KnownResourceStateStyles.Info)
ApplicationModel\CustomResourceSnapshot.cs (1)
329s is null ? null : new(Text: s, Style: null);
Ats\NotificationExports.cs (1)
103snapshot = snapshot with { State = new ResourceStateSnapshot(state, stateStyle) };
Dcp\DcpExecutor.cs (2)
1006State = new ResourceStateSnapshot(KnownResourceStates.NotStarted, null) 1027State = new ResourceStateSnapshot(KnownResourceStates.NotStarted, null)
Orchestrator\ApplicationOrchestrator.cs (2)
606? new ResourceStateSnapshot(KnownResourceStates.FailedToStart, KnownResourceStateStyles.Error) 607: new ResourceStateSnapshot(KnownResourceStates.FailedToStart, null);
Orchestrator\ParameterProcessor.cs (2)
197await UpdateParameterStateAsync(parameterResource, ex.Message, new(stateText, stateStyle)).ConfigureAwait(false); 480await UpdateParameterStateAsync(parameterResource, "Parameter value has been deleted", new(KnownResourceStates.ValueMissing, KnownResourceStateStyles.Warn)).ConfigureAwait(false);
Aspire.Hosting.Azure (35)
AzureProvisioningController.cs (22)
1033new ResourceStateSnapshot(StartingState, KnownResourceStateStyles.Info), 1055State = new(StartingState, KnownResourceStateStyles.Info), 1076? new ResourceStateSnapshot(AzureProvisioningStrings.ResourceStateFailedToProvision, KnownResourceStateStyles.Error) 1077: new ResourceStateSnapshot(KnownResourceStates.Running, KnownResourceStateStyles.Success), 1819new ResourceStateSnapshot(DeletingState, KnownResourceStateStyles.Info), 1834new ResourceStateSnapshot(AzureProvisioningStrings.ResourceStateFailedToDelete, KnownResourceStateStyles.Error), 1909State = new(ChangingLocationState, KnownResourceStateStyles.Info) 2056State = new(CancelingState, KnownResourceStateStyles.Info) 2073State = new(AzureProvisioningStrings.ResourceStateCanceled, KnownResourceStateStyles.Info) 2097State = new(DeletingState, KnownResourceStateStyles.Info) 2129State = new(AzureProvisioningStrings.ResourceStateCanceled, KnownResourceStateStyles.Info) 2141State = new(AzureProvisioningStrings.ResourceStateFailedToDelete, KnownResourceStateStyles.Error) 2197State = new(MissingInAzureState, KnownResourceStateStyles.Error) 2208new ResourceStateSnapshot(DriftedState, KnownResourceStateStyles.Error), 3726State = new(KnownResourceStates.Running, KnownResourceStateStyles.Success) 3734State = new(AzureProvisioningStrings.ResourceStateMissingSubscriptionConfiguration, KnownResourceStateStyles.Error) 3741State = new(AzureProvisioningStrings.ResourceStateCanceled, KnownResourceStateStyles.Info) 3754State = new(AzureProvisioningStrings.ResourceStateFailedToProvision, KnownResourceStateStyles.Error), 3775State = new(AzureProvisioningStrings.ResourceStateFailedToProvision, KnownResourceStateStyles.Error), 3823State = new(AzureProvisioningStrings.ResourceStateCanceled, KnownResourceStateStyles.Info) 3872State = new("Failed to Provision Roles", KnownResourceStateStyles.Error) 4135new ResourceStateSnapshot(state, state == KnownResourceStates.NotStarted ? KnownResourceStateStyles.Info : KnownResourceStateStyles.Success),
Provisioning\Provisioners\BicepProvisioner.cs (13)
143State = new(AzureProvisioningController.ProvisionedState, KnownResourceStateStyles.Success), 331State = new(AzureProvisioningController.WaitingForDeploymentState, KnownResourceStateStyles.Info), 445State = new(state, KnownResourceStateStyles.Error) 532State = new(AzureProvisioningController.StartingState, KnownResourceStateStyles.Info), 555State = new(AzureProvisioningController.CompilingArmTemplateState, KnownResourceStateStyles.Info) 584State = new(AzureProvisioningController.CreatingArmDeploymentState, KnownResourceStateStyles.Info), 655State = new(AzureProvisioningStrings.ResourceStateAzureDeploymentFailed, KnownResourceStateStyles.Error), 688State = new(AzureProvisioningController.WaitingForDeploymentState, KnownResourceStateStyles.Info), 829State = new(AzureProvisioningController.ProvisionedState, KnownResourceStateStyles.Success), 1228return new(AzureProvisioningStrings.ResourceStateAzureDeploymentFailed, KnownResourceStateStyles.Error); 1238return new(runningText, KnownResourceStateStyles.Info); 1243return new( 1248return new(AzureProvisioningController.WaitingForDeploymentState, KnownResourceStateStyles.Info);
Aspire.Hosting.Azure.Tests (8)
AzureEnvironmentResourceExtensionsTests.cs (8)
1361await notifications.PublishUpdateAsync(storage.Resource, state => state with { State = new("Waiting for Deployment", KnownResourceStateStyles.Info) }); 1416await notifications.PublishUpdateAsync(storage.Resource, state => state with { State = new("Creating ARM Deployment", KnownResourceStateStyles.Info) }); 1493await notifications.PublishUpdateAsync(storage.Resource, state => state with { State = new(AzureProvisioningController.WaitingForDeploymentState, KnownResourceStateStyles.Info) }); 1784await notifications.PublishUpdateAsync(storage.Resource, state => state with { State = new("Failed to Provision", KnownResourceStateStyles.Error) }); 1879await notifications.PublishUpdateAsync(keyVault.Resource, state => state with { State = new("Failed to Provision", KnownResourceStateStyles.Error) }); 2775await notifications.PublishUpdateAsync(storage.Resource, state => state with { State = new("Failed to Provision", KnownResourceStateStyles.Error) }); 3912await notifications.PublishUpdateAsync(keyVault.Resource, state => state with { State = new("Canceled", KnownResourceStateStyles.Info) }); 3992await notifications.PublishUpdateAsync(keyVault.Resource, state => state with { State = new("Canceled", KnownResourceStateStyles.Info) });
Aspire.Hosting.Browsers (1)
BrowserLogsSessionManager.cs (1)
390State = new ResourceStateSnapshot(stateText, stateStyle),
Aspire.Hosting.Browsers.Tests (34)
BrowserLogsBuilderExtensionsTests.cs (33)
37State = new ResourceStateSnapshot(KnownResourceStates.Running, KnownResourceStateStyles.Success), 91State = new ResourceStateSnapshot(KnownResourceStates.Running, KnownResourceStateStyles.Success), 146State = new ResourceStateSnapshot(KnownResourceStates.Running, KnownResourceStateStyles.Success), 182State = new ResourceStateSnapshot(KnownResourceStates.Running, KnownResourceStateStyles.Success), 215State = new ResourceStateSnapshot(KnownResourceStates.Running, KnownResourceStateStyles.Success), 292State = new ResourceStateSnapshot(KnownResourceStates.Running, KnownResourceStateStyles.Success), 319State = new ResourceStateSnapshot(KnownResourceStates.Running, KnownResourceStateStyles.Success), 343State = new ResourceStateSnapshot(KnownResourceStates.Running, KnownResourceStateStyles.Success), 369State = new ResourceStateSnapshot(KnownResourceStates.Running, KnownResourceStateStyles.Success), 391State = new ResourceStateSnapshot(KnownResourceStates.Running, KnownResourceStateStyles.Success), 412State = new ResourceStateSnapshot(KnownResourceStates.Running, KnownResourceStateStyles.Success), 436State = new ResourceStateSnapshot(KnownResourceStates.Running, KnownResourceStateStyles.Success), 472State = new ResourceStateSnapshot(KnownResourceStates.Running, KnownResourceStateStyles.Success), 515State = new ResourceStateSnapshot(KnownResourceStates.Running, KnownResourceStateStyles.Success), 555State = new ResourceStateSnapshot(KnownResourceStates.Running, KnownResourceStateStyles.Success), 594State = new ResourceStateSnapshot(KnownResourceStates.Running, KnownResourceStateStyles.Success), 639State = new ResourceStateSnapshot(KnownResourceStates.Running, KnownResourceStateStyles.Success), 679State = new ResourceStateSnapshot(KnownResourceStates.Running, KnownResourceStateStyles.Success), 689State = new ResourceStateSnapshot(KnownResourceStates.Running, KnownResourceStateStyles.Success), 729State = new ResourceStateSnapshot(KnownResourceStates.Running, KnownResourceStateStyles.Success), 783State = new ResourceStateSnapshot(KnownResourceStates.Running, KnownResourceStateStyles.Success), 827State = new ResourceStateSnapshot(KnownResourceStates.Running, KnownResourceStateStyles.Success), 867State = new ResourceStateSnapshot(KnownResourceStates.Running, KnownResourceStateStyles.Success), 940State = new ResourceStateSnapshot(KnownResourceStates.Running, KnownResourceStateStyles.Success), 996State = new ResourceStateSnapshot(KnownResourceStates.Running, KnownResourceStateStyles.Success), 1081State = new ResourceStateSnapshot(KnownResourceStates.Running, KnownResourceStateStyles.Success), 1154State = new ResourceStateSnapshot(KnownResourceStates.Running, KnownResourceStateStyles.Success), 1210State = new ResourceStateSnapshot(KnownResourceStates.Running, KnownResourceStateStyles.Success), 1270State = new ResourceStateSnapshot(KnownResourceStates.Running, KnownResourceStateStyles.Success), 1306State = new ResourceStateSnapshot(KnownResourceStates.Running, KnownResourceStateStyles.Success), 1390State = new ResourceStateSnapshot(KnownResourceStates.Running, KnownResourceStateStyles.Success), 1525State = new ResourceStateSnapshot(KnownResourceStates.Running, KnownResourceStateStyles.Success), 1593State = new ResourceStateSnapshot(KnownResourceStates.Running, KnownResourceStateStyles.Success),
src\Aspire.Hosting.Browsers\BrowserLogsSessionManager.cs (1)
390State = new ResourceStateSnapshot(stateText, stateStyle),
Aspire.Hosting.EntityFrameworkCore (2)
EFResourceBuilderExtensions.cs (2)
281State = new ResourceStateSnapshot(KnownResourceStates.NotStarted, KnownResourceStateStyles.Info) 987State = new ResourceStateSnapshot(state, style)
Aspire.Hosting.EntityFrameworkCore.Tests (4)
EFMigrationCommandsTests.cs (4)
202State = new ResourceStateSnapshot(KnownResourceStates.Finished, KnownResourceStateStyles.Info) 232State = new ResourceStateSnapshot(KnownResourceStates.Running, KnownResourceStateStyles.Info) 262State = new ResourceStateSnapshot(KnownResourceStates.Running, KnownResourceStateStyles.Info) 282State = new ResourceStateSnapshot(KnownResourceStates.Finished, KnownResourceStateStyles.Info)
Aspire.Hosting.Foundry (16)
FoundryExtensions.cs (5)
351State = new ResourceStateSnapshot(KnownResourceStates.Starting, KnownResourceStateStyles.Info) 411State = new ResourceStateSnapshot(manageModel ? $"Preparing model {model}" : $"Using existing model {model}", KnownResourceStateStyles.Info), 430State = new ResourceStateSnapshot("Loading model", KnownResourceStateStyles.Info) 467State = new ResourceStateSnapshot($"Downloading model {model}", KnownResourceStateStyles.Info) 478State = new ResourceStateSnapshot($"Downloading model {model}: {progress:F2}%", KnownResourceStateStyles.Info)
PromptAgent\AzurePromptAgentResource.cs (6)
333State = new("Waiting", KnownResourceStateStyles.Info) 339State = new("Waiting for project", KnownResourceStateStyles.Info) 346State = new("Deploying agent", KnownResourceStateStyles.Info) 360State = new("Running", KnownResourceStateStyles.Success) 369State = new("Running", KnownResourceStateStyles.Success), 382State = new("Failed to deploy", KnownResourceStateStyles.Error)
Toolbox\FoundryToolboxResource.cs (5)
335State = new("Waiting for dependencies", KnownResourceStateStyles.Info) 345State = new( 357State = new("Waiting for Toolbox tools", KnownResourceStateStyles.Info) 382State = new(KnownResourceStates.Running, KnownResourceStateStyles.Success), 406State = new(KnownResourceStates.FailedToStart, KnownResourceStateStyles.Error)
Aspire.Hosting.Maui (6)
Lifecycle\MauiBuildQueueEventSubscriber.cs (3)
36private static readonly ResourceStateSnapshot s_queuedState = new("Queued", KnownResourceStateStyles.Info); 37private static readonly ResourceStateSnapshot s_buildingState = new("Building", KnownResourceStateStyles.Info); 38private static readonly ResourceStateSnapshot s_cancelledState = new(KnownResourceStates.Exited, KnownResourceStateStyles.Warn);
Lifecycle\UnsupportedPlatformEventSubscriber.cs (1)
36State = new ResourceStateSnapshot($"Unsupported: {annotation.Reason}", KnownResourceStateStyles.Warn)
Utilities\MauiAndroidEnvironmentAnnotation.cs (1)
109State = new ResourceStateSnapshot("Failed to configure environment", KnownResourceStateStyles.Error)
Utilities\MauiiOSEnvironmentAnnotation.cs (1)
109State = new ResourceStateSnapshot("Failed to configure environment", KnownResourceStateStyles.Error)
Aspire.Hosting.Maui.Tests (7)
MauiBuildQueueTests.cs (7)
582State = new ResourceStateSnapshot(KnownResourceStates.FailedToStart, KnownResourceStateStyles.Error) 649State = new ResourceStateSnapshot("Building", KnownResourceStateStyles.Info) 670State = new ResourceStateSnapshot(KnownResourceStates.Running, KnownResourceStateStyles.Success) 719State = new ResourceStateSnapshot("Building", KnownResourceStateStyles.Info) 737State = new ResourceStateSnapshot(KnownResourceStates.Running, KnownResourceStateStyles.Success) 745State = new ResourceStateSnapshot("Terminated", KnownResourceStateStyles.Success) 917State = new ResourceStateSnapshot("Terminated", KnownResourceStateStyles.Success)
Aspire.Hosting.MongoDB.Tests (1)
tests\Shared\ContainerReplCommandTestBase.cs (1)
59State = state is null ? null : new ResourceStateSnapshot(state, null),
Aspire.Hosting.MySql.Tests (1)
tests\Shared\ContainerReplCommandTestBase.cs (1)
59State = state is null ? null : new ResourceStateSnapshot(state, null),
Aspire.Hosting.PostgreSQL.Tests (1)
tests\Shared\ContainerReplCommandTestBase.cs (1)
59State = state is null ? null : new ResourceStateSnapshot(state, null),
Aspire.Hosting.Redis.Tests (1)
tests\Shared\ContainerReplCommandTestBase.cs (1)
59State = state is null ? null : new ResourceStateSnapshot(state, null),
Aspire.Hosting.SqlServer.Tests (1)
tests\Shared\ContainerReplCommandTestBase.cs (1)
59State = state is null ? null : new ResourceStateSnapshot(state, null),
Aspire.Hosting.Tests (63)
Backchannel\AppHostBackchannelTests.cs (1)
81State = new ("Running", null),
Backchannel\AuxiliaryBackchannelRpcTargetTests.cs (26)
136State = new ResourceStateSnapshot("Running", KnownResourceStateStyles.Success) 140State = new ResourceStateSnapshot("Running", KnownResourceStateStyles.Success) 183State = new ResourceStateSnapshot("Running", KnownResourceStateStyles.Success), 348State = new ResourceStateSnapshot("Running", KnownResourceStateStyles.Success), 405State = new ResourceStateSnapshot("Running", KnownResourceStateStyles.Success), 454State = new ResourceStateSnapshot("Running", KnownResourceStateStyles.Success), 516State = new ResourceStateSnapshot("Running", KnownResourceStateStyles.Success), 545State = new ResourceStateSnapshot("Running", KnownResourceStateStyles.Success), 592State = new ResourceStateSnapshot("Running", KnownResourceStateStyles.Success), 619State = new ResourceStateSnapshot("Stopping", KnownResourceStateStyles.Info), 662State = new ResourceStateSnapshot("Running", KnownResourceStateStyles.Success), 690State = new ResourceStateSnapshot("Running", KnownResourceStateStyles.Success), 733State = new ResourceStateSnapshot("Running", KnownResourceStateStyles.Success), 758State = new ResourceStateSnapshot("Running", KnownResourceStateStyles.Success), 822State = new ResourceStateSnapshot("Running", KnownResourceStateStyles.Success) 826State = new ResourceStateSnapshot("Running", KnownResourceStateStyles.Success), 882State = new ResourceStateSnapshot("Running", KnownResourceStateStyles.Success), 1035State = new ResourceStateSnapshot("Running", KnownResourceStateStyles.Success), 1098State = new ResourceStateSnapshot("Running", KnownResourceStateStyles.Success), 1114State = new ResourceStateSnapshot("Running", KnownResourceStateStyles.Success), 1151State = new ResourceStateSnapshot("Running", KnownResourceStateStyles.Success), 1223State = new ResourceStateSnapshot("Failed to Provision Roles", KnownResourceStateStyles.Error) 1358State = new ResourceStateSnapshot("Running", null) 1394State = new ResourceStateSnapshot("Running", null) 1440State = new ResourceStateSnapshot(KnownResourceStates.Running, KnownResourceStateStyles.Success) 1479State = new ResourceStateSnapshot(KnownResourceStates.Running, KnownResourceStateStyles.Success)
Dashboard\DashboardServiceDataTerminalTests.cs (5)
35await notifications.PublishUpdateAsync(resource, s => s with { State = new ResourceStateSnapshot("Running", null) }).DefaultTimeout(); 50await notifications.PublishUpdateAsync(resource, s => s with { State = new ResourceStateSnapshot("Running", null) }).DefaultTimeout(); 87await notifications.PublishUpdateAsync(resource, "myapp-ccc", s => s with { State = new ResourceStateSnapshot("Running", null) }).DefaultTimeout(); 110await notifications.PublishUpdateAsync(resource, s => s with { State = new ResourceStateSnapshot("Running", null) }).DefaultTimeout(); 135await notifications.PublishUpdateAsync(resource, "myapp-unknown", s => s with { State = new ResourceStateSnapshot("Running", null) }).DefaultTimeout();
Dashboard\DashboardServiceTests.cs (4)
212return s with { State = new ResourceStateSnapshot("Starting", null) }; 317return s with { State = new ResourceStateSnapshot("Running", null) }; 376return s with { State = new ResourceStateSnapshot("Running", null) }; 439return s with { State = new ResourceStateSnapshot("Running", null) };
Health\ResourceHealthCheckServiceTests.cs (19)
35State = new ResourceStateSnapshot(KnownResourceStates.Starting, null) 43State = new ResourceStateSnapshot(KnownResourceStates.Running, null) 75State = new ResourceStateSnapshot(KnownResourceStates.Starting, null) 83State = new ResourceStateSnapshot(KnownResourceStates.Running, null) 118State = new ResourceStateSnapshot(KnownResourceStates.Starting, null) 126State = new ResourceStateSnapshot(KnownResourceStates.Running, null) 165State = new ResourceStateSnapshot(KnownResourceStates.Running, null) 180State = new ResourceStateSnapshot(KnownResourceStates.Exited, null) 188State = new ResourceStateSnapshot(KnownResourceStates.Running, null), 351State = new ResourceStateSnapshot(KnownResourceStates.Running, null) 382State = new ResourceStateSnapshot(KnownResourceStates.Running, null) 444State = new ResourceStateSnapshot(KnownResourceStates.Running, null) 489State = new ResourceStateSnapshot(KnownResourceStates.Running, null) 540State = new ResourceStateSnapshot(KnownResourceStates.Running, null) 548State = new ResourceStateSnapshot(KnownResourceStates.Running, null) 584State = new ResourceStateSnapshot(KnownResourceStates.Starting, null) 592State = new ResourceStateSnapshot(KnownResourceStates.Running, null) 630State = new ResourceStateSnapshot(KnownResourceStates.Starting, null) 638State = new ResourceStateSnapshot(KnownResourceStates.Running, null)
Lifecycle\TerminalHostFailureDiagnosticServiceTests.cs (6)
34State = new ResourceStateSnapshot(KnownResourceStates.FailedToStart, null), 73State = new ResourceStateSnapshot(KnownResourceStates.Exited, null), 104State = new ResourceStateSnapshot(KnownResourceStates.Exited, null), 145State = new ResourceStateSnapshot(KnownResourceStates.FailedToStart, null), 183State = new ResourceStateSnapshot(KnownResourceStates.FailedToStart, null), 198State = new ResourceStateSnapshot(KnownResourceStates.FailedToStart, null),
Orchestrator\ApplicationOrchestratorTests.cs (1)
69snapshot => snapshot with { State = state is not null ? new(state, null) : snapshot.State, ExitCode = state == KnownResourceStates.Finished ? 0 : null }));
ResourceCommandAnnotationTests.cs (1)
228State = new ResourceStateSnapshot(state, null),
Aspire.Hosting.Valkey.Tests (1)
tests\Shared\ContainerReplCommandTestBase.cs (1)
59State = state is null ? null : new ResourceStateSnapshot(state, null),
CustomResources.AppHost (7)
TalkingClockResource.cs (6)
101s => s with { State = new ResourceStateSnapshot("Tick", KnownResourceStateStyles.Success) }); 103s => s with { State = new ResourceStateSnapshot("On", KnownResourceStateStyles.Success) }); 105s => s with { State = new ResourceStateSnapshot("Off", KnownResourceStateStyles.Info) }); 111s => s with { State = new ResourceStateSnapshot("Tock", KnownResourceStateStyles.Success) }); 113s => s with { State = new ResourceStateSnapshot("Off", KnownResourceStateStyles.Info) }); 115s => s with { State = new ResourceStateSnapshot("On", KnownResourceStateStyles.Success) });
TestResource.cs (1)
67State = new(randomState, randomStyle)
HealthChecksSandbox.AppHost (1)
AppHost.cs (1)
137state => state with { State = new("Running", "success") });
14 references to ResourceStateSnapshot
Aspire.Hosting (5)
ApplicationModel\CustomResourceSnapshot.cs (3)
20private readonly ResourceStateSnapshot? _state; 55public ResourceStateSnapshot? State 328public static implicit operator ResourceStateSnapshot?(string? s) =>
Orchestrator\ApplicationOrchestrator.cs (1)
605var stateSnapshot = context.ErrorMessage is not null
Orchestrator\ParameterProcessor.cs (1)
698private async Task UpdateParameterStateAsync(ParameterResource parameterResource, string value, ResourceStateSnapshot? state)
Aspire.Hosting.Azure (5)
AzureProvisioningController.cs (4)
3790if (TryGetPublishedTerminalDeploymentState(resource.Resource.Name, out var publishedTerminalState) || 3835private bool TryGetPublishedTerminalDeploymentState(string resourceName, out ResourceStateSnapshot state) 4141ResourceStateSnapshot state, 4153ResourceStateSnapshot state,
Provisioning\Provisioners\BicepProvisioner.cs (1)
1224private static ResourceStateSnapshot CreateDeploymentOperationState(AzureDeploymentOperationSummary summary)
Aspire.Hosting.Blazor (1)
BlazorGatewayExtensions.cs (1)
520var gatewayState = resourceEvent.Snapshot.State;
Aspire.Hosting.Maui (3)
Lifecycle\MauiBuildQueueEventSubscriber.cs (3)
36private static readonly ResourceStateSnapshot s_queuedState = new("Queued", KnownResourceStateStyles.Info); 37private static readonly ResourceStateSnapshot s_buildingState = new("Building", KnownResourceStateStyles.Info); 38private static readonly ResourceStateSnapshot s_cancelledState = new(KnownResourceStates.Exited, KnownResourceStateStyles.Warn);