1 write to InteractionId
Aspire.Hosting (1)
InteractionService.cs (1)
766
InteractionId
= Interlocked.Increment(ref s_nextInteractionId);
79 references to InteractionId
Aspire.Hosting (15)
Dashboard\DashboardService.cs (1)
107
change.InteractionId = interaction.
InteractionId
;
Dashboard\DashboardServiceData.cs (1)
225
var inputDtos = CreateInputDtos(_fileUploadStore, interaction.
InteractionId
, inputsInfo, submittedInputs);
InteractionService.cs (11)
206
_fileUploadStore.StartInteraction(newState.
InteractionId
, fileInputs);
417
if (_interactionCollection.Contains(interaction.
InteractionId
))
456
if (!_interactionCollection.Contains(interactionState.
InteractionId
))
478
updateEvent = _interactionCollection.Remove(interactionUpdate.
InteractionId
);
482
if (_interactionCollection.Contains(interactionUpdate.
InteractionId
))
485
throw new InvalidOperationException($"An interaction with ID {interactionUpdate.
InteractionId
} already exists. Interaction IDs must be unique.");
504
if (!_interactionCollection.TryGetValue(interaction.
InteractionId
, out var interactionState))
565
_fileUploadStore.CompleteInteraction(interactionState.
InteractionId
);
569
_fileUploadStore.CancelInteraction(interactionState.
InteractionId
);
575
_interactionCollection.Remove(interactionState.
InteractionId
);
739
protected override int GetKeyForItem(Interaction item) => item.
InteractionId
;
Pipelines\PipelineActivityReporter.cs (2)
360
Id = interaction.
InteractionId
.ToString(CultureInfo.InvariantCulture),
391
Id = interaction.
InteractionId
.ToString(CultureInfo.InvariantCulture),
Aspire.Hosting.Tests (64)
Dashboard\DashboardServiceTests.cs (14)
660
InteractionId = interaction.
InteractionId
,
1201
var (fileId, _) = fileUploadStore.CreateEntry("spoofed.txt", interaction.
InteractionId
, textInput.Name);
1206
InteractionId = interaction.
InteractionId
,
1239
var (fileId, filePath) = fileUploadStore.CreateEntry("document.txt", interaction.
InteractionId
, input.Name);
1240
var (secondFileId, secondFilePath) = fileUploadStore.CreateEntry("second.txt", interaction.
InteractionId
, input.Name);
1243
fileUploadStore.CompleteUpload(interaction.
InteractionId
, fileId);
1244
fileUploadStore.CompleteUpload(interaction.
InteractionId
, secondFileId);
1247
InteractionId = interaction.
InteractionId
,
1281
Assert.Null(fileUploadStore.GetFilePath(fileId, interaction.
InteractionId
, input.Name));
1282
Assert.Null(fileUploadStore.GetFilePath(secondFileId, interaction.
InteractionId
, input.Name));
1303
var (fileId, _) = fileUploadStore.CreateEntry("document.txt", interaction.
InteractionId
, input.Name);
1304
fileUploadStore.CompleteUpload(interaction.
InteractionId
, fileId);
1307
InteractionId = interaction.
InteractionId
,
1318
InteractionId = interaction.
InteractionId
,
InteractionServiceTests.cs (41)
35
await CompleteInteractionAsync(interactionService, interaction.
InteractionId
, new InteractionCompletionState { Complete = true, State = true });
87
id1 = interaction.
InteractionId
;
91
id2 = interaction.
InteractionId
;
95
id3 = interaction.
InteractionId
;
105
interaction => Assert.Equal(interaction.
InteractionId
, id2),
106
interaction => Assert.Equal(interaction.
InteractionId
, id3));
112
Assert.Equal(id3.Value, Assert.Single(interactionService.GetCurrentInteractions()).
InteractionId
);
138
Assert.Equal(interaction1.
InteractionId
, (await updates.Reader.ReadAsync().DefaultTimeout()).
InteractionId
);
143
Assert.Equal(interaction2.
InteractionId
, (await updates.Reader.ReadAsync().DefaultTimeout()).
InteractionId
);
147
await CompleteInteractionAsync(interactionService, interaction1.
InteractionId
, result1);
149
Assert.Equal(interaction2.
InteractionId
, Assert.Single(interactionService.GetCurrentInteractions()).
InteractionId
);
155
await CompleteInteractionAsync(interactionService, interaction2.
InteractionId
, result2);
382
interaction.
InteractionId
,
406
interaction.
InteractionId
,
429
interaction.
InteractionId
,
452
interaction.
InteractionId
,
473
interaction.
InteractionId
,
496
interaction.
InteractionId
,
531
interaction.
InteractionId
,
867
interaction.
InteractionId
,
992
interaction.
InteractionId
,
1049
interaction.
InteractionId
,
1174
await CompleteInteractionAsync(interactionService, interaction.
InteractionId
, new InteractionCompletionState { Complete = true, State = false });
1210
await CompleteInteractionAsync(interactionService, interaction.
InteractionId
, new InteractionCompletionState { Complete = true, State = false });
1285
await CompleteInteractionAsync(interactionService, interaction.
InteractionId
, new InteractionCompletionState { Complete = true, State = false });
1360
interaction.
InteractionId
,
1368
Assert.Equal(interaction.
InteractionId
, Assert.Single(fileUploadStore.StartedInteractions));
1369
Assert.Equal(interaction.
InteractionId
, Assert.Single(fileUploadStore.CompletedInteractions));
1388
interaction.
InteractionId
,
1395
Assert.Equal(interaction.
InteractionId
, Assert.Single(fileUploadStore.StartedInteractions));
1396
Assert.Equal(interaction.
InteractionId
, Assert.Single(fileUploadStore.CanceledInteractions));
1415
Assert.Equal(interaction.
InteractionId
, Assert.Single(fileUploadStore.StartedInteractions));
1416
Assert.Equal(interaction.
InteractionId
, Assert.Single(fileUploadStore.CanceledInteractions));
1431
interaction.
InteractionId
,
1455
interaction.
InteractionId
,
1479
interaction.
InteractionId
,
1502
interaction.
InteractionId
,
1536
interaction.
InteractionId
,
ResourceCommandServiceTests.cs (1)
1388
interaction.
InteractionId
,
Terminals\InteractionServiceTerminalTests.cs (8)
121
await CompleteInteractionAsync(service, interaction.
InteractionId
, new[] { input });
171
await CompleteInteractionAsync(service, interaction.
InteractionId
, completion);
250
await CompleteInteractionAsync(service, interaction.
InteractionId
, false);
291
var firstId = updates.Current.
InteractionId
;
323
Assert.Equal(firstId, updates.Current.
InteractionId
);
332
Assert.NotEqual(firstId, updates.Current.
InteractionId
);
378
await CompleteInteractionAsync(service, interaction.
InteractionId
, !cancel);
411
await CompleteInteractionAsync(service, interaction.
InteractionId
, false);