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