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