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)
193param.WaitForValueTcs = new TaskCompletionSource<string>(TaskCreationOptions.RunContinuationsAsynchronously); 282parameterWithMissingValue.WaitForValueTcs = new TaskCompletionSource<string>(TaskCreationOptions.RunContinuationsAsynchronously); 377parameter.WaitForValueTcs = new TaskCompletionSource<string>(TaskCreationOptions.RunContinuationsAsynchronously); 429param.WaitForValueTcs = new TaskCompletionSource<string>(TaskCreationOptions.RunContinuationsAsynchronously); 473secretParam.WaitForValueTcs = new TaskCompletionSource<string>(TaskCreationOptions.RunContinuationsAsynchronously); 506param.WaitForValueTcs = new TaskCompletionSource<string>(TaskCreationOptions.RunContinuationsAsynchronously); 545param.WaitForValueTcs = new TaskCompletionSource<string>(TaskCreationOptions.RunContinuationsAsynchronously); 904parameter.WaitForValueTcs = new TaskCompletionSource<string>(TaskCreationOptions.RunContinuationsAsynchronously); 948parameter.WaitForValueTcs = new TaskCompletionSource<string>(TaskCreationOptions.RunContinuationsAsynchronously); 981parameter.WaitForValueTcs = new TaskCompletionSource<string>(TaskCreationOptions.RunContinuationsAsynchronously); 1250connectionStringParam.WaitForValueTcs = new TaskCompletionSource<string>(TaskCreationOptions.RunContinuationsAsynchronously); 1291regularParam.WaitForValueTcs = new TaskCompletionSource<string>(TaskCreationOptions.RunContinuationsAsynchronously); 1335customParam.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)
42Assert.NotNull(param.WaitForValueTcs); 43Assert.True(param.WaitForValueTcs.Task.IsCompletedSuccessfully); 45Assert.Equal(param.Value, await param.WaitForValueTcs.Task.DefaultTimeout()); 68Assert.NotNull(param.WaitForValueTcs); 69Assert.True(param.WaitForValueTcs.Task.IsCompletedSuccessfully); 71Assert.Equal(param.Value, await param.WaitForValueTcs.Task.DefaultTimeout()); 118Assert.NotNull(parameterWithMissingValue.WaitForValueTcs); 119Assert.False(parameterWithMissingValue.WaitForValueTcs.Task.IsCompleted); 134Assert.NotNull(parameterWithMissingValue.WaitForValueTcs); 135Assert.True(parameterWithMissingValue.WaitForValueTcs.Task.IsCompleted); 136Assert.True(parameterWithMissingValue.WaitForValueTcs.Task.IsFaulted); 137Assert.IsType<MissingParameterValueException>(parameterWithMissingValue.WaitForValueTcs.Task.Exception?.InnerException); 152Assert.NotNull(parameterWithMissingValue.WaitForValueTcs); 153Assert.False(parameterWithMissingValue.WaitForValueTcs.Task.IsCompleted); 167Assert.NotNull(parameterWithError.WaitForValueTcs); 168Assert.True(parameterWithError.WaitForValueTcs.Task.IsCompleted); 169Assert.True(parameterWithError.WaitForValueTcs.Task.IsFaulted); 170Assert.IsType<InvalidOperationException>(parameterWithError.WaitForValueTcs.Task.Exception?.InnerException); 251Assert.True(param1.WaitForValueTcs!.Task.IsCompletedSuccessfully); 252Assert.True(param2.WaitForValueTcs!.Task.IsCompletedSuccessfully); 253Assert.True(secretParam.WaitForValueTcs!.Task.IsCompletedSuccessfully); 254Assert.Equal("value1", await param1.WaitForValueTcs.Task.DefaultTimeout()); 255Assert.Equal("value2", await param2.WaitForValueTcs.Task.DefaultTimeout()); 256Assert.Equal("secretValue", await secretParam.WaitForValueTcs.Task.DefaultTimeout()); 299Assert.NotNull(parameterWithMissingValue.WaitForValueTcs); 300Assert.False(parameterWithMissingValue.WaitForValueTcs.Task.IsCompleted); 597Assert.NotNull(explicitParameterResource.WaitForValueTcs); 598Assert.NotNull(referencedParameterResource.WaitForValueTcs); 599Assert.True(explicitParameterResource.WaitForValueTcs.Task.IsCompletedSuccessfully); 600Assert.True(referencedParameterResource.WaitForValueTcs.Task.IsCompletedSuccessfully); 601Assert.Equal("explicitValue", await explicitParameterResource.WaitForValueTcs.Task.DefaultTimeout()); 602Assert.Equal("referencedValue", await referencedParameterResource.WaitForValueTcs.Task.DefaultTimeout()); 641Assert.NotNull(explicitParameterResource.WaitForValueTcs); 642Assert.True(explicitParameterResource.WaitForValueTcs.Task.IsCompletedSuccessfully); 643Assert.Equal("explicitValue", await explicitParameterResource.WaitForValueTcs.Task.DefaultTimeout()); 667Assert.NotNull(parameterResource.WaitForValueTcs); 668Assert.True(parameterResource.WaitForValueTcs.Task.IsCompletedSuccessfully); 669Assert.Equal("envValue", await parameterResource.WaitForValueTcs.Task.DefaultTimeout()); 689Assert.NotNull(parameterResource.WaitForValueTcs); 690Assert.True(parameterResource.WaitForValueTcs.Task.IsCompletedSuccessfully); 691Assert.Equal("testValue", await parameterResource.WaitForValueTcs.Task.DefaultTimeout()); 711Assert.NotNull(parameterResource.WaitForValueTcs); 712Assert.True(parameterResource.WaitForValueTcs.Task.IsCompletedSuccessfully); 713Assert.Equal("testValue", await parameterResource.WaitForValueTcs.Task.DefaultTimeout()); 737Assert.NotNull(parameterResource.WaitForValueTcs); 738Assert.False(parameterResource.WaitForValueTcs.Task.IsCompleted); 771Assert.NotNull(param.WaitForValueTcs); 772Assert.True(param.WaitForValueTcs.Task.IsCompletedSuccessfully); 808Assert.NotNull(parameterResource.WaitForValueTcs); 809Assert.True(parameterResource.WaitForValueTcs.Task.IsCompletedSuccessfully); 848Assert.NotNull(parameterResource.WaitForValueTcs); 849Assert.True(parameterResource.WaitForValueTcs.Task.IsCompletedSuccessfully); 947var originalTcs = parameter.WaitForValueTcs; 966Assert.False(parameter.WaitForValueTcs!.Task.IsCompleted); 1005Assert.Equal("newSecretValue", await parameter.WaitForValueTcs!.Task.DefaultTimeout()); 1228Assert.NotNull(parameterWithGenerateDefault.WaitForValueTcs); 1229Assert.True(parameterWithGenerateDefault.WaitForValueTcs.Task.IsCompletedSuccessfully); 1230Assert.Equal("existingValue", await parameterWithGenerateDefault.WaitForValueTcs.Task.DefaultTimeout());
Pipelines\DistributedApplicationPipelineTests.cs (2)
2098Assert.NotNull(paramResource.WaitForValueTcs); 2099Assert.True(paramResource.WaitForValueTcs.Task.IsCompletedSuccessfully);