38 writes to State
Aspire.Hosting (8)
Dashboard\DashboardLifecycleHook.cs (1)
131State = configuration.GetBool("DOTNET_ASPIRE_SHOW_DASHBOARD_RESOURCES") is true ? null : KnownResourceStates.Hidden
Dcp\ApplicationExecutor.cs (3)
599State = state, 655State = state, 673State = state,
ParameterResourceBuilderExtensions.cs (2)
100State = KnownResourceStates.Hidden, 115State = new ResourceStateSnapshot("Configuration missing", KnownResourceStateStyles.Error),
ResourceBuilderExtensions.cs (2)
607await rns.PublishUpdateAsync(builder.Resource, s => s with { State = KnownResourceStates.Waiting }).ConfigureAwait(false); 691await rns.PublishUpdateAsync(builder.Resource, s => s with { State = KnownResourceStates.Waiting }).ConfigureAwait(false);
Aspire.Hosting.Azure (4)
Provisioning\Provisioners\AzureProvisioner.cs (4)
126State = new("Running", KnownResourceStateStyles.Success) 134State = new("Missing subscription configuration", KnownResourceStateStyles.Error) 142State = new("Failed to Provision", KnownResourceStateStyles.Error) 155State = new("Starting", KnownResourceStateStyles.Info)
Aspire.Hosting.Dapr (2)
IDistributedApplicationBuilderExtensions.cs (1)
53State = KnownResourceStates.Hidden
IDistributedApplicationComponentBuilderExtensions.cs (1)
62State = KnownResourceStates.Hidden
Aspire.Hosting.Testing.Tests (1)
ResourceLoggerForwarderServiceTests.cs (1)
89await resourceNotificationService.PublishUpdateAsync(myresource, snapshot => snapshot with { State = "Running" });
Aspire.Hosting.Tests (19)
Dashboard\DashboardResourceTests.cs (1)
430await resourceNotificationService.PublishUpdateAsync(dashboard, "aspire-dashboard-0", s => s with { State = "Running" });
ResourceNotificationTests.cs (13)
163await notificationService.PublishUpdateAsync(resource1, snapshot => snapshot with { State = "SomeState" }); 179await notificationService.PublishUpdateAsync(resource1, snapshot => snapshot with { State = "SomeState" }); 193await notificationService.PublishUpdateAsync(resource1, snapshot => snapshot with { State = "SomeState" }); 211await notificationService.PublishUpdateAsync(resource1, snapshot => snapshot with { State = KnownResourceStates.Running }); 227await notificationService.PublishUpdateAsync(resource1, snapshot => snapshot with { State = "SomeOtherState" }); 242await notificationService.PublishUpdateAsync(resource1, snapshot => snapshot with { State = "SomeOtherState" }); 303await notificationService.PublishUpdateAsync(resource1, snapshot => snapshot with { State = "SomeState" }); 314await notificationService.PublishUpdateAsync(resource1, snapshot => snapshot with { State = "SomeState" }); 324await notificationService.PublishUpdateAsync(resource1, snapshot => snapshot with { State = "NewState" }); 334await notificationService.PublishUpdateAsync(resource1, snapshot => snapshot with { State = null }); 344await notificationService.PublishUpdateAsync(resource1, snapshot => snapshot with { State = "" }); 354await notificationService.PublishUpdateAsync(resource1, snapshot => snapshot with { State = " " }); 373await notificationService.PublishUpdateAsync(resource1, snapshot => snapshot with { State = "SomeState" });
WaitForTests.cs (5)
47State = KnownResourceStates.Running 88State = KnownResourceStates.Finished, 136State = KnownResourceStates.Finished, 184State = KnownResourceStates.Finished, 265State = KnownResourceStates.Finished
CustomResources.AppHost (2)
TestResource.cs (2)
18State = "Starting", 62State = new(randomState, randomStyle)
Stress.AppHost (2)
TestResource.cs (2)
18State = "Starting", 61State = randomState
16 references to State
Aspire.Hosting (11)
ApplicationModel\ResourceNotificationService.cs (4)
204if (_logger.IsEnabled(LogLevel.Debug) && newState.State?.Text is { Length: > 0 } newStateText && !string.IsNullOrWhiteSpace(newStateText)) 206var previousStateText = previousState?.State?.Text; 227newState.ResourceType, newState.CreationTimeStamp, newState.State?.Text, newState.State?.Style, newState.HealthStatus,
Dashboard\DashboardServiceData.cs (2)
44State = snapshot.State?.Text, 45StateStyle = snapshot.State?.Style
ResourceBuilderExtensions.cs (5)
645snapshot.State?.Text == KnownResourceStates.Running || 646snapshot.State?.Text == KnownResourceStates.Finished || 647snapshot.State?.Text == KnownResourceStates.Exited || 648snapshot.State?.Text == KnownResourceStates.FailedToStart; 722KnownResourceStates.TerminalStates.Contains(snapshot.State?.Text) ||
Aspire.Hosting.Tests (5)
AddParameterTests.cs (4)
34Assert.Equal("Hidden", state.State); 71Assert.NotNull(state.State); 72Assert.Equal("Configuration missing", state.State.Text); 73Assert.Equal(KnownResourceStateStyles.Error, state.State.Style);
Dashboard\DashboardResourceTests.cs (1)
49Assert.Equal("Hidden", initialSnapshot.InitialSnapshot.State);