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