6 writes to WaitForValueTcs
Aspire.Hosting (1)
Orchestrator\ParameterProcessor.cs (1)
31
parameterResource.
WaitForValueTcs
= new(TaskCreationOptions.RunContinuationsAsynchronously);
Aspire.Hosting.Tests (5)
Orchestrator\ParameterProcessorTests.cs (5)
183
param.
WaitForValueTcs
= new TaskCompletionSource<string>(TaskCreationOptions.RunContinuationsAsynchronously);
272
parameterWithMissingValue.
WaitForValueTcs
= new TaskCompletionSource<string>(TaskCreationOptions.RunContinuationsAsynchronously);
367
parameter.
WaitForValueTcs
= new TaskCompletionSource<string>(TaskCreationOptions.RunContinuationsAsynchronously);
416
param.
WaitForValueTcs
= new TaskCompletionSource<string>(TaskCreationOptions.RunContinuationsAsynchronously);
457
secretParam.
WaitForValueTcs
= new TaskCompletionSource<string>(TaskCreationOptions.RunContinuationsAsynchronously);
31 references to WaitForValueTcs
Aspire.Hosting (5)
ApplicationModel\ParameterResource.cs (2)
84
if (
WaitForValueTcs
is not null)
87
return await
WaitForValueTcs
.Task.WaitAsync(cancellationToken).ConfigureAwait(false);
Orchestrator\ParameterProcessor.cs (3)
77
parameterResource.
WaitForValueTcs
?.TrySetResult(value);
94
parameterResource.
WaitForValueTcs
?.TrySetException(ex);
183
parameter.
WaitForValueTcs
?.TrySetResult(inputValue);
Aspire.Hosting.Tests (26)
Orchestrator\ParameterProcessorTests.cs (26)
35
Assert.NotNull(param.
WaitForValueTcs
);
36
Assert.True(param.
WaitForValueTcs
.Task.IsCompletedSuccessfully);
38
Assert.Equal(param.Value, await param.
WaitForValueTcs
.Task);
61
Assert.NotNull(param.
WaitForValueTcs
);
62
Assert.True(param.
WaitForValueTcs
.Task.IsCompletedSuccessfully);
64
Assert.Equal(param.Value, await param.
WaitForValueTcs
.Task);
112
Assert.NotNull(parameterWithMissingValue.
WaitForValueTcs
);
113
Assert.False(parameterWithMissingValue.
WaitForValueTcs
.Task.IsCompleted);
128
Assert.NotNull(parameterWithMissingValue.
WaitForValueTcs
);
129
Assert.True(parameterWithMissingValue.
WaitForValueTcs
.Task.IsCompleted);
130
Assert.True(parameterWithMissingValue.
WaitForValueTcs
.Task.IsFaulted);
131
Assert.IsType<MissingParameterValueException>(parameterWithMissingValue.
WaitForValueTcs
.Task.Exception?.InnerException);
146
Assert.NotNull(parameterWithMissingValue.
WaitForValueTcs
);
147
Assert.False(parameterWithMissingValue.
WaitForValueTcs
.Task.IsCompleted);
161
Assert.NotNull(parameterWithError.
WaitForValueTcs
);
162
Assert.True(parameterWithError.
WaitForValueTcs
.Task.IsCompleted);
163
Assert.True(parameterWithError.
WaitForValueTcs
.Task.IsFaulted);
164
Assert.IsType<InvalidOperationException>(parameterWithError.
WaitForValueTcs
.Task.Exception?.InnerException);
241
Assert.True(param1.
WaitForValueTcs
!.Task.IsCompletedSuccessfully);
242
Assert.True(param2.
WaitForValueTcs
!.Task.IsCompletedSuccessfully);
243
Assert.True(secretParam.
WaitForValueTcs
!.Task.IsCompletedSuccessfully);
244
Assert.Equal("value1", await param1.
WaitForValueTcs
.Task);
245
Assert.Equal("value2", await param2.
WaitForValueTcs
.Task);
246
Assert.Equal("secretValue", await secretParam.
WaitForValueTcs
.Task);
289
Assert.NotNull(parameterWithMissingValue.
WaitForValueTcs
);
290
Assert.False(parameterWithMissingValue.
WaitForValueTcs
.Task.IsCompleted);