712 references to Result
Analyzer.Utilities.UnitTests (2)
FlowAnalysis\Analysis\PropertySetAnalysis\PropertySetAnalysisTests.cs (1)
65Compilation? compilation = project.GetCompilationAsync().Result;
Options\SymbolNamesWithValueOptionTests.cs (1)
440return project.GetCompilationAsync(cancellationToken).Result!;
Aspire.Hosting.Testing (1)
DistributedApplicationTestingBuilder.cs (1)
243public DistributedApplication Build() => BuildAsync(CancellationToken.None).Result;
Aspire.Templates.Tests (2)
StarterTemplateRunTestsBase.cs (1)
130.Select(t => t.Result)
TemplateTestsBase.cs (1)
44return t.Result;
Binding.Http.IntegrationTests (1)
BasicHttpBindingTests.4.0.0.cs (1)
163string requestMessageBody = oldContent.ReadAsStringAsync().Result;
Client.ChannelLayer.IntegrationTests (1)
DuplexChannelWithSynchronizationContext.cs (1)
280return _tcs.Task.Result;
Client.TypedClient.IntegrationTests (4)
TypedProxyDuplexTests.4.1.0.cs (2)
41Guid returnedGuid = task.Result; 76Guid returnedGuid = task.Result;
TypedProxyTests.4.0.0.cs (2)
423return _tcs.Task.Result; 553result = task.Result;
ClientSample (1)
src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (1)
140Invoke = () => invoke().Result;
Contract.Service.IntegrationTests (4)
ServiceContractTests.4.1.0.cs (4)
185var returnStream = serviceProxy.EchoStreamAsync(stream).Result; 515var returnStream = serviceProxy.EchoStreamAsync(stream).Result; 552var returnStream = serviceProxy.EchoStreamAsync(stream).Result; 589var returnStream = serviceProxy.EchoStreamAsync(stream).Result;
Contract.XmlSerializer.IntegrationTests (1)
XmlSerializerFormatTest.4.0.0.cs (1)
93Assert.Equal("message", response.Result);
csc (1)
src\Compilers\Shared\BuildClient.cs (1)
237buildResponse = buildResponseTask.Result;
dotnet-dev-certs (1)
src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (1)
140Invoke = () => invoke().Result;
dotnet-getdocument (1)
src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (1)
140Invoke = () => invoke().Result;
dotnet-openapi (1)
src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (1)
140Invoke = () => invoke().Result;
dotnet-sql-cache (1)
src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (1)
140Invoke = () => invoke().Result;
dotnet-svcutil.xmlserializer.IntegrationTests (1)
src\System.Private.ServiceModel\tests\Scenarios\Contract\XmlSerializer\XmlSerializerFormatTest.4.0.0.cs (1)
93Assert.Equal("message", response.Result);
dotnet-svcutil-lib (13)
FrameworkFork\Microsoft.Xml\Xml\AsyncHelper.cs (1)
105if (task.Result)
FrameworkFork\Microsoft.Xml\Xml\Core\XsdValidatingReaderAsync.cs (1)
223if (task.Result)
FrameworkFork\System.ServiceModel\Internals\System\Runtime\TaskHelpers.cs (1)
62else tcsObj.TrySetResult(antecedent.Result);
FrameworkFork\System.ServiceModel\Internals\System\Runtime\TimeoutHelper.cs (2)
36return GetCancellationTokenAsync().Result; 266return FromTimeoutAsync(millisecondsTimeout).Result;
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpChannelFactory.cs (1)
952if (cancelTokenTask.Result.IsCancellationRequested)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\WebSocketTransportDuplexSessionChannel.cs (1)
1223if (cancelTokenTask.Result.IsCancellationRequested)
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\MetadataExchangeClient.cs (1)
765response = task.Result as HttpWebResponse;
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\SyncMethodInvoker.cs (1)
69var tuple = task.Result;
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\TaskMethodInvoker.cs (1)
89tuple = invokeTask.Result;
Shared\Options\OptionValueParser.cs (1)
64value = CreateValue<MSBuildProj>(() => MSBuildProj.FromPathAsync(stringValue, null, System.Threading.CancellationToken.None).Result, option, stringValue);
Shared\Utilities\AsyncHelper.cs (1)
67return finishedTask.Result;
Tool.cs (1)
73return MainAsync(args, null, cancellationToken).Result;
dotnet-svcutil-lib.Tests (15)
E2ETests.cs (3)
233MSBuildProj binProj = MSBuildProj.FromPathAsync(binProjPath, null, CancellationToken.None).Result; 234ProcessRunner.ProcessResult result = binProj.BuildAsync(true, null, CancellationToken.None).Result; 245ProcessRunner.ProcessResult ret = this_TestCaseProject.BuildAsync(true, this_TestCaseLogger, CancellationToken.None).Result;
ProjectUtils.cs (7)
38project = MSBuildProj.FromPathAsync(filePath, logger, token).Result; 44project = MSBuildProj.DotNetNewAsync(filePath, logger, token, "--langVersion latest --framework " + targetFramework).Result; 48project = MSBuildProj.DotNetNewAsync(filePath, logger, token).Result; 72var ret = project.RestoreAsync(logger, token).Result; 77ret = project.BuildAsync(logger, token).Result; 95result = ProcessRunner.RunAsync("dotnet-svcutil", options, project.DirectoryPath, redirectOutput: true, throwOnError: false, environmentVariables: envVars, logger: logger, cancellationToken: CancellationToken.None).Result; 156result = ProcessRunner.RunAsync("dotnet", $"run", project.DirectoryPath, redirectOutput: true, throwOnError: false, environmentVariables: envVars, logger: logger, cancellationToken: CancellationToken.None).Result;
TestInit.cs (4)
178ProcessRunner.ProcessResult ret = ProcessRunner.TryRunAsync("dotnet", "tool uninstall -g dotnet-svcutil", currentDirectory, null, CancellationToken.None).Result; 185ret = ProcessRunner.TryRunAsync("dotnet", $"tool install --global --add-source {pkgPath} dotnet-svcutil --version {g_SvcutilPkgVersion}", currentDirectory, null, CancellationToken.None).Result; 259this_TestCaseProject = MSBuildProj.FromPathAsync(projectPath, null, CancellationToken.None).Result; 589var rootSolutionFolder = PathHelper.TryFindFileAsync("dotnet-svcutil.sln", parentDir, null, CancellationToken.None).Result;
UnitTest.cs (1)
34exitCode = Tool.MainAsync(args, this_TestCaseLogger, CancellationToken.None).Result;
dotnet-user-jwts (1)
src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (1)
140Invoke = () => invoke().Result;
dotnet-user-secrets (1)
src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (1)
140Invoke = () => invoke().Result;
GenerateDocumentationAndConfigFiles (5)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (4)
191result = _cachedResult.Result; 217return _cachedResult.Result; 313return _cachedResult.Result; 589this.TrySetResult(task.Result);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TaskExtensions.cs (1)
56return task.Result;
GetDocument.Insider (1)
src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (1)
140Invoke = () => invoke().Result;
IdeBenchmarks (3)
InheritanceMargin\InheritanceMarginServiceBenchmarks.cs (1)
48_solution = workspace.OpenSolutionAsync(solutionPath).Result;
RegexClassifierBenchmarks.cs (2)
43return GetClassificationSpansAsync(code, new TextSpan(0, code.Length), parseOptions: null).Result; 50return GetClassificationSpansAsync(code, new TextSpan(0, code.Length), parseOptions: null).Result;
IdeCoreBenchmarks (10)
ClassificationBenchmarks.cs (1)
97var text = document.GetTextAsync().Result.ToString();
CSharpIdeAnalyzerBenchmarks.cs (1)
66_ = _workspace.OpenSolutionAsync(_solutionPath, progress: null, CancellationToken.None).Result;
FormatterBenchmarks.cs (3)
53var root = document.GetSyntaxRootAsync(CancellationToken.None).Result.WithAdditionalAnnotations(Formatter.Annotation); 68var formattedDoc = Formatter.FormatAsync(_document, Formatter.Annotation, _options, CancellationToken.None).Result; 69var formattedRoot = formattedDoc.GetSyntaxRootAsync(CancellationToken.None).Result;
IncrementalAnalyzerBenchmarks.cs (1)
65_ = _workspace.OpenSolutionAsync(_solutionPath, progress: null, CancellationToken.None).Result;
IncrementalSourceGeneratorBenchmarks.cs (1)
81var solution = _workspace.OpenSolutionAsync(_solutionPath, progress: null, CancellationToken.None).Result;
NavigateToBenchmarks.cs (1)
82var solution = _workspace.OpenSolutionAsync(_solutionPath, progress: null, CancellationToken.None).Result;
RenameBenchmarks.cs (1)
47var compilation = project.GetCompilationAsync().Result;
SwitchStatementBenchmarks.cs (1)
75var compilation = project.GetCompilationAsync().Result;
IIS.FunctionalTests (2)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\IISTestSiteFixture.cs (1)
111_deploymentResult = (IISDeploymentResult)_deployer.DeployAsync().Result;
src\Servers\IIS\IIS\test\Common.FunctionalTests\RequestResponseTests.cs (1)
437var text = response.Content.ReadAsStringAsync().Result;
IIS.LongTests (1)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\IISTestSiteFixture.cs (1)
111_deploymentResult = (IISDeploymentResult)_deployer.DeployAsync().Result;
IIS.Microbenchmarks (1)
StartupTimeBenchmark.cs (1)
38_client = _deployer.DeployAsync().Result.HttpClient;
IIS.NewHandler.FunctionalTests (1)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\IISTestSiteFixture.cs (1)
111_deploymentResult = (IISDeploymentResult)_deployer.DeployAsync().Result;
IIS.NewShim.FunctionalTests (1)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\IISTestSiteFixture.cs (1)
111_deploymentResult = (IISDeploymentResult)_deployer.DeployAsync().Result;
IIS.ShadowCopy.Tests (1)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\IISTestSiteFixture.cs (1)
111_deploymentResult = (IISDeploymentResult)_deployer.DeployAsync().Result;
IISExpress.FunctionalTests (2)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\IISTestSiteFixture.cs (1)
111_deploymentResult = (IISDeploymentResult)_deployer.DeployAsync().Result;
src\Servers\IIS\IIS\test\Common.FunctionalTests\RequestResponseTests.cs (1)
437var text = response.Content.ReadAsStringAsync().Result;
InMemory.FunctionalTests (1)
src\Servers\Kestrel\shared\test\StreamBackedTestConnection.cs (1)
141var bytesTransferred = await _stream.ReadAsync(buffer, 0, 128).ContinueWith(t => t.IsFaulted ? 0 : t.Result).TimeoutAfter(Timeout);
Metrics (5)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (4)
191result = _cachedResult.Result; 217return _cachedResult.Result; 313return _cachedResult.Result; 589this.TrySetResult(task.Result);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TaskExtensions.cs (1)
56return task.Result;
Metrics.Legacy (5)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (4)
191result = _cachedResult.Result; 217return _cachedResult.Result; 313return _cachedResult.Result; 589this.TrySetResult(task.Result);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TaskExtensions.cs (1)
56return task.Result;
Microsoft.AspNetCore.Authentication.Test (3)
FacebookTests.cs (1)
393var body = req.Content.ReadAsStringAsync().Result;
GoogleTests.cs (1)
1032var body = req.Content.ReadAsStringAsync().Result;
MicrosoftAccountTests.cs (1)
299var body = req.Content.ReadAsStringAsync().Result;
Microsoft.AspNetCore.Authorization (3)
AuthorizationOptions.cs (1)
88return value.Result;
DefaultAuthorizationPolicyProvider.cs (2)
38if (_cachedDefaultPolicy == null || _cachedDefaultPolicy.Result != _options.DefaultPolicy) 52if (_cachedFallbackPolicy == null || _cachedFallbackPolicy.Result != _options.FallbackPolicy)
Microsoft.AspNetCore.Components (1)
PersistentState\ComponentStatePersistenceManager.cs (1)
210if (!result.Result)
Microsoft.AspNetCore.Components.Analyzers.Tests (9)
Helpers\CodeFixVerifier.Helper.cs (4)
28var operations = codeAction.GetOperationsAsync(CancellationToken.None).Result; 70return document.GetSemanticModelAsync().Result.GetDiagnostics(); 80var simplifiedDoc = Simplifier.ReduceAsync(document, Simplifier.Annotation).Result; 81var root = simplifiedDoc.GetSyntaxRootAsync().Result;
Helpers\DiagnosticVerifier.Helper.cs (3)
62var compilationWithAnalyzers = project.GetCompilationAsync().Result.WithAnalyzers(ImmutableArray.Create(analyzer)); 63var diags = compilationWithAnalyzers.GetAnalyzerDiagnosticsAsync().Result; 75var tree = document.GetSyntaxTreeAsync().Result;
Verifiers\CodeFixVerifier.cs (2)
109document = document.WithSyntaxRoot(Formatter.Format(document.GetSyntaxRootAsync().Result, Formatter.Annotation, document.Project.Solution.Workspace)); 117document.GetSyntaxRootAsync().Result.ToFullString()));
Microsoft.AspNetCore.Components.Authorization.Tests (1)
CascadingAuthenticationStateTest.cs (1)
165var identity = AuthStateTask.Result.User.Identity;
Microsoft.AspNetCore.Components.SdkAnalyzers.Tests (9)
Helpers\CodeFixVerifier.Helper.cs (4)
28var operations = codeAction.GetOperationsAsync(CancellationToken.None).Result; 70return document.GetSemanticModelAsync().Result.GetDiagnostics(); 80var simplifiedDoc = Simplifier.ReduceAsync(document, Simplifier.Annotation).Result; 81var root = simplifiedDoc.GetSyntaxRootAsync().Result;
Helpers\DiagnosticVerifier.Helper.cs (3)
62var compilationWithAnalyzers = project.GetCompilationAsync().Result.WithAnalyzers(ImmutableArray.Create(analyzer)); 63var diags = compilationWithAnalyzers.GetAnalyzerDiagnosticsAsync().Result; 75var tree = document.GetSyntaxTreeAsync().Result;
Verifiers\CodeFixVerifier.cs (2)
109document = document.WithSyntaxRoot(Formatter.Format(document.GetSyntaxRootAsync().Result, Formatter.Annotation, document.Project.Solution.Workspace)); 117document.GetSyntaxRootAsync().Result.ToFullString()));
Microsoft.AspNetCore.Components.Tests (18)
NavigationManagerTest.cs (13)
230Assert.True(navigation1.Result); 259Assert.True(navigation1.Result); 287Assert.True(navigation1.Result); 341Assert.False(navigation1.Result); 372Assert.False(navigation1.Result); 408Assert.False(navigation1.Result); 447Assert.False(navigation1.Result); 524Assert.False(navigation1.Result); 580Assert.False(navigation1.Result); 583Assert.True(navigation2.Result); 641Assert.False(navigation1.Result); 644Assert.False(navigation2.Result); 647Assert.True(navigation3.Result);
RendererTest.cs (5)
5715LogResult(result.Result); 5725LogResult(result.Result); 5740LogResult(result.Result); 5751LogResult(result.Result); 5772LogResult(result.Result);
Microsoft.AspNetCore.Components.WebAssembly (1)
Rendering\WebAssemblyDispatcher.cs (1)
154state.tcs.SetResult(t.Result);
Microsoft.AspNetCore.Cors (1)
Infrastructure\CorsMiddleware.cs (1)
156corsPolicy = policyTask.Result;
Microsoft.AspNetCore.Grpc.JsonTranscoding (3)
src\Grpc\JsonTranscoding\src\Shared\Server\ClientStreamingServerMethodInvoker.cs (1)
92/// <returns>A <see cref="Task{TResponse}"/> that represents the asynchronous method. The <see cref="Task{TResponse}.Result"/>
src\Grpc\JsonTranscoding\src\Shared\Server\UnaryServerMethodInvoker.cs (2)
90/// <returns>A <see cref="Task{TResponse}"/> that represents the asynchronous method. The <see cref="Task{TResponse}.Result"/> 131return AwaitServiceReleaseAndReturn(invokerTask.Result, serviceHandle);
Microsoft.AspNetCore.Http.Connections.Tests (1)
HttpConnectionDispatcherTests.cs (1)
3821var result = connection.Transport.Input.ReadAsync().AsTask().Result;
Microsoft.AspNetCore.Http.Extensions (1)
RequestDelegateFactory.cs (1)
579return new ValueTask<object?>(task.Result);
Microsoft.AspNetCore.HttpOverrides (1)
CertificateForwardingFeature.cs (1)
27get => GetClientCertificateAsync(CancellationToken.None).Result;
Microsoft.AspNetCore.InternalTesting.Tests (1)
HttpClientSlimTest.cs (1)
102var context = task.Result;
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation (1)
PageLoaderMatcherPolicy.cs (1)
81candidates.ReplaceEndpoint(i, compiled.Result.Endpoint, candidate.Values);
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.Test (4)
RuntimeViewCompilerTest.cs (4)
642Assert.Same(result1, task1.Result); 643Assert.Same(result2, task2.Result); 684var result1 = task1.Result; 685var result2 = task2.Result;
Microsoft.AspNetCore.Mvc.ViewFeatures (1)
Controller.cs (1)
359OnActionExecuted(task.Result);
Microsoft.AspNetCore.Routing (1)
EndpointRoutingMiddleware.cs (1)
77var matchTask = matcherTask.Result.MatchAsync(httpContext);
Microsoft.AspNetCore.Routing.Tests (1)
Builder\RouteHandlerEndpointRouteBuilderExtensionsTest.cs (1)
907var body = streamReader.ReadToEndAsync().Result;
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (1)
src\Servers\Kestrel\shared\test\StreamBackedTestConnection.cs (1)
141var bytesTransferred = await _stream.ReadAsync(buffer, 0, 128).ContinueWith(t => t.IsFaulted ? 0 : t.Result).TimeoutAfter(Timeout);
Microsoft.AspNetCore.Shared.Tests (1)
src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (1)
140Invoke = () => invoke().Result;
Microsoft.AspNetCore.SignalR.Client.Core (28)
HubConnection.cs (4)
429/// The <see cref="Task{TResult}.Result"/> property returns a <see cref="ChannelReader{T}"/> for the streamed hub method values. 451/// The <see cref="Task{TResult}.Result"/> property returns an <see cref="object"/> for the hub method return value. 1034connectionState = connectionStateTask.Result; 2501return _connectionLock.WaitAsync(0).Result;
HubConnectionExtensions.InvokeAsyncGeneric.cs (12)
26/// The <see cref="Task{TResult}.Result"/> property returns a <typeparamref name="TResult"/> for the hub method return value. 44/// The <see cref="Task{TResult}.Result"/> property returns a <typeparamref name="TResult"/> for the hub method return value. 63/// The <see cref="Task{TResult}.Result"/> property returns a <typeparamref name="TResult"/> for the hub method return value. 83/// The <see cref="Task{TResult}.Result"/> property returns a <typeparamref name="TResult"/> for the hub method return value. 104/// The <see cref="Task{TResult}.Result"/> property returns a <typeparamref name="TResult"/> for the hub method return value. 126/// The <see cref="Task{TResult}.Result"/> property returns a <typeparamref name="TResult"/> for the hub method return value. 149/// The <see cref="Task{TResult}.Result"/> property returns a <typeparamref name="TResult"/> for the hub method return value. 173/// The <see cref="Task{TResult}.Result"/> property returns a <typeparamref name="TResult"/> for the hub method return value. 198/// The <see cref="Task{TResult}.Result"/> property returns a <typeparamref name="TResult"/> for the hub method return value. 224/// The <see cref="Task{TResult}.Result"/> property returns a <typeparamref name="TResult"/> for the hub method return value. 251/// The <see cref="Task{TResult}.Result"/> property returns a <typeparamref name="TResult"/> for the hub method return value. 269/// The <see cref="Task{TResult}.Result"/> property returns a <typeparamref name="TResult"/> for the hub method return value.
HubConnectionExtensions.StreamAsChannelAsync.cs (12)
27/// The <see cref="Task{TResult}.Result"/> property returns a <see cref="ChannelReader{T}"/> for the streamed hub method values. 45/// The <see cref="Task{TResult}.Result"/> property returns a <see cref="ChannelReader{T}"/> for the streamed hub method values. 64/// The <see cref="Task{TResult}.Result"/> property returns a <see cref="ChannelReader{T}"/> for the streamed hub method values. 84/// The <see cref="Task{TResult}.Result"/> property returns a <see cref="ChannelReader{T}"/> for the streamed hub method values. 105/// The <see cref="Task{TResult}.Result"/> property returns a <see cref="ChannelReader{T}"/> for the streamed hub method values. 127/// The <see cref="Task{TResult}.Result"/> property returns a <see cref="ChannelReader{T}"/> for the streamed hub method values. 150/// The <see cref="Task{TResult}.Result"/> property returns a <see cref="ChannelReader{T}"/> for the streamed hub method values. 174/// The <see cref="Task{TResult}.Result"/> property returns a <see cref="ChannelReader{T}"/> for the streamed hub method values. 199/// The <see cref="Task{TResult}.Result"/> property returns a <see cref="ChannelReader{T}"/> for the streamed hub method values. 225/// The <see cref="Task{TResult}.Result"/> property returns a <see cref="ChannelReader{T}"/> for the streamed hub method values. 252/// The <see cref="Task{TResult}.Result"/> property returns a <see cref="ChannelReader{T}"/> for the streamed hub method values. 270/// The <see cref="Task{TResult}.Result"/> property returns a <see cref="ChannelReader{T}"/> for the streamed hub method values.
Microsoft.AspNetCore.SignalR.Client.FunctionalTests (1)
HubConnectionTests.cs (1)
2344Assert.Equal("Hello World!", invokeTask.Result);
Microsoft.AspNetCore.SpaServices.Extensions (2)
Proxying\SpaProxy.cs (1)
299var result = resultTask.Result; // We know it's completed already
Util\TaskTimeoutExtensions.cs (1)
24return task.Result;
Microsoft.Build (4)
BackEnd\BuildManager\BuildManager.cs (1)
2450var response = new ResourceResponse(request.GlobalRequestId, task.Result);
BackEnd\Components\RequestBuilder\TaskBuilder.cs (1)
576taskResult = InitializeAndExecuteTask(taskLoggingContext, bucket, taskIdentityParameters, taskHost, howToExecuteTask).Result;
BackEnd\Components\RequestBuilder\TaskHost.cs (1)
338return BuildProjectFilesInParallelAsync(projectFileNames, targetNames, globalProperties, undefineProperties, toolsVersion, returnTargetOutputs).Result;
BackEnd\Components\Scheduler\Scheduler.cs (1)
627return completionSource.Task.ContinueWith((task) => grantCores(task.Result), TaskContinuationOptions.ExecuteSynchronously);
Microsoft.Build.Engine.OM.UnitTests (1)
Construction\SolutionFile_Tests.cs (1)
726SolutionModel solutionModel = serializer.OpenAsync(slnPath, CancellationToken.None).Result;
Microsoft.Build.Engine.UnitTests (41)
BackEnd\TargetBuilder_Tests.cs (32)
106BuildResult result = builder.BuildTargets(GetProjectLoggingContext(entry), entry, this, target, CreateStandardLookup(project), CancellationToken.None).Result; 126BuildResult result = builder.BuildTargets(GetProjectLoggingContext(entry), entry, this, target, CreateStandardLookup(project), CancellationToken.None).Result; 152BuildResult result = builder.BuildTargets(GetProjectLoggingContext(entry), entry, this, target, CreateStandardLookup(project), CancellationToken.None).Result; 181BuildResult result = builder.BuildTargets(GetProjectLoggingContext(entry), entry, this, target, CreateStandardLookup(project), CancellationToken.None).Result; 367BuildResult result = builder.BuildTargets(GetProjectLoggingContext(entry), entry, this, target, CreateStandardLookup(project), CancellationToken.None).Result; 507BuildResult result = builder.BuildTargets(GetProjectLoggingContext(entry), entry, this, target, CreateStandardLookup(project), CancellationToken.None).Result; 533BuildResult result = builder.BuildTargets(GetProjectLoggingContext(entry), entry, this, target, CreateStandardLookup(project), CancellationToken.None).Result; 559BuildResult result = builder.BuildTargets(GetProjectLoggingContext(entry), entry, this, target, CreateStandardLookup(project), CancellationToken.None).Result; 589BuildResult result = builder.BuildTargets(GetProjectLoggingContext(entry), entry, this, target, CreateStandardLookup(project), CancellationToken.None).Result; 624BuildResult result = builder.BuildTargets(GetProjectLoggingContext(entry), entry, this, target, CreateStandardLookup(project), CancellationToken.None).Result; 656BuildResult result = builder.BuildTargets(GetProjectLoggingContext(entry), entry, this, target, CreateStandardLookup(project), CancellationToken.None).Result; 687BuildResult result = builder.BuildTargets(GetProjectLoggingContext(entry), entry, this, target, CreateStandardLookup(project), CancellationToken.None).Result; 713BuildResult result = builder.BuildTargets(GetProjectLoggingContext(entry), entry, this, target, CreateStandardLookup(project), CancellationToken.None).Result; 749BuildResult result = builder.BuildTargets(GetProjectLoggingContext(entry), entry, this, target, CreateStandardLookup(project), CancellationToken.None).Result; 775BuildResult result = builder.BuildTargets(GetProjectLoggingContext(entry), entry, this, target, CreateStandardLookup(project), CancellationToken.None).Result; 802BuildResult result = builder.BuildTargets(GetProjectLoggingContext(entry), entry, this, target, CreateStandardLookup(project), CancellationToken.None).Result; 832BuildResult result = builder.BuildTargets(GetProjectLoggingContext(entry), entry, this, target, CreateStandardLookup(project), CancellationToken.None).Result; 876BuildResult result = builder.BuildTargets(GetProjectLoggingContext(entry), entry, this, target, CreateStandardLookup(project), CancellationToken.None).Result; 903BuildResult result = builder.BuildTargets(GetProjectLoggingContext(entry), entry, this, target, CreateStandardLookup(project), CancellationToken.None).Result; 930BuildResult result = builder.BuildTargets(GetProjectLoggingContext(entry), entry, this, target, CreateStandardLookup(project), CancellationToken.None).Result; 962BuildResult result = builder.BuildTargets(GetProjectLoggingContext(entry), entry, this, target, CreateStandardLookup(project), CancellationToken.None).Result; 1060BuildResult result = builder.BuildTargets(GetProjectLoggingContext(entry), entry, this, target, CreateStandardLookup(project), CancellationToken.None).Result; 1095BuildResult result = builder.BuildTargets(GetProjectLoggingContext(entry), entry, this, target, CreateStandardLookup(project), CancellationToken.None).Result; 1146BuildResult result = builder.BuildTargets(GetProjectLoggingContext(entry), entry, this, target, CreateStandardLookup(project), CancellationToken.None).Result; 1206BuildResult result = builder.BuildTargets(GetProjectLoggingContext(entry), entry, this, target, CreateStandardLookup(project), CancellationToken.None).Result; 1248BuildResult result = builder.BuildTargets(GetProjectLoggingContext(entry), entry, this, target, CreateStandardLookup(project), CancellationToken.None).Result; 1294BuildResult result = builder.BuildTargets(GetProjectLoggingContext(entry), entry, this, target, CreateStandardLookup(project), CancellationToken.None).Result; 1325BuildResult result = builder.BuildTargets(GetProjectLoggingContext(entry), entry, this, target, CreateStandardLookup(project), CancellationToken.None).Result; 1400BuildResult result = builder.BuildTargets(GetProjectLoggingContext(entry), entry, this, target, CreateStandardLookup(project), source.Token).Result; 1432var buildResult = builder.BuildTargets(GetProjectLoggingContext(entry), entry, this, target, CreateStandardLookup(project), CancellationToken.None).Result; 1458var buildResult = builder.BuildTargets(GetProjectLoggingContext(entry), entry, this, target, CreateStandardLookup(project), CancellationToken.None).Result; 1713return builder.BuildTargets(GetProjectLoggingContext(entry), entry, this, targets, CreateStandardLookup(project), CancellationToken.None).Result;
Construction\SolutionFile_NewParser_Tests.cs (1)
148SolutionModel solutionModel = serializer.OpenAsync(slnPath, CancellationToken.None).Result;
Construction\SolutionFilter_Tests.cs (1)
341SolutionModel solutionModel = serializer.OpenAsync(slnPath, CancellationToken.None).Result;
ProjectCache\ProjectCacheTests.cs (7)
703var buildResult = task.Result; 1409task3.Result.ShouldHaveSucceeded(); 1411task4.Result.ShouldHaveSucceeded(); 1420task2.Result.ShouldHaveSucceeded(); 1424task1.Result.ShouldHaveSucceeded(); 1496buildResultTask.Result.ShouldHaveSucceeded(); 1628foreach (var buildResult in buildTasks.Select(buildTask => buildTask.Result))
Microsoft.Build.Tasks.CodeAnalysis (1)
src\Compilers\Core\MSBuildTask\ManagedCompiler.cs (1)
576ExitCode = HandleResponse(requestId, responseTask.Result, pathToTool, responseFileCommands, commandLineCommands, logger);
Microsoft.Build.Tasks.CodeAnalysis.Sdk (1)
src\Compilers\Core\MSBuildTask\ManagedCompiler.cs (1)
576ExitCode = HandleResponse(requestId, responseTask.Result, pathToTool, responseFileCommands, commandLineCommands, logger);
Microsoft.Build.Tasks.UnitTests (1)
DownloadFile_Tests.cs (1)
52task.Result.ShouldBeFalse();
Microsoft.Build.UnitTests.Shared (1)
ObjectModelHelpers.cs (1)
2098return buildTask.Result;
Microsoft.CodeAnalysis (5)
CommandLine\CommonCompiler.cs (1)
1406var hostDiagnostics = analyzerDriver.GetDiagnosticsAsync(compilation, cancellationToken).Result;
DiagnosticAnalyzer\AnalyzerDriver.cs (2)
1546if (workerTasks[i].Status == TaskStatus.RanToCompletion && workerTasks[i].Result != null) 1548completedEvent = workerTasks[i].Result;
DiagnosticAnalyzer\ShadowCopyAnalyzerPathResolver.cs (1)
222Debug.Assert(AnalyzerAssemblyLoader.GeneratedPathComparer.Equals(shadowCopyPath, task.Result));
PEWriter\DebugSourceDocument.cs (1)
75return _sourceInfo?.Result ?? default(DebugSourceInfo);
Microsoft.CodeAnalysis.Analyzers (5)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (4)
191result = _cachedResult.Result; 217return _cachedResult.Result; 313return _cachedResult.Result; 589this.TrySetResult(task.Result);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TaskExtensions.cs (1)
56return task.Result;
Microsoft.CodeAnalysis.AnalyzerUtilities (5)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (4)
191result = _cachedResult.Result; 217return _cachedResult.Result; 313return _cachedResult.Result; 589this.TrySetResult(task.Result);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TaskExtensions.cs (1)
56return task.Result;
Microsoft.CodeAnalysis.BannedApiAnalyzers (5)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (4)
191result = _cachedResult.Result; 217return _cachedResult.Result; 313return _cachedResult.Result; 589this.TrySetResult(task.Result);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TaskExtensions.cs (1)
56return task.Result;
Microsoft.CodeAnalysis.CodeStyle (5)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (4)
191result = _cachedResult.Result; 217return _cachedResult.Result; 313return _cachedResult.Result; 589this.TrySetResult(task.Result);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TaskExtensions.cs (1)
56return task.Result;
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
src\Analyzers\CSharp\CodeFixes\MisplacedUsingDirectives\MisplacedUsingDirectivesCodeFixProvider.cs (1)
184(node, _) => expandUsingDirectiveTasks[node].Result);
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (9)
CodeActions\PreviewExceptionTests.cs (1)
109var span = document.GetSyntaxRootAsync().Result.Span;
CodeActions\PreviewTests.cs (2)
95var span = document.GetSyntaxRootAsync().Result.Span; 101var previews = await editHandler.GetPreviewsAsync(workspace, action.GetPreviewOperationsAsync(CancellationToken.None).Result, CancellationToken.None);
Diagnostics\DiagnosticAnalyzerDriver\DiagnosticAnalyzerDriverTests.cs (6)
67await DiagnosticProviderTestUtilities.GetAllDiagnosticsAsync(workspace, document, new TextSpan(0, document.GetTextAsync().Result.Length)); 95await DiagnosticProviderTestUtilities.GetAllDiagnosticsAsync(ideEngineWorkspace, ideEngineDocument, new TextSpan(0, ideEngineDocument.GetTextAsync().Result.Length)); 131return await DiagnosticProviderTestUtilities.GetAllDiagnosticsAsync(workspace, document, new TextSpan(0, document.GetTextAsync().Result.Length)); 177await DiagnosticProviderTestUtilities.GetAllDiagnosticsAsync(workspace, sourceDocument, new TextSpan(0, sourceDocument.GetTextAsync().Result.Length)); 207var diagnostics = await DiagnosticProviderTestUtilities.GetAllDiagnosticsAsync(workspace, ideEngineDocument, new TextSpan(0, ideEngineDocument.GetTextAsync().Result.Length)); 263var diagnostics = await DiagnosticProviderTestUtilities.GetAllDiagnosticsAsync(ideEngineWorkspace, ideEngineDocument, new TextSpan(0, ideEngineDocument.GetTextAsync().Result.Length));
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (1)
Diagnostics\CompilationEventTests.cs (1)
34actual.Add(te.Result);
Microsoft.CodeAnalysis.CSharp.Features (1)
src\Analyzers\CSharp\CodeFixes\MisplacedUsingDirectives\MisplacedUsingDirectivesCodeFixProvider.cs (1)
184(node, _) => expandUsingDirectiveTasks[node].Result);
Microsoft.CodeAnalysis.CSharp.Scripting.Desktop.UnitTests (18)
InteractiveSessionReferencesTests.cs (18)
52Assert.NotNull(s2.Result); 64Assert.NotNull(s1.Result); 76Assert.NotNull(s1.Result); 104Assert.IsType<List<Version>>(s.Result.ReturnValue); 107Assert.Equal(Environment.Version, s.Result.ReturnValue); 110Assert.Equal(2, s.Result.ReturnValue); 113Assert.Equal(0.0, s.Result.ReturnValue); 126", options).Result; 233", options).Result; 272Assert.NotNull(script.RunAsync().Result.ReturnValue); 335Assert.NotNull(script2.EvaluateAsync().Result); 349", ScriptOptions).Result; 366").EvaluateAsync().Result; 385", ScriptOptions).Result; 405").EvaluateAsync().Result; 454Assert.Equal(s0.Result.ReturnValue.GetType(), s1.Result.ReturnValue); 584int result = script.RunAsync(globals).Result.ReturnValue;
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (102)
InteractiveSessionTests.cs (100)
144var result = script.EvaluateAsync().Result; 167Assert.Equal("True False True", script.EvaluateAsync().Result.ToString()); 181var result = script.EvaluateAsync().Result; 197var result = script.EvaluateAsync().Result; 226Assert.Equal(1, script.EvaluateAsync().Result); 243var e = script.EvaluateAsync().Result; 275Type c = CSharpScript.EvaluateAsync<Type>(source, ScriptOptions).Result; 308Assert.Equal(111, script.EvaluateAsync().Result); 314Assert.Equal(111, script.EvaluateAsync().Result); 322Assert.Equal(110, script.EvaluateAsync().Result); 352Assert.Equal(1, script.ContinueWith<int>("C.D.goo()").EvaluateAsync().Result); 353Assert.Equal(1, script.ContinueWith<int>("C.F.goo()").EvaluateAsync().Result); 354Assert.Equal(1, script.ContinueWith<int>("C.G.goo()").EvaluateAsync().Result); 379Assert.Equal(4, script.ContinueWith<int>("i").EvaluateAsync().Result); 380Assert.Equal(4, script.ContinueWith<int>("j").EvaluateAsync().Result); 381Assert.Equal(4, script.ContinueWith<int>("k").EvaluateAsync().Result); 382Assert.Equal(4, script.ContinueWith<int>("l").EvaluateAsync().Result); 383Assert.Equal(16, script.ContinueWith<int>("pi").EvaluateAsync().Result); 394Assert.Null(script.EvaluateAsync().Result); 405Assert.Equal(1, script.EvaluateAsync().Result); 415EvaluateAsync().Result; 431Assert.Equal(1, state.Result.ReturnValue); 441Assert.Equal(1, state.Result.ReturnValue); 457Assert.Equal(Environment.ProcessorCount, script.EvaluateAsync().Result); 466Assert.Equal(Environment.ProcessorCount, state.Result.ReturnValue); 469Assert.Equal(Environment.ProcessorCount, state.Result.ReturnValue); 477var compilation1 = state1.Result.Script.GetCompilation(); 483Assert.Equal(1, state1.Result.ReturnValue); 486var compilation2 = state2.Result.Script.GetCompilation(); 488Assert.Equal(2, state2.Result.ReturnValue); 497var compilation3 = state3.Result.Script.GetCompilation(); 499Assert.Equal(3, state3.Result.ReturnValue); 535EvaluateAsync().Result; 543EvaluateAsync().Result; 554EvaluateAsync().Result; 573Result.ReturnValue; 584Result.ReturnValue; 595Result.ReturnValue; 607Assert.Equal(3, s2.EvaluateAsync().Result); 608Assert.Null(s1.EvaluateAsync().Result); 609Assert.Null(s0.EvaluateAsync().Result); 611Assert.Equal(3, s2.EvaluateAsync().Result); 612Assert.Null(s1.EvaluateAsync().Result); 613Assert.Null(s0.EvaluateAsync().Result); 615Assert.Equal(3, s2.EvaluateAsync().Result); 616Assert.Equal(3, s2.EvaluateAsync().Result); 624Assert.Throws<CompilationErrorException>(() => s0.ContinueWithAsync("invalid$syntax").Result); 628Assert.Throws<CompilationErrorException>(() => s1.ContinueWithAsync("invalid$syntax").Result); 629Assert.Throws<CompilationErrorException>(() => s1.ContinueWithAsync("x = undefined_symbol").Result); 727Assert.Equal(3, script.EvaluateAsync().Result); 751Assert.Equal(1, s0.ContinueWith(@"goo<int, int>(1)").EvaluateAsync().Result); 752Assert.Equal(5, s0.ContinueWith(@"bar(5)").EvaluateAsync().Result); 778Assert.Equal(111, state.Result.ReturnValue); 785Assert.Equal(222, state.Result.ReturnValue); 812Assert.Equal(111, state.Result.ReturnValue); 819Assert.Equal(222, state.Result.ReturnValue); 843", ScriptOptions).Result; 851Assert.Equal(18, CSharpScript.EvaluateAsync<int>("(4 + 5) * 2", ScriptOptions).Result); 852Assert.Equal(1, CSharpScript.EvaluateAsync<long>("6 / (2 * 3)", ScriptOptions).Result); 882", ScriptOptions).Result; 899", ScriptOptions).Result; 908ContinueWith<Func<int, int>>("new Func<int,int>(Sqr)").Result.ReturnValue; 924Assert.Equal(3, s.ContinueWith(@"arr_1[2]").Result.ReturnValue); 925Assert.Equal(5, s.ContinueWith(@"arr_2[0]").Result.ReturnValue); 926Assert.Equal(0, s.ContinueWith(@"arr_3[0]").Result.ReturnValue); 946", ScriptOptions).Result; 972", ScriptOptions).Result; 990ContinueWith<List<int>>("result").Result.ReturnValue; 1006fruit.Skip(1).Where(s => s.Length > 4).Count()", options).Result; 1023", ScriptOptions).Result; 1057var result = CSharpScript.EvaluateAsync("System.Threading.Tasks.Task.FromResult(1)", ScriptOptions).Result; 1058Assert.Equal(1, ((Task<int>)result).Result); 1067Assert.Equal(2, CSharpScript.EvaluateAsync("await System.Threading.Tasks.Task.FromResult(2)", ScriptOptions).Result); 1076Assert.Equal(3, CSharpScript.EvaluateAsync<int>("0 + await System.Threading.Tasks.Task.FromResult(3)", ScriptOptions).Result); 1083Assert.Null(task.Result); 1125Result; 1144Result; 1227", ScriptOptions).Result; 1295var r2 = CSharpScript.Create($@"#r ""{fileMain.Path}""", ScriptOptions).ContinueWith($@"M.X.F").RunAsync().Result.ReturnValue; 1326var r2 = CSharpScript.Create($@"#r ""{fileMain.Path}""", ScriptOptions).ContinueWith($@"M.X.F").RunAsync().Result.ReturnValue; 1359", ScriptOptions).Result; 1370object result = CSharpScript.EvaluateAsync("new int[] { 1, 2, 3 }.First()", options).Result; 1382Assert.Equal(1, s1.Result.ReturnValue); 1385Assert.IsType<List<int>>(s2.Result.ReturnValue); 1430Assert.Equal(2, CSharpScript.EvaluateAsync<int>("1+1", ScriptOptions).Result); 1432Assert.Null(CSharpScript.EvaluateAsync<string>("null", ScriptOptions).Result); 1448var cint = CSharpScript.EvaluateAsync<C<int>>("null", options).Result; 1451Assert.Null(CSharpScript.EvaluateAsync<int?>("null", options).Result); 1487", ScriptOptions).Result; 1532Assert.Equal(6, s0.Result.ReturnValue); 1535Assert.Equal(1, s1.Result.ReturnValue); 1540Assert.Equal(20, s3.Result.ReturnValue); 1548Assert.Null(result.Result); 1593Assert.Equal(3, result.Result); 1604Assert.Equal(123, s3.Result.ReturnValue); 1620Assert.Equal(2, s1.Result.ReturnValue); 1623Assert.Equal(2, s2.Result.ReturnValue); 1631Assert.Equal(6, r0.Result); 1635Assert.Equal(1, r1.Result); 2142Result.ReturnValue;
ScriptTests.cs (2)
109Assert.Equal(3, fn().Result); 122Assert.Equal(4, fn(new Globals { X = 1, Y = 3 }).Result);
Microsoft.CodeAnalysis.EditorFeatures (4)
InlineRename\InlineRenameSession.cs (1)
634var result = _conflictResolutionTask.Task.Result;
IntelliSense\ModelComputation.cs (1)
138OnModelUpdated(nextTask.Result, updateController);
RenameTracking\RenameTrackingTaggerProvider.cs (1)
130var kind = isRenamableIdentifierTask.Result;
RenameTracking\RenameTrackingTaggerProvider.TrackingSession.cs (1)
287=> _newIdentifierBindsTask.Status == TaskStatus.RanToCompletion && _newIdentifierBindsTask.Result;
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (2)
Completion\AbstractCompletionProviderTests.cs (2)
230&& (result.ExpectedDescription != null ? completionService.GetDescriptionAsync(document, c, options, displayOptions).Result.Text == result.ExpectedDescription : true)); 255if (result.ExpectedDescription != null && completionService.GetDescriptionAsync(document, c, options, displayOptions).Result.Text != result.ExpectedDescription)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (9)
CodeGeneration\AbstractCodeGenerationTests.cs (1)
43var simplifiedDocument = Simplifier.ReduceAsync(annotatedDocument, options, CancellationToken.None).Result;
CodeGeneration\CodeGenerationTests.cs (3)
976var simplified = Simplifier.ReduceAsync(this.Document, Simplifier.Annotation, simplifierOptions, CancellationToken.None).Result; 977var actual = Formatter.FormatAsync(simplified, Formatter.Annotation, formattingOptions, CancellationToken.None).Result.GetSyntaxRootAsync().Result.ToFullString();
Preview\PreviewWorkspaceTests.cs (2)
82Assert.Equal(previewWorkspace.CurrentSolution.Projects.First().Documents.First().GetTextAsync().Result.ToString(), text); 170var result = compilationWithAnalyzers.GetAnalysisResultAsync(CancellationToken.None).Result;
Snippets\RoslynLSPSnippetConvertTests.cs (2)
404[], new TextChange(new TextSpan(8, 0), "quux"), triggerLocation: 12, CancellationToken.None).Result; 415[], new TextChange(new TextSpan(4, 4), "bar quux"), triggerLocation: 12, CancellationToken.None).Result;
TextEditor\TryGetDocumentTests.cs (1)
42var newSourceText = newDocument.GetTextAsync().Result;
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (2)
Diagnostics\AbstractCrossLanguageUserDiagnosticTest.vb (1)
238Return doc.GetSyntaxRootAsync().Result.FindToken(position).Parent
Diagnostics\AdditionalFileDiagnosticsTests.vb (1)
56Dim actual = updatedDocument.GetTextAsync().Result.ToString().Trim()
Microsoft.CodeAnalysis.ExternalAccess.Extensions (1)
Internal\ExtensionMessageHandlerWrapper.cs (1)
30_responseTaskResultProperty = typeof(Task<>).MakeGenericType(ResponseType).GetProperty(nameof(Task<int>.Result));
Microsoft.CodeAnalysis.Features.Test.Utilities (4)
EditAndContinue\EditAndContinueTestVerifier.cs (4)
185var oldModel = oldDocument.GetSemanticModelAsync().Result; 186var newModel = newDocument.GetSemanticModelAsync().Result; 278EditSession.MergePartialEdits(oldProject.GetCompilationAsync().Result!, newProject.GetCompilationAsync().Result!, allEdits, out var mergedEdits, out _, CancellationToken.None);
Microsoft.CodeAnalysis.InteractiveHost (6)
Interactive\Core\InteractiveHost.Service.cs (1)
476return lastTask.Result;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (4)
191result = _cachedResult.Result; 217return _cachedResult.Result; 313return _cachedResult.Result; 589this.TrySetResult(task.Result);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TaskExtensions.cs (1)
56return task.Result;
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (5)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (4)
191result = _cachedResult.Result; 217return _cachedResult.Result; 313return _cachedResult.Result; 589this.TrySetResult(task.Result);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TaskExtensions.cs (1)
56return task.Result;
Microsoft.CodeAnalysis.PublicApiAnalyzers (5)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (4)
191result = _cachedResult.Result; 217return _cachedResult.Result; 313return _cachedResult.Result; 589this.TrySetResult(task.Result);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TaskExtensions.cs (1)
56return task.Result;
Microsoft.CodeAnalysis.ResxSourceGenerator (5)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (4)
191result = _cachedResult.Result; 217return _cachedResult.Result; 313return _cachedResult.Result; 589this.TrySetResult(task.Result);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TaskExtensions.cs (1)
56return task.Result;
Microsoft.CodeAnalysis.Scripting.TestUtilities (4)
ScriptingTestHelpers.cs (4)
26result = task.Result; 39result = task.Result; 61AssertCompilationError(() => state.Result.ContinueWithAsync(code).Wait(), expectedDiagnostics); 66AssertCompilationError(() => state.Result.ContinueWithAsync(code).Wait(), expectedDiagnostics);
Microsoft.CodeAnalysis.Test.Utilities (1)
Diagnostics\DiagnosticExtensions.cs (1)
318var analyzerDiagnostics = driver.GetDiagnosticsAsync(newCompilation, cancellationToken).Result;
Microsoft.CodeAnalysis.UnitTests (4)
AnalyzerAssemblyLoaderTests.cs (1)
1192Assert.Empty(compilationWithAnalyzers.GetAllDiagnosticsAsync().Result);
AsyncQueueTests.cs (1)
30Assert.Equal(42, task.Result);
Diagnostics\CompilationWithAnalyzersTests.cs (2)
64var analysisResult = compWithAnalyzers.GetAnalysisResultAsync(CancellationToken.None).Result; 68var analyzerTelemetry = compWithAnalyzers.GetAnalyzerTelemetryInfoAsync(analyzer, CancellationToken.None).Result;
Microsoft.CodeAnalysis.VisualBasic.Scripting.UnitTests (10)
InteractiveSessionTests.vb (9)
30Assert.Equal(1, VisualBasicScript.EvaluateAsync(source, ScriptOptions).Result) 38Assert.Equal(1, VisualBasicScript.EvaluateAsync(source, ScriptOptions).Result) 47Assert.Null(VisualBasicScript.EvaluateAsync(source, ScriptOptions).Result) 63Assert.Equal(6, VisualBasicScript.EvaluateAsync(source, ScriptOptions).Result) 83Assert.Equal("True False True", script.EvaluateAsync().Result) 109Assert.Equal("True False True", script.EvaluateAsync().Result) 120Dim compilation1 = state1.Result.Script.GetCompilation() 128Dim compilation2 = state2.Result.Script.GetCompilation() 142Dim compilation3 = state3.Result.Script.GetCompilation()
ScriptTests.vb (1)
35Assert.Equal(3, value.Result)
Microsoft.CodeAnalysis.Workspaces (8)
src\Compilers\Core\Portable\DiagnosticAnalyzer\ShadowCopyAnalyzerPathResolver.cs (1)
222Debug.Assert(AnalyzerAssemblyLoader.GeneratedPathComparer.Equals(shadowCopyPath, task.Result));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (4)
191result = _cachedResult.Result; 217return _cachedResult.Result; 313return _cachedResult.Result; 589this.TrySetResult(task.Result);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TaskExtensions.cs (1)
56return task.Result;
Workspace\Solution\Document.cs (1)
83syntaxTree = _syntaxTreeResultTask.Result;
Workspace\Workspace.cs (1)
1590var solutionWithLinkedFileChangesMerged = newSolution.WithMergedLinkedFileChangesAsync(oldSolution, solutionChanges, cancellationToken: CancellationToken.None).Result;
Microsoft.CodeAnalysis.Workspaces.MSBuild (2)
MSBuild\MSBuildWorkspace.cs (2)
355var buildHost = _applyChangesBuildHostProcessManager.GetBuildHostWithFallbackAsync(projectPath, CancellationToken.None).Result; 356_applyChangesProjectFile = buildHost.LoadProjectFileAsync(projectPath, languageName, CancellationToken.None).Result;
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (1)
Rpc\Contracts\TextReaderExtensions.cs (1)
43return readLineTask.Result;
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (3)
VisualStudioMSBuildWorkspaceTests.cs (3)
2827var sol = ObjectReference.CreateFromFactory(() => MSBuildWorkspace.Create().OpenSolutionAsync(GetSolutionFileName("TestSolution.sln")).Result); 2831var tree = document.UseReference(static d => d.GetSyntaxTreeAsync().Result); 2836var compilation = document.GetObjectReference(static d => d.GetSemanticModelAsync(CancellationToken.None).Result);
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (2)
MEF\ExportProviderCache.cs (2)
65var parts = Task.Run(async () => await discovery.CreatePartsAsync(assemblies).ConfigureAwait(false)).Result; 76var parts = Task.Run(async () => await discovery.CreatePartsAsync(types).ConfigureAwait(false)).Result;
Microsoft.CodeAnalysis.Workspaces.UnitTests (46)
CodeCleanup\Extensions.cs (1)
27=> (T)document.GetSyntaxRootAsync().Result.GetMember(index);
LinkedFileDiffMerging\LinkedFileDiffMergingTests.cs (2)
50var mergedSolution = updatedSolution.WithMergedLinkedFileChangesAsync(startingSolution).Result; 53AssertEx.EqualOrDiff(expectedMergedText, mergedSolution.GetDocument(documentIds[i]).GetTextAsync().Result.ToString());
SolutionTests\SolutionTests.cs (39)
2975var assemblyReference = (IAssemblySymbol)solution.GetProject(project1).GetCompilationAsync().Result.GetAssemblyOrModuleSymbol(mefReference); 2982assemblyReference = (IAssemblySymbol)solution.GetProject(project1).GetCompilationAsync().Result.GetAssemblyOrModuleSymbol(mefReference); 3190var newRoot = await Formatter.FormatAsync(document, CSharpSyntaxFormattingOptions.Default, CancellationToken.None).Result.GetSyntaxRootAsync(); 3195var newText = solution2.GetDocument(documentId).GetTextAsync().Result.ToString(); 3213var tree = document.GetSyntaxTreeAsync().Result; 3221var tree2 = doc2.GetSyntaxTreeAsync().Result; 3298Assert.Equal(OldFilePath, oldDocument.GetSyntaxTreeAsync().Result.FilePath); 3306Assert.Equal(NewFilePath, newDocument.GetSyntaxTreeAsync().Result.FilePath); 3340var observedText2 = sol.GetDocument(did).GetTextAsync().Result; 3358var docText = doc.GetTextAsync().Result; 3380var docText = doc.GetTextAsync().Result; 3405var docText = doc.GetTextAsync().Result; 3425var docTree = doc.GetSyntaxTreeAsync().Result; 3446var docTree = doc.GetSyntaxTreeAsync().Result; 3467var docTree = doc.GetSyntaxRootAsync().Result; 3508var compilation = proj.GetCompilationAsync().Result; 3528var docModel = doc.GetSemanticModelAsync().Result; 3553var observedText = solution.GetDocument(documentId).GetTextAsync().Result; 3584var observedText = solution.GetDocument(documentId).GetTextAsync().Result; 3616var observedTree = solution.GetDocument(documentId).GetSyntaxRootAsync().Result; 3642var observedTree = solution.GetDocument(documentId).GetSyntaxRootAsync().Result; 3710var tree = doc.GetSyntaxTreeAsync().Result; 3719var newRoot = doc.GetSyntaxRootAsync().Result.WithAdditionalAnnotations(SyntaxAnnotation.ElasticAnnotation); 3727var tree2 = doc2.GetSyntaxTreeAsync().Result; 3757var observed = solution.GetProject(projectId).GetCompilationAsync().Result; 3782var observed = solution.GetProject(projectId).GetCompilationAsync().Result; 4005var comp3 = project3.GetCompilationAsync().Result; 4013comp3 = project3.GetCompilationAsync().Result; 4026Assert.Equal(Encoding.UTF32, doc.GetTextAsync().Result.Encoding); 4029var root = doc.GetSyntaxRootAsync().Result; 4033Assert.Equal(Encoding.UTF32, newDoc.GetTextAsync().Result.Encoding); 4042Assert.Empty(project.GetCompilationAsync().Result.ExternalReferences); 4074Assert.Equal(2, project2.GetCompilationAsync().Result.ExternalReferences.Length); 4103Assert.Single(project2.GetCompilationAsync().Result.ExternalReferences); 4611return solution.GetProject(pid).GetCompilationAsync().Result.SyntaxTrees.ToImmutableArray(); 4927Assert.Null(document.GetSyntaxTreeAsync().Result); 4931Assert.Null(document.GetSemanticModelAsync().Result); 4965Assert.Null(solution.GetDocument(documentId)!.GetSyntaxTreeAsync().Result); 4969Assert.Null(solution.GetDocument(documentId)!.GetSyntaxTreeAsync().Result);
WorkspaceTests\AdhocWorkspaceTests.cs (4)
438Assert.True(tcs.Task.IsCompleted && tcs.Task.Result); 473Assert.True(tcs.Task.IsCompleted && tcs.Task.Result); 505Assert.True(tcs.Task.IsCompleted && tcs.Task.Result); 536Assert.True(tcs.Task.IsCompleted && tcs.Task.Result);
Microsoft.DotNet.Arcade.Sdk (2)
src\DownloadFile.cs (2)
75return DownloadFromUriAsync(Uri).Result; 97if (DownloadFromUriAsync(uri).Result) {
Microsoft.DotNet.Deployment.Tasks.Links (5)
Microsoft.DotNet.SignTool (1)
src\VerifySignatures.cs (1)
153var signature = par.GetPrimarySignatureAsync(CancellationToken.None).Result;
Microsoft.Extensions.AI.Abstractions (1)
Functions\AIFunctionFactory.cs (1)
1019private static readonly MethodInfo _taskGetResult = typeof(Task<>).GetProperty(nameof(Task<int>.Result), BindingFlags.Instance | BindingFlags.Public)!.GetMethod!;
Microsoft.Extensions.Caching.Hybrid (6)
Internal\DefaultHybridCache.L2.cs (1)
44return new(GetValidPayloadSegment(pendingLegacy.Result)); // already complete
Internal\DefaultHybridCache.StampedeStateT.cs (1)
149return new(task.Result.GetReservedValue(log));
Internal\DefaultHybridCache.TagInvalidation.cs (4)
73if (timestamp <= _globalInvalidateTimestamp.Result) 91return timestamp <= pending.Result; 131return timestamp <= pending.Result; 187return new(timestamp <= pending.Result);
Microsoft.Extensions.Caching.MicroBenchmarks (2)
DistributedCacheBenchmarks.cs (2)
138total += (pendingBlobs[i].Result)?.Length ?? 0; 193total += (pendingBlobs[i].Result)?.Length ?? 0;
Microsoft.Extensions.Diagnostics.HealthChecks (1)
DefaultHealthCheckService.cs (1)
65entries[registration.Name] = tasks[index++].Result;
Microsoft.JSInterop (1)
Infrastructure\TaskGenericsUtil.cs (1)
69public object? GetResult(Task task) => ((Task<T>)task).Result!;
Microsoft.Maui (1)
Handlers\HybridWebView\HybridWebViewHandler.cs (1)
280 var resultProperty = dotnetMethod.ReturnType.GetProperty(nameof(Task<object>.Result));
Microsoft.Maui.Controls (1)
Internals\AsyncValue.cs (1)
81 return _valueTask.Result;
Microsoft.Maui.Essentials (1)
Types\Shared\Utils.shared.cs (1)
39 return retTask is Task<T> ? task.Result : default(T);
Microsoft.ML.AutoML (1)
AutoMLExperiment\AutoMLExperiment.cs (1)
204return this.RunAsync().Result;
Microsoft.ML.Core (1)
Utilities\TaskExtensions.cs (1)
17return task.Result;
Microsoft.ML.Data (6)
Commands\CrossValidationCommand.cs (6)
205EvaluateUtils.GetEvaluator(Host, tasks[0].Result.ScoreSchema); 210var dict = tasks[i].Result.Metrics; 216if (!TryGetOverallMetrics(tasks.Select(t => t.Result.Metrics).ToArray(), out var overallList)) 221eval.PrintAdditionalMetrics(ch, tasks.Select(t => t.Result.Metrics).ToArray()); 222Dictionary<string, IDataView>[] metricValues = tasks.Select(t => t.Result.Metrics).ToArray(); 229ImplOptions.OutputExampleFoldIndex, tasks.Select(t => t.Result.PerInstanceResults).ToArray(), out var variableSizeVectorColumnNames);
Microsoft.ML.PerformanceTests (5)
ImageClassificationBench.cs (5)
163var headerResponse = client.GetAsync(url, HttpCompletionOption.ResponseHeadersRead).Result; 171var response = client.GetAsync(url).Result; 173using Stream contentStream = response.Content.ReadAsStreamAsync().Result; 180var response = client.GetAsync(url).Result; 182using Stream contentStream = response.Content.ReadAsStreamAsync().Result;
Microsoft.ML.Samples (1)
Dynamic\TensorFlow\ImageClassification.cs (1)
30modelLocation = downloadTask.Result;
Microsoft.ML.Samples.GPU (1)
docs\samples\Microsoft.ML.Samples\Dynamic\TensorFlow\ImageClassification.cs (1)
30modelLocation = downloadTask.Result;
Microsoft.VisualStudio.LanguageServices (4)
CommonControls\MemberSelectionViewModel.cs (1)
184foreach (var dependent in _symbolToDependentsMap[currentMember].Result)
MoveStaticMembers\StaticMemberSelectionViewModel.cs (1)
97foreach (var dependent in _symbolToDependentsMap[currentMember].Result)
Packaging\PackageInstallerServiceFactory.cs (1)
153return localPackageSourcesTask.Result;
Preview\PreviewEngine.cs (1)
67_newSolution = newSolution.WithMergedLinkedFileChangesAsync(oldSolution, cancellationToken: CancellationToken.None).Result;
Microsoft.VisualStudio.LanguageServices.UnitTests (9)
Preview\PreviewChangesTests.vb (9)
40Dim text = document.GetTextAsync().Result 93Dim text = document.GetTextAsync().Result 135Dim text = document.GetTextAsync().Result 159Assert.Equal(document.GetTextAsync().Result.ToString(), finalText) 188Dim text = document.GetTextAsync().Result 235Assert.Equal(forkedDocument.GetTextAsync().Result.ToString(), changedDocText) 237Dim finalAddedDocText = finalSolution.GetDocument(addedDocumentId1).GetTextAsync().Result.ToString() 274Dim text1 = document1.GetTextAsync().Result 277Dim text2 = document2.GetTextAsync().Result
Roslyn.Diagnostics.Analyzers (5)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (4)
191result = _cachedResult.Result; 217return _cachedResult.Result; 313return _cachedResult.Result; 589this.TrySetResult(task.Result);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TaskExtensions.cs (1)
56return task.Result;
Roslyn.VisualStudio.Next.UnitTests (1)
Remote\SerializationValidator.cs (1)
63Children = [.. collection.Select(c => validator.GetValueAsync<T>(c).Result)];
ScenarioTests.Common.Tests (3)
ScenarioTestTypes.cs (3)
939return _tcs.Task.Result; 951return _xml_tcs.Task.Result; 963return _datacontract_tcs.Task.Result;
Security.TransportSecurity.IntegrationTests (4)
Tcp\StreamingTests.4.1.0.cs (4)
169while ((bytesRead = returnStream.ReadAsync(buffer, 0, buffer.Length).Result) != 0) 274var returnStream = serviceProxy.EchoStreamAsync(stream).Result; 315var returnStream = serviceProxy.EchoStreamAsync(stream).Result; 356var returnStream = serviceProxy.EchoStreamAsync(stream).Result;
Sockets.BindTests (1)
src\Servers\Kestrel\shared\test\StreamBackedTestConnection.cs (1)
141var bytesTransferred = await _stream.ReadAsync(buffer, 0, 128).ContinueWith(t => t.IsFaulted ? 0 : t.Result).TimeoutAfter(Timeout);
Sockets.FunctionalTests (1)
src\Servers\Kestrel\shared\test\StreamBackedTestConnection.cs (1)
141var bytesTransferred = await _stream.ReadAsync(buffer, 0, 128).ContinueWith(t => t.IsFaulted ? 0 : t.Result).TimeoutAfter(Timeout);
Stress.AppHost (2)
InteractionCommands.cs (2)
23if (resultTask1.Result.Data != true || resultTask2.Result.Data != true)
Swaggatherer (1)
src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (1)
140Invoke = () => invoke().Result;
System.Data.Odbc (4)
Common\System\Data\ProviderBase\DbConnectionFactory.cs (3)
116if (!retry.TrySetResult(task.Result)) 121task.Result.DoomThisConnection(); 122task.Result.Dispose();
src\libraries\Common\src\System\Data\ProviderBase\DbConnectionClosed.cs (1)
101DbConnectionInternal openConnection = retry.Task.Result;
System.IO.FileSystem.Watcher (1)
System\IO\FileSystemWatcher.cs (1)
605tcs.Task.Result :
System.Net.Http (5)
System\Net\Http\HttpContent.cs (2)
285return t.Status == TaskStatus.RanToCompletion ? t.Result : null; 639(_contentReadStream is Task<Stream> t && t.Status == TaskStatus.RanToCompletion ? t.Result : null);
System\Net\Http\MessageProcessingHandler.cs (2)
78if (task.Result == null) 86HttpResponseMessage responseMessage = self.ProcessResponse(task.Result, token);
System\Net\Http\SocketsHttpHandler\HttpConnection.cs (1)
740if (!allowExpect100ToContinue.Task.Result) // if Result is true, the timeout already expired and we started sending content
System.Net.NameResolution (6)
System\Net\Dns.cs (6)
103/// The task object representing the asynchronous operation. The <see cref="Task{TResult}.Result"/> property on the task object returns 116/// The task object representing the asynchronous operation. The <see cref="Task{TResult}.Result"/> property on the task object returns 130NetEventSource.Info(hostNameOrAddress, $"{t.Result} with {t.Result.AddressList.Length} entries"); 233/// The task object representing the asynchronous operation. The <see cref="Task{TResult}.Result"/> property on the task object returns an array of 246/// The task object representing the asynchronous operation. The <see cref="Task{TResult}.Result"/> property on the task object returns an array of
System.Net.Ping (1)
System\Net\NetworkInformation\Ping.cs (1)
527var e = new PingCompletedEventArgs(t.IsCompletedSuccessfully ? t.Result : null, t.Exception, t.IsCanceled, asyncOp.UserSuppliedState);
System.Net.Quic (1)
System\Net\Quic\QuicConnection.cs (1)
757return task.Result ? QUIC_STATUS_SUCCESS : QUIC_STATUS_BAD_CERTIFICATE;
System.Net.Requests (1)
System\Net\HttpWebRequest.cs (1)
1067return InternalGetRequestStream().Result;
System.Net.Security (2)
src\libraries\Common\src\System\Net\Http\X509ResourceClient.cs (2)
33return task.Result; 70return task.Result;
System.Net.Sockets (3)
System\Net\Sockets\Socket.cs (3)
2654return ti.Result; 2676EndPoint resultEp = t.Result.RemoteEndPoint; 2717EndPoint resultEp = t.Result.RemoteEndPoint;
System.Private.CoreLib (31)
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\YieldAwaitable.cs (3)
162log.TaskWaitContinuationStarted(((Task<int>)continuationIdTask).Result); 168EventSource.SetCurrentThreadActivityId(TplEventSource.CreateGuidForTaskID(((Task<int>)continuationIdTask).Result), out prevActivityId); 177log.TaskWaitContinuationComplete(((Task<int>)continuationIdTask).Result);
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\CachedCompletedInt32Task.cs (1)
27if (task.Result == result)
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\ConcurrentExclusiveSchedulerPair.cs (1)
643return t.Result;
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Future.cs (10)
102/// the task's <see cref="Result"/> property will be set to return the result value of the function. 119/// the task's <see cref="Result"/> property will be set to return the result value of the function. 139/// the task's <see cref="Result"/> property will be set to return the result value of the function. 162/// the task's <see cref="Result"/> property will be set to return the result value of the function. 189/// the task's <see cref="Result"/> property will be set to return the result value of the function. 206/// the task's <see cref="Result"/> property will be set to return the result value of the function. 227/// the task's <see cref="Result"/> property will be set to return the result value of the function. 253/// the task's <see cref="Result"/> property will be set to return the result value of the function. 425/// immediately on later calls to <see cref="Result"/>. 1428public TResult? Result => m_task.Status == TaskStatus.RanToCompletion ? m_task.Result : default;
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\FutureFactory.cs (8)
1629static (starter, continuationFunction) => ((Func<Task<TAntecedentResult>[], TResult>)continuationFunction!)(starter.Result), 1639((Action<Task<TAntecedentResult>[]>)continuationAction!)(starter.Result); 1680return ((Func<Task[], TResult>)state)(completedTasks.Result); 1692((Action<Task[]>)state)(completedTasks.Result); return default!; 2000return ((Func<Task, TResult>)state)(completedTask.Result); 2011((Action<Task>)state)(completedTask.Result); 2047static (starter, continuationFunction) => ((Func<Task<TAntecedentResult>, TResult>)continuationFunction!)(starter.Result), 2056((Action<Task<TAntecedentResult>>)continuationAction!)(starter.Result);
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Task.cs (5)
2925_ => completingTask is Task<TResult> taskTResult ? TrySetResult(taskTResult.Result) : TrySetResult(), 5361signaledTaskIndex = Array.IndexOf(tasks, firstCompleted.Result); 7490taskOfTaskOfTResult.Result : ((Task<Task>)task).Result); 7535result = TrySetResult(task is Task<TResult> taskTResult ? taskTResult.Result : default);
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskCompletionSource_T.cs (1)
337result = _task.TrySetResult(completedTask.Result);
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskExtensions.cs (2)
21task.Result ?? 37task.Result ??
System.Private.Xml (17)
System\Xml\AsyncHelper.cs (1)
83return task.Result ? DoneTaskTrue : func(arg);
System\Xml\Core\XmlTextReaderImplAsync.cs (15)
277return ReadAsync_SwitchToInteractiveXmlDecl_Helper(task.Result); 424if (!task.Result) 545if (!task.Result) 1657if (task.Result) 1930var tuple_4 = task.Result; 3377return _parseText_dummyTask.Result; 3393return _parseText_dummyTask.Result; 3417return _parseText_dummyTask.Result; 3429return _parseText_dummyTask.Result; 3438return _parseText_dummyTask.Result; 3448return _parseText_dummyTask.Result; 3464return _parseText_dummyTask.Result; 3484return _parseText_dummyTask.Result; 3495return _parseText_dummyTask.Result; 3503return _parseText_dummyTask.Result;
System\Xml\Core\XsdValidatingReaderAsync.cs (1)
226if (task.Result)
System.Security.Cryptography (2)
src\libraries\Common\src\System\Net\Http\X509ResourceClient.cs (2)
33return task.Result; 70return task.Result;
System.Security.Cryptography.Cose (2)
System\Security\Cryptography\Cose\CoseMultiSignMessage.cs (1)
229/// <returns>A task that represents the asynchronous operation. The value of its <see cref="Task{T}.Result"/> property contains the encoded message.</returns>
System\Security\Cryptography\Cose\CoseSign1Message.cs (1)
189/// <returns>A task that represents the asynchronous operation. The value of its <see cref="Task{T}.Result"/> property contains the encoded message.</returns>
System.ServiceModel.Federation (1)
System\Runtime\TaskHelpers.cs (1)
56tcsObj.TrySetResult(antecedent.Result);
System.ServiceModel.Primitives.Tests (8)
IdentityModel\SecurityTokenProviderTest.cs (8)
44token = provider.GetTokenAsync(TimeSpan.Zero).Result; 47token = provider.RenewTokenAsync(TimeSpan.Zero, token).Result; 80token = provider.GetTokenAsync(TimeSpan.Zero).Result; 83token = provider.RenewTokenAsync(TimeSpan.Zero, token).Result; 118token = provider.GetTokenAsync(TimeSpan.Zero).Result; 121token = provider.RenewTokenAsync(TimeSpan.Zero, token).Result; 169return ((Task<SecurityToken>)result).Result; 188return ((Task<SecurityToken>)result).Result;
System.Threading.Tasks.Dataflow (20)
Base\DataflowBlock.cs (18)
251/// from the call the resulting <see cref="System.Threading.Tasks.Task{Boolean}"/> will be completed and its <see cref="System.Threading.Tasks.Task{Boolean}.Result">Result</see> 253/// be completed and its <see cref="System.Threading.Tasks.Task{Boolean}.Result">Result</see> property will return false. If the target 255/// point the Task will complete, with its <see cref="System.Threading.Tasks.Task{Boolean}.Result"/> indicating whether the message was consumed. If the target 273/// from the call the resulting <see cref="System.Threading.Tasks.Task{Boolean}"/> will be completed and its <see cref="System.Threading.Tasks.Task{Boolean}.Result">Result</see> 275/// be completed and its <see cref="System.Threading.Tasks.Task{Boolean}.Result">Result</see> property will return false. If the target 277/// point the Task will complete, with its <see cref="System.Threading.Tasks.Task{Boolean}.Result"/> indicating whether the message was consumed. If the target 780/// the returned task will be completed and its <see cref="System.Threading.Tasks.Task{TOutput}.Result">Result</see> will return the received item. If an item cannot be retrieved, 797/// the returned task will be completed and its <see cref="System.Threading.Tasks.Task{TOutput}.Result">Result</see> will return the received item. If an item cannot be retrieved, 814/// the returned task will be completed and its <see cref="System.Threading.Tasks.Task{TOutput}.Result">Result</see> will return the received item. If an item cannot be retrieved, 835/// the returned task will be completed and its <see cref="System.Threading.Tasks.Task{TOutput}.Result">Result</see> will return the received item. If an item cannot be retrieved, 1377/// more output is available. When the task completes, if its <see cref="System.Threading.Tasks.Task{Boolean}.Result"/> is true, more output 1396/// more output is available. When the task completes, if its <see cref="System.Threading.Tasks.Task{Boolean}.Result"/> is true, more output 1650/// will end with its <see cref="System.Threading.Tasks.Task{Int32}.Result"/> set to either 0 or 1 to 1685/// will end with its <see cref="System.Threading.Tasks.Task{Int32}.Result"/> set to either 0 or 1 to 1733/// will end with its <see cref="System.Threading.Tasks.Task{Int32}.Result"/> set to the 0-based index of the source. 1773/// will end with its <see cref="System.Threading.Tasks.Task{Int32}.Result"/> set to the 0-based index of the source. 1958int resultBranchId = task.Result; 2042action(completed.Result);
Blocks\TransformBlock.cs (1)
280outputItem = completed.Result;
Blocks\TransformManyBlock.cs (1)
262IEnumerable<TOutput> outputItems = completed.Result;
Templates.Blazor.Tests (1)
src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (1)
140Invoke = () => invoke().Result;
Templates.Blazor.WebAssembly.Auth.Tests (1)
src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (1)
140Invoke = () => invoke().Result;
Templates.Blazor.WebAssembly.Tests (1)
src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (1)
140Invoke = () => invoke().Result;
Templates.Mvc.Tests (1)
src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (1)
140Invoke = () => invoke().Result;
Templates.Tests (1)
src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (1)
140Invoke = () => invoke().Result;
Test.Utilities (6)
CodeMetricsTestsBase.cs (1)
75var compilation = project.GetCompilationAsync(CancellationToken.None).Result!;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (4)
191result = _cachedResult.Result; 217return _cachedResult.Result; 313return _cachedResult.Result; 589this.TrySetResult(task.Result);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TaskExtensions.cs (1)
56return task.Result;
Text.Analyzers (5)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (4)
191result = _cachedResult.Result; 217return _cachedResult.Result; 313return _cachedResult.Result; 589this.TrySetResult(task.Result);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TaskExtensions.cs (1)
56return task.Result;
vbc (1)
src\Compilers\Shared\BuildClient.cs (1)
237buildResponse = buildResponseTask.Result;
VBCSCompiler (3)
src\Compilers\Server\VBCSCompiler\ServerDispatcher.cs (2)
119_listenTask.Result.Dispose(); 284var completionData = current.Result;
src\Compilers\Shared\BuildClient.cs (1)
237buildResponse = buildResponseTask.Result;
VBCSCompiler.UnitTests (1)
NamedPipeClientConnectionHostTests.cs (1)
109item.Result?.Dispose();
Wasm.Performance.ConsoleHost (1)
src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (1)
140Invoke = () => invoke().Result;