1 write to InteractionId
Aspire.Hosting (1)
InteractionService.cs (1)
773
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)
226
var inputDtos = CreateInputDtos(_fileUploadStore, interaction.
InteractionId
, inputsInfo, submittedInputs);
InteractionService.cs (11)
213
_fileUploadStore.StartInteraction(newState.
InteractionId
, fileInputs);
424
if (_interactionCollection.Contains(interaction.
InteractionId
))
463
if (!_interactionCollection.Contains(interactionState.
InteractionId
))
485
updateEvent = _interactionCollection.Remove(interactionUpdate.
InteractionId
);
489
if (_interactionCollection.Contains(interactionUpdate.
InteractionId
))
492
throw new InvalidOperationException($"An interaction with ID {interactionUpdate.
InteractionId
} already exists. Interaction IDs must be unique.");
511
if (!_interactionCollection.TryGetValue(interaction.
InteractionId
, out var interactionState))
572
_fileUploadStore.CompleteInteraction(interactionState.
InteractionId
);
576
_fileUploadStore.CancelInteraction(interactionState.
InteractionId
);
582
_interactionCollection.Remove(interactionState.
InteractionId
);
746
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)
699
InteractionId = interaction.
InteractionId
,
1244
var (fileId, _) = fileUploadStore.CreateEntry("spoofed.txt", interaction.
InteractionId
, textInput.Name);
1249
InteractionId = interaction.
InteractionId
,
1283
var (fileId, filePath) = fileUploadStore.CreateEntry("document.txt", interaction.
InteractionId
, input.Name);
1284
var (secondFileId, secondFilePath) = fileUploadStore.CreateEntry("second.txt", interaction.
InteractionId
, input.Name);
1287
fileUploadStore.CompleteUpload(interaction.
InteractionId
, fileId);
1288
fileUploadStore.CompleteUpload(interaction.
InteractionId
, secondFileId);
1291
InteractionId = interaction.
InteractionId
,
1325
Assert.Null(fileUploadStore.GetFilePath(fileId, interaction.
InteractionId
, input.Name));
1326
Assert.Null(fileUploadStore.GetFilePath(secondFileId, interaction.
InteractionId
, input.Name));
1348
var (fileId, _) = fileUploadStore.CreateEntry("document.txt", interaction.
InteractionId
, input.Name);
1349
fileUploadStore.CompleteUpload(interaction.
InteractionId
, fileId);
1352
InteractionId = interaction.
InteractionId
,
1363
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);
486
interaction.
InteractionId
,
510
interaction.
InteractionId
,
533
interaction.
InteractionId
,
556
interaction.
InteractionId
,
577
interaction.
InteractionId
,
600
interaction.
InteractionId
,
635
interaction.
InteractionId
,
971
interaction.
InteractionId
,
1096
interaction.
InteractionId
,
1153
interaction.
InteractionId
,
1278
await CompleteInteractionAsync(interactionService, interaction.
InteractionId
, new InteractionCompletionState { Complete = true, State = false });
1314
await CompleteInteractionAsync(interactionService, interaction.
InteractionId
, new InteractionCompletionState { Complete = true, State = false });
1389
await CompleteInteractionAsync(interactionService, interaction.
InteractionId
, new InteractionCompletionState { Complete = true, State = false });
1465
interaction.
InteractionId
,
1473
Assert.Equal(interaction.
InteractionId
, Assert.Single(fileUploadStore.StartedInteractions));
1474
Assert.Equal(interaction.
InteractionId
, Assert.Single(fileUploadStore.CompletedInteractions));
1493
interaction.
InteractionId
,
1500
Assert.Equal(interaction.
InteractionId
, Assert.Single(fileUploadStore.StartedInteractions));
1501
Assert.Equal(interaction.
InteractionId
, Assert.Single(fileUploadStore.CanceledInteractions));
1520
Assert.Equal(interaction.
InteractionId
, Assert.Single(fileUploadStore.StartedInteractions));
1521
Assert.Equal(interaction.
InteractionId
, Assert.Single(fileUploadStore.CanceledInteractions));
1536
interaction.
InteractionId
,
1560
interaction.
InteractionId
,
1584
interaction.
InteractionId
,
1607
interaction.
InteractionId
,
1641
interaction.
InteractionId
,
ResourceCommandServiceTests.cs (1)
1390
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);