10 references to TrySetCurrent
Aspire.Dashboard (2)
Components\Interactions\InteractionsProvider.cs (1)
222await InvokeAsync(() => shownInline = ParameterInteractionState.TrySetCurrent(vm));
Model\ParameterInteractionState.cs (1)
186if (Current is not null || _dialogInteraction is not { } dialogInteraction || !TrySetCurrent(dialogInteraction.Interaction))
Aspire.Dashboard.Tests (8)
Model\ParameterInteractionStateTests.cs (8)
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))); 65Assert.True(state.TrySetCurrent(interaction)); 82Assert.True(state.TrySetCurrent(interaction)); 101Assert.True(state.TrySetCurrent(interaction)); 117Assert.True(state.TrySetCurrent(CreateInputsInteraction(1, "first")));