3 instantiations of Interaction
Aspire.Hosting (3)
ApplicationModel\InteractionService.cs (3)
80var newState = new Interaction(title, message, options, new Interaction.MessageBoxInteractionInfo(intent: options.Intent ?? MessageIntent.None), cancellationToken); 148var newState = new Interaction(title, message, options, new Interaction.InputsInteractionInfo(inputList), cancellationToken); 175var newState = new Interaction(title, message, options, new Interaction.MessageBarInteractionInfo(intent: options.Intent ?? MessageIntent.None), cancellationToken);
28 references to Interaction
Aspire.Hosting (28)
ApplicationModel\InteractionService.cs (24)
24private Action<Interaction>? OnInteractionUpdated { get; set; } 80var newState = new Interaction(title, message, options, new Interaction.MessageBoxInteractionInfo(intent: options.Intent ?? MessageIntent.None), cancellationToken); 148var newState = new Interaction(title, message, options, new Interaction.InputsInteractionInfo(inputList), cancellationToken); 175var newState = new Interaction(title, message, options, new Interaction.MessageBarInteractionInfo(intent: options.Intent ?? MessageIntent.None), cancellationToken); 187internal List<Interaction> GetCurrentInteractions() 197var interactionState = (Interaction)newState!; 199interactionState.State = Interaction.InteractionState.Complete; 204private void AddInteractionUpdate(Interaction interactionUpdate) 210if (interactionUpdate.State == Interaction.InteractionState.Complete) 238internal void CompleteInteraction(int interactionId, Func<Interaction, InteractionCompletionState> createResult) 242if (_interactionCollection.TryGetValue(interactionId, out var interactionState)) 247interactionState.State = Interaction.InteractionState.Complete; 258internal async IAsyncEnumerable<Interaction> SubscribeInteractionUpdates([EnumeratorCancellation] CancellationToken cancellationToken = default) 260var channel = Channel.CreateUnbounded<Interaction>(); 262void WriteToChannel(Interaction resourceEvent) => 265List<Interaction> pendingInteractions; 274foreach (var interaction in pendingInteractions) 281await foreach (var item in channel.Reader.ReadAllAsync(cancellationToken).ConfigureAwait(false)) 298internal class InteractionCollection : KeyedCollection<int, Interaction> 300protected override int GetKeyForItem(Interaction item) => item.InteractionId;
Dashboard\DashboardService.cs (2)
10using static Aspire.Hosting.ApplicationModel.Interaction; 71await foreach (var interaction in updates.WithCancellation(cts.Token).ConfigureAwait(false))
Dashboard\DashboardServiceData.cs (2)
109internal IAsyncEnumerable<Interaction> SubscribeInteractionUpdates() 164var inputsInfo = (Interaction.InputsInteractionInfo)interaction.InteractionInfo;