3 writes to Current
Aspire.Dashboard (3)
Model\ParameterInteractionState.cs (3)
98Current = current; 150Current = null; 218Current = null;
30 references to Current
Aspire.Dashboard (14)
Components\Controls\MissingParametersPanel.razor.cs (1)
94ParameterInteractionState.Current is { } current && _registration?.Shows(current) == true ? current : null;
Components\Interactions\InteractionsProvider.cs (3)
405await InvokeAsync(() => shownInline = ParameterInteractionState.Current?.Interaction.InteractionId == interactionId).ConfigureAwait(false); 450if (ParameterInteractionState.Current?.Interaction.InteractionId == item.InteractionId) 452await ParameterInteractionState.Current.UpdateInteractionAsync(item);
Model\ParameterInteractionState.cs (10)
36/// Raised when <see cref="Current"/> or its inputs change. 41/// Raised when no mounted form can show <see cref="Current"/> anymore, for example after navigating away from it. 42/// <see cref="Current"/> is cleared first, and the handler shows the interaction another way. 72if (Current is not null || _notification is not { AcceptRequested: false } notification || !panel.Shows(notification.ParameterNames)) 88if (Current is not null && Current.Interaction.InteractionId != current.Interaction.InteractionId) 147if (Current?.Interaction.InteractionId == interactionId) 149Current.OnInteractionUpdated = null; 206if (Current is not { } current) 225if (Current is not null || _dialogInteraction is not { } dialogInteraction || !TrySetCurrent(dialogInteraction.Interaction))
Aspire.Dashboard.Components.Tests (5)
Interactions\InteractionsProviderTests.cs (5)
439() => state.Current?.Interaction.InteractionId == 1, 451Assert.Null(state.Current); 491() => state.Current?.Interaction.InteractionId == 1, 493var prompt = state.Current!; 509Assert.Equal(1, state.Current?.Interaction.InteractionId);
Aspire.Dashboard.Tests (11)
Model\ParameterInteractionStateTests.cs (11)
21Assert.Null(state.Current); 33Assert.Same(interaction, state.Current); 45Assert.Null(state.Current); 115Assert.Null(state.Current); 132Assert.Null(state.Current); 151Assert.Same(interaction, state.Current); 168Assert.Null(state.Current); 183Assert.Null(state.Current); 189Assert.Same(interaction, state.Current); 207Assert.Null(state.Current); 226Assert.Null(state.Current);