16 writes to WaitForValueTcs
Aspire.Hosting (3)
Orchestrator\ParameterProcessor.cs (3)
50parameterResource.WaitForValueTcs = new(TaskCreationOptions.RunContinuationsAsynchronously); 402parameterResource.WaitForValueTcs = tcs; 423parameterResource.WaitForValueTcs = new TaskCompletionSource<string>(TaskCreationOptions.RunContinuationsAsynchronously);
Aspire.Hosting.Tests (13)
Orchestrator\ParameterProcessorTests.cs (13)
192param.WaitForValueTcs = new TaskCompletionSource<string>(TaskCreationOptions.RunContinuationsAsynchronously); 281parameterWithMissingValue.WaitForValueTcs = new TaskCompletionSource<string>(TaskCreationOptions.RunContinuationsAsynchronously); 376parameter.WaitForValueTcs = new TaskCompletionSource<string>(TaskCreationOptions.RunContinuationsAsynchronously); 428param.WaitForValueTcs = new TaskCompletionSource<string>(TaskCreationOptions.RunContinuationsAsynchronously); 472secretParam.WaitForValueTcs = new TaskCompletionSource<string>(TaskCreationOptions.RunContinuationsAsynchronously); 505param.WaitForValueTcs = new TaskCompletionSource<string>(TaskCreationOptions.RunContinuationsAsynchronously); 544param.WaitForValueTcs = new TaskCompletionSource<string>(TaskCreationOptions.RunContinuationsAsynchronously); 903parameter.WaitForValueTcs = new TaskCompletionSource<string>(TaskCreationOptions.RunContinuationsAsynchronously); 947parameter.WaitForValueTcs = new TaskCompletionSource<string>(TaskCreationOptions.RunContinuationsAsynchronously); 980parameter.WaitForValueTcs = new TaskCompletionSource<string>(TaskCreationOptions.RunContinuationsAsynchronously); 1267connectionStringParam.WaitForValueTcs = new TaskCompletionSource<string>(TaskCreationOptions.RunContinuationsAsynchronously); 1308regularParam.WaitForValueTcs = new TaskCompletionSource<string>(TaskCreationOptions.RunContinuationsAsynchronously); 1352customParam.WaitForValueTcs = new TaskCompletionSource<string>(TaskCreationOptions.RunContinuationsAsynchronously);
67 references to WaitForValueTcs
Aspire.Hosting (7)
ApplicationModel\ParameterResource.cs (3)
48if (WaitForValueTcs?.Task is { IsCompleted: true } valueTask) 99if (WaitForValueTcs is not null) 102return await WaitForValueTcs.Task.WaitAsync(cancellationToken).ConfigureAwait(false);
Orchestrator\ParameterProcessor.cs (4)
158parameterResource.WaitForValueTcs?.TrySetResult(value); 175parameterResource.WaitForValueTcs?.TrySetException(ex); 421if (parameterResource.WaitForValueTcs?.Task.IsCompleted ?? false) 426parameterResource.WaitForValueTcs?.TrySetResult(inputValue);
Aspire.Hosting.Tests (60)
Orchestrator\ParameterProcessorTests.cs (58)
41Assert.NotNull(param.WaitForValueTcs); 42Assert.True(param.WaitForValueTcs.Task.IsCompletedSuccessfully); 44Assert.Equal(param.Value, await param.WaitForValueTcs.Task.DefaultTimeout()); 67Assert.NotNull(param.WaitForValueTcs); 68Assert.True(param.WaitForValueTcs.Task.IsCompletedSuccessfully); 70Assert.Equal(param.Value, await param.WaitForValueTcs.Task.DefaultTimeout()); 117Assert.NotNull(parameterWithMissingValue.WaitForValueTcs); 118Assert.False(parameterWithMissingValue.WaitForValueTcs.Task.IsCompleted); 133Assert.NotNull(parameterWithMissingValue.WaitForValueTcs); 134Assert.True(parameterWithMissingValue.WaitForValueTcs.Task.IsCompleted); 135Assert.True(parameterWithMissingValue.WaitForValueTcs.Task.IsFaulted); 136Assert.IsType<MissingParameterValueException>(parameterWithMissingValue.WaitForValueTcs.Task.Exception?.InnerException); 151Assert.NotNull(parameterWithMissingValue.WaitForValueTcs); 152Assert.False(parameterWithMissingValue.WaitForValueTcs.Task.IsCompleted); 166Assert.NotNull(parameterWithError.WaitForValueTcs); 167Assert.True(parameterWithError.WaitForValueTcs.Task.IsCompleted); 168Assert.True(parameterWithError.WaitForValueTcs.Task.IsFaulted); 169Assert.IsType<InvalidOperationException>(parameterWithError.WaitForValueTcs.Task.Exception?.InnerException); 250Assert.True(param1.WaitForValueTcs!.Task.IsCompletedSuccessfully); 251Assert.True(param2.WaitForValueTcs!.Task.IsCompletedSuccessfully); 252Assert.True(secretParam.WaitForValueTcs!.Task.IsCompletedSuccessfully); 253Assert.Equal("value1", await param1.WaitForValueTcs.Task.DefaultTimeout()); 254Assert.Equal("value2", await param2.WaitForValueTcs.Task.DefaultTimeout()); 255Assert.Equal("secretValue", await secretParam.WaitForValueTcs.Task.DefaultTimeout()); 298Assert.NotNull(parameterWithMissingValue.WaitForValueTcs); 299Assert.False(parameterWithMissingValue.WaitForValueTcs.Task.IsCompleted); 596Assert.NotNull(explicitParameterResource.WaitForValueTcs); 597Assert.NotNull(referencedParameterResource.WaitForValueTcs); 598Assert.True(explicitParameterResource.WaitForValueTcs.Task.IsCompletedSuccessfully); 599Assert.True(referencedParameterResource.WaitForValueTcs.Task.IsCompletedSuccessfully); 600Assert.Equal("explicitValue", await explicitParameterResource.WaitForValueTcs.Task.DefaultTimeout()); 601Assert.Equal("referencedValue", await referencedParameterResource.WaitForValueTcs.Task.DefaultTimeout()); 640Assert.NotNull(explicitParameterResource.WaitForValueTcs); 641Assert.True(explicitParameterResource.WaitForValueTcs.Task.IsCompletedSuccessfully); 642Assert.Equal("explicitValue", await explicitParameterResource.WaitForValueTcs.Task.DefaultTimeout()); 666Assert.NotNull(parameterResource.WaitForValueTcs); 667Assert.True(parameterResource.WaitForValueTcs.Task.IsCompletedSuccessfully); 668Assert.Equal("envValue", await parameterResource.WaitForValueTcs.Task.DefaultTimeout()); 688Assert.NotNull(parameterResource.WaitForValueTcs); 689Assert.True(parameterResource.WaitForValueTcs.Task.IsCompletedSuccessfully); 690Assert.Equal("testValue", await parameterResource.WaitForValueTcs.Task.DefaultTimeout()); 710Assert.NotNull(parameterResource.WaitForValueTcs); 711Assert.True(parameterResource.WaitForValueTcs.Task.IsCompletedSuccessfully); 712Assert.Equal("testValue", await parameterResource.WaitForValueTcs.Task.DefaultTimeout()); 736Assert.NotNull(parameterResource.WaitForValueTcs); 737Assert.False(parameterResource.WaitForValueTcs.Task.IsCompleted); 770Assert.NotNull(param.WaitForValueTcs); 771Assert.True(param.WaitForValueTcs.Task.IsCompletedSuccessfully); 807Assert.NotNull(parameterResource.WaitForValueTcs); 808Assert.True(parameterResource.WaitForValueTcs.Task.IsCompletedSuccessfully); 847Assert.NotNull(parameterResource.WaitForValueTcs); 848Assert.True(parameterResource.WaitForValueTcs.Task.IsCompletedSuccessfully); 946var originalTcs = parameter.WaitForValueTcs; 965Assert.False(parameter.WaitForValueTcs!.Task.IsCompleted); 1004Assert.Equal("newSecretValue", await parameter.WaitForValueTcs!.Task.DefaultTimeout()); 1245Assert.NotNull(parameterWithGenerateDefault.WaitForValueTcs); 1246Assert.True(parameterWithGenerateDefault.WaitForValueTcs.Task.IsCompletedSuccessfully); 1247Assert.Equal("existingValue", await parameterWithGenerateDefault.WaitForValueTcs.Task.DefaultTimeout());
Pipelines\DistributedApplicationPipelineTests.cs (2)
2099Assert.NotNull(paramResource.WaitForValueTcs); 2100Assert.True(paramResource.WaitForValueTcs.Task.IsCompletedSuccessfully);