6 writes to WaitForValueTcs
Aspire.Hosting (1)
Orchestrator\ParameterProcessor.cs (1)
41parameterResource.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);
53 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)
178parameterResource.WaitForValueTcs?.TrySetResult(value); 195parameterResource.WaitForValueTcs?.TrySetException(ex); 285parameter.WaitForValueTcs?.TrySetResult(inputValue);
Aspire.Hosting.Tests (48)
Orchestrator\ParameterProcessorTests.cs (48)
36Assert.NotNull(param.WaitForValueTcs); 37Assert.True(param.WaitForValueTcs.Task.IsCompletedSuccessfully); 39Assert.Equal(param.Value, await param.WaitForValueTcs.Task); 62Assert.NotNull(param.WaitForValueTcs); 63Assert.True(param.WaitForValueTcs.Task.IsCompletedSuccessfully); 65Assert.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); 503Assert.NotNull(explicitParameterResource.WaitForValueTcs); 504Assert.NotNull(referencedParameterResource.WaitForValueTcs); 505Assert.True(explicitParameterResource.WaitForValueTcs.Task.IsCompletedSuccessfully); 506Assert.True(referencedParameterResource.WaitForValueTcs.Task.IsCompletedSuccessfully); 507Assert.Equal("explicitValue", await explicitParameterResource.WaitForValueTcs.Task); 508Assert.Equal("referencedValue", await referencedParameterResource.WaitForValueTcs.Task); 547Assert.NotNull(explicitParameterResource.WaitForValueTcs); 548Assert.True(explicitParameterResource.WaitForValueTcs.Task.IsCompletedSuccessfully); 549Assert.Equal("explicitValue", await explicitParameterResource.WaitForValueTcs.Task); 573Assert.NotNull(parameterResource.WaitForValueTcs); 574Assert.True(parameterResource.WaitForValueTcs.Task.IsCompletedSuccessfully); 575Assert.Equal("envValue", await parameterResource.WaitForValueTcs.Task); 595Assert.NotNull(parameterResource.WaitForValueTcs); 596Assert.True(parameterResource.WaitForValueTcs.Task.IsCompletedSuccessfully); 597Assert.Equal("testValue", await parameterResource.WaitForValueTcs.Task); 617Assert.NotNull(parameterResource.WaitForValueTcs); 618Assert.True(parameterResource.WaitForValueTcs.Task.IsCompletedSuccessfully); 619Assert.Equal("testValue", await parameterResource.WaitForValueTcs.Task); 643Assert.NotNull(parameterResource.WaitForValueTcs); 644Assert.False(parameterResource.WaitForValueTcs.Task.IsCompleted); 677Assert.NotNull(param.WaitForValueTcs); 678Assert.True(param.WaitForValueTcs.Task.IsCompletedSuccessfully);