17 references to TrySetCurrent
Aspire.Dashboard (2)
Components\Interactions\InteractionsProvider.cs (1)
234await InvokeAsync(() => shownInline = ParameterInteractionState.TrySetCurrent(vm));
Model\ParameterInteractionState.cs (1)
225if (Current is not null || _dialogInteraction is not { } dialogInteraction || !TrySetCurrent(dialogInteraction.Interaction))
Aspire.Dashboard.Components.Tests (3)
Controls\MissingParametersPanelTests.cs (2)
82await cut.InvokeAsync(() => Assert.True(Services.GetRequiredService<ParameterInteractionState>().TrySetCurrent(new InteractionsInputsDialogViewModel 117await cut.InvokeAsync(() => Assert.True(Services.GetRequiredService<ParameterInteractionState>().TrySetCurrent(new InteractionsInputsDialogViewModel
Interactions\InteractionsProviderTests.cs (1)
502Assert.True(state.TrySetCurrent(prompt));
Aspire.Dashboard.Tests (12)
Model\ParameterInteractionStateTests.cs (12)
20Assert.False(state.TrySetCurrent(CreateInputsInteraction(1, "first"))); 32Assert.True(state.TrySetCurrent(interaction)); 44Assert.False(state.TrySetCurrent(CreateInputsInteraction(1, "first", "second"))); 55Assert.False(state.TrySetCurrent(CreateInputsInteraction(1, ParameterInteractionState.SaveToUserSecretsInputName))); 70Assert.False(state.TrySetCurrent(interaction)); 73Assert.True(state.TrySetCurrent(interaction)); 86Assert.False(state.TrySetCurrent(CreateInputsInteraction(1, inputsDialog))); 99Assert.True(state.TrySetCurrent(CreateInputsInteraction(1, inputsDialog))); 109Assert.True(state.TrySetCurrent(interaction)); 126Assert.True(state.TrySetCurrent(interaction)); 145Assert.True(state.TrySetCurrent(interaction)); 161Assert.True(state.TrySetCurrent(CreateInputsInteraction(1, "first")));