6 writes to WaitForValueTcs
Aspire.Hosting (1)
Orchestrator\ParameterProcessor.cs (1)
32
parameterResource.
WaitForValueTcs
= new(TaskCreationOptions.RunContinuationsAsynchronously);
Aspire.Hosting.Tests (5)
Orchestrator\ParameterProcessorTests.cs (5)
182
param.
WaitForValueTcs
= new TaskCompletionSource<string>(TaskCreationOptions.RunContinuationsAsynchronously);
271
parameterWithMissingValue.
WaitForValueTcs
= new TaskCompletionSource<string>(TaskCreationOptions.RunContinuationsAsynchronously);
366
parameter.
WaitForValueTcs
= new TaskCompletionSource<string>(TaskCreationOptions.RunContinuationsAsynchronously);
415
param.
WaitForValueTcs
= new TaskCompletionSource<string>(TaskCreationOptions.RunContinuationsAsynchronously);
456
secretParam.
WaitForValueTcs
= new TaskCompletionSource<string>(TaskCreationOptions.RunContinuationsAsynchronously);
31 references to WaitForValueTcs
Aspire.Hosting (5)
ApplicationModel\ParameterResource.cs (2)
87
if (
WaitForValueTcs
is not null)
90
return await
WaitForValueTcs
.Task.WaitAsync(cancellationToken).ConfigureAwait(false);
Orchestrator\ParameterProcessor.cs (3)
78
parameterResource.
WaitForValueTcs
?.TrySetResult(value);
95
parameterResource.
WaitForValueTcs
?.TrySetException(ex);
185
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);
111
Assert.NotNull(parameterWithMissingValue.
WaitForValueTcs
);
112
Assert.False(parameterWithMissingValue.
WaitForValueTcs
.Task.IsCompleted);
127
Assert.NotNull(parameterWithMissingValue.
WaitForValueTcs
);
128
Assert.True(parameterWithMissingValue.
WaitForValueTcs
.Task.IsCompleted);
129
Assert.True(parameterWithMissingValue.
WaitForValueTcs
.Task.IsFaulted);
130
Assert.IsType<MissingParameterValueException>(parameterWithMissingValue.
WaitForValueTcs
.Task.Exception?.InnerException);
145
Assert.NotNull(parameterWithMissingValue.
WaitForValueTcs
);
146
Assert.False(parameterWithMissingValue.
WaitForValueTcs
.Task.IsCompleted);
160
Assert.NotNull(parameterWithError.
WaitForValueTcs
);
161
Assert.True(parameterWithError.
WaitForValueTcs
.Task.IsCompleted);
162
Assert.True(parameterWithError.
WaitForValueTcs
.Task.IsFaulted);
163
Assert.IsType<InvalidOperationException>(parameterWithError.
WaitForValueTcs
.Task.Exception?.InnerException);
240
Assert.True(param1.
WaitForValueTcs
!.Task.IsCompletedSuccessfully);
241
Assert.True(param2.
WaitForValueTcs
!.Task.IsCompletedSuccessfully);
242
Assert.True(secretParam.
WaitForValueTcs
!.Task.IsCompletedSuccessfully);
243
Assert.Equal("value1", await param1.
WaitForValueTcs
.Task);
244
Assert.Equal("value2", await param2.
WaitForValueTcs
.Task);
245
Assert.Equal("secretValue", await secretParam.
WaitForValueTcs
.Task);
288
Assert.NotNull(parameterWithMissingValue.
WaitForValueTcs
);
289
Assert.False(parameterWithMissingValue.
WaitForValueTcs
.Task.IsCompleted);