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