3 writes to WaitForValueTcs
Aspire.Hosting (1)
Orchestrator\ParameterProcessor.cs (1)
31
parameterResource.
WaitForValueTcs
= new(TaskCreationOptions.RunContinuationsAsynchronously);
Aspire.Hosting.Tests (2)
Orchestrator\ParameterProcessorTests.cs (2)
180
param.
WaitForValueTcs
= new TaskCompletionSource<string>(TaskCreationOptions.RunContinuationsAsynchronously);
269
parameterWithMissingValue.
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);
189
parameter.
WaitForValueTcs
?.TrySetResult(inputValue);
Aspire.Hosting.Tests (26)
Orchestrator\ParameterProcessorTests.cs (26)
36
Assert.NotNull(param.
WaitForValueTcs
);
37
Assert.True(param.
WaitForValueTcs
.Task.IsCompletedSuccessfully);
38
Assert.Equal(param.Value, await param.
WaitForValueTcs
.Task);
60
Assert.NotNull(param.
WaitForValueTcs
);
61
Assert.True(param.
WaitForValueTcs
.Task.IsCompletedSuccessfully);
62
Assert.Equal(param.Value, await param.
WaitForValueTcs
.Task);
109
Assert.NotNull(parameterWithMissingValue.
WaitForValueTcs
);
110
Assert.False(parameterWithMissingValue.
WaitForValueTcs
.Task.IsCompleted);
125
Assert.NotNull(parameterWithMissingValue.
WaitForValueTcs
);
126
Assert.True(parameterWithMissingValue.
WaitForValueTcs
.Task.IsCompleted);
127
Assert.True(parameterWithMissingValue.
WaitForValueTcs
.Task.IsFaulted);
128
Assert.IsType<MissingParameterValueException>(parameterWithMissingValue.
WaitForValueTcs
.Task.Exception?.InnerException);
143
Assert.NotNull(parameterWithMissingValue.
WaitForValueTcs
);
144
Assert.False(parameterWithMissingValue.
WaitForValueTcs
.Task.IsCompleted);
158
Assert.NotNull(parameterWithError.
WaitForValueTcs
);
159
Assert.True(parameterWithError.
WaitForValueTcs
.Task.IsCompleted);
160
Assert.True(parameterWithError.
WaitForValueTcs
.Task.IsFaulted);
161
Assert.IsType<InvalidOperationException>(parameterWithError.
WaitForValueTcs
.Task.Exception?.InnerException);
238
Assert.True(param1.
WaitForValueTcs
!.Task.IsCompletedSuccessfully);
239
Assert.True(param2.
WaitForValueTcs
!.Task.IsCompletedSuccessfully);
240
Assert.True(secretParam.
WaitForValueTcs
!.Task.IsCompletedSuccessfully);
241
Assert.Equal("value1", await param1.
WaitForValueTcs
.Task);
242
Assert.Equal("value2", await param2.
WaitForValueTcs
.Task);
243
Assert.Equal("secretValue", await secretParam.
WaitForValueTcs
.Task);
286
Assert.NotNull(parameterWithMissingValue.
WaitForValueTcs
);
287
Assert.False(parameterWithMissingValue.
WaitForValueTcs
.Task.IsCompleted);