678 references to Result
Analyzer.Utilities.UnitTests (2)
aspire (1)
Aspire.Hosting.Testing (1)
Aspire.Templates.Tests (2)
Binding.Http.IntegrationTests (1)
Client.ChannelLayer.IntegrationTests (1)
Client.TypedClient.IntegrationTests (4)
ClientSample (1)
Contract.Service.IntegrationTests (4)
Contract.XmlSerializer.IntegrationTests (1)
csc (1)
dotnet-dev-certs (1)
dotnet-getdocument (1)
dotnet-openapi (1)
dotnet-sql-cache (1)
dotnet-svcutil.xmlserializer.IntegrationTests (1)
dotnet-svcutil-lib (13)
dotnet-svcutil-lib.Tests (15)
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;
dotnet-user-jwts (1)
dotnet-user-secrets (1)
GenerateDocumentationAndConfigFiles (5)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TaskExtensions.cs (1)
56return task.Result;
GetDocument.Insider (1)
IdeBenchmarks (4)
IdeCoreBenchmarks (10)
IIS.FunctionalTests (2)
IIS.LongTests (1)
IIS.Microbenchmarks (1)
IIS.NewHandler.FunctionalTests (1)
IIS.NewShim.FunctionalTests (1)
IIS.ShadowCopy.Tests (1)
IISExpress.FunctionalTests (2)
InMemory.FunctionalTests (1)
Metrics (5)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TaskExtensions.cs (1)
56return task.Result;
Metrics.Legacy (5)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TaskExtensions.cs (1)
56return task.Result;
Microsoft.AspNetCore.Authentication.Test (3)
Microsoft.AspNetCore.Authorization (3)
Microsoft.AspNetCore.Components (1)
Microsoft.AspNetCore.Components.Analyzers.Tests (9)
Microsoft.AspNetCore.Components.Authorization.Tests (1)
Microsoft.AspNetCore.Components.SdkAnalyzers.Tests (9)
Microsoft.AspNetCore.Components.Tests (18)
Microsoft.AspNetCore.Components.WebAssembly (1)
Microsoft.AspNetCore.Cors (1)
Microsoft.AspNetCore.Grpc.JsonTranscoding (3)
Microsoft.AspNetCore.Http.Connections.Tests (1)
Microsoft.AspNetCore.Http.Extensions (1)
Microsoft.AspNetCore.HttpOverrides (1)
Microsoft.AspNetCore.InternalTesting.Tests (1)
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation (1)
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.Test (4)
Microsoft.AspNetCore.Mvc.ViewFeatures (1)
Microsoft.AspNetCore.Routing (1)
Microsoft.AspNetCore.Routing.Tests (1)
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (1)
Microsoft.AspNetCore.Shared.Tests (1)
Microsoft.AspNetCore.SignalR.Client.Core (28)
Microsoft.AspNetCore.SignalR.Client.FunctionalTests (1)
Microsoft.AspNetCore.SpaServices.Extensions (2)
Microsoft.Build.Tasks.CodeAnalysis (1)
Microsoft.Build.Tasks.CodeAnalysis.Sdk (1)
Microsoft.CodeAnalysis (5)
Microsoft.CodeAnalysis.Analyzers (5)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TaskExtensions.cs (1)
56return task.Result;
Microsoft.CodeAnalysis.AnalyzerUtilities (5)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TaskExtensions.cs (1)
56return task.Result;
Microsoft.CodeAnalysis.BannedApiAnalyzers (5)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TaskExtensions.cs (1)
56return task.Result;
Microsoft.CodeAnalysis.CodeStyle (5)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TaskExtensions.cs (1)
56return task.Result;
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (11)
Diagnostics\DiagnosticAnalyzerDriver\DiagnosticAnalyzerDriverTests.cs (8)
65await DiagnosticProviderTestUtilities.GetAllDiagnosticsAsync(workspace, document, new TextSpan(0, document.GetTextAsync().Result.Length));
93await DiagnosticProviderTestUtilities.GetAllDiagnosticsAsync(ideEngineWorkspace, ideEngineDocument, new TextSpan(0, ideEngineDocument.GetTextAsync().Result.Length));
105var compilerEngineCompilation = (CSharpCompilation)compilerEngineWorkspace.CurrentSolution.Projects.Single().GetRequiredCompilationAsync(CancellationToken.None).Result;
129return await DiagnosticProviderTestUtilities.GetAllDiagnosticsAsync(workspace, document, new TextSpan(0, document.GetTextAsync().Result.Length));
175await DiagnosticProviderTestUtilities.GetAllDiagnosticsAsync(workspace, sourceDocument, new TextSpan(0, sourceDocument.GetTextAsync().Result.Length));
205var diagnostics = await DiagnosticProviderTestUtilities.GetAllDiagnosticsAsync(workspace, ideEngineDocument, new TextSpan(0, ideEngineDocument.GetTextAsync().Result.Length));
261var diagnostics = await DiagnosticProviderTestUtilities.GetAllDiagnosticsAsync(ideEngineWorkspace, ideEngineDocument, new TextSpan(0, ideEngineDocument.GetTextAsync().Result.Length));
279var compilerEngineCompilation = (CSharpCompilation)compilerEngineWorkspace.CurrentSolution.Projects.Single().GetRequiredCompilationAsync(CancellationToken.None).Result;
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Features (1)
Microsoft.CodeAnalysis.CSharp.Scripting.Desktop.UnitTests (18)
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;
Microsoft.CodeAnalysis.EditorFeatures (4)
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (3)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (12)
Snippets\RoslynLSPSnippetConvertTests.cs (2)
320[], new TextChange(new TextSpan(8, 0), "quux"), triggerLocation: 12, CancellationToken.None).Result;
331[], new TextChange(new TextSpan(4, 4), "bar quux"), triggerLocation: 12, CancellationToken.None).Result;
Microsoft.CodeAnalysis.ExternalAccess.Extensions (1)
Microsoft.CodeAnalysis.Features.Test.Utilities (5)
EditAndContinue\EditAndContinueTestVerifier.cs (5)
185var oldModel = oldDocument.GetSemanticModelAsync().Result;
186var newModel = newDocument.GetSemanticModelAsync().Result;
191var result = Analyzer.AnalyzeDocumentAsync(newDocument.Id, oldProject, newProject, lazyOldActiveStatementMap, newActiveStatementSpans, lazyCapabilities, log, CancellationToken.None).Result;
278EditSession.MergePartialEdits(oldProject.GetCompilationAsync().Result!, newProject.GetCompilationAsync().Result!, allEdits, out var mergedEdits, out _, CancellationToken.None);
Microsoft.CodeAnalysis.Features.UnitTests (1)
Microsoft.CodeAnalysis.InteractiveHost (6)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TaskExtensions.cs (1)
56return task.Result;
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (5)
Microsoft.CodeAnalysis.PublicApiAnalyzers (5)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TaskExtensions.cs (1)
56return task.Result;
Microsoft.CodeAnalysis.ResxSourceGenerator (5)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TaskExtensions.cs (1)
56return task.Result;
Microsoft.CodeAnalysis.Scripting.TestUtilities (4)
Microsoft.CodeAnalysis.Test.Utilities (1)
Microsoft.CodeAnalysis.UnitTests (4)
Microsoft.CodeAnalysis.Workspaces (8)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TaskExtensions.cs (1)
56return task.Result;
Microsoft.CodeAnalysis.Workspaces.MSBuild (2)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (1)
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (7)
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (3)
Microsoft.CodeAnalysis.Workspaces.UnitTests (47)
Microsoft.DotNet.Arcade.Sdk (2)
Microsoft.DotNet.Build.Tasks.Feed (3)
Microsoft.DotNet.Deployment.Tasks.Links (5)
Microsoft.DotNet.SignCheckLibrary (1)
Microsoft.DotNet.SignTool (1)
Microsoft.Extensions.AI.Abstractions (1)
Microsoft.Extensions.Caching.Hybrid (5)
Microsoft.Extensions.Caching.MicroBenchmarks (2)
Microsoft.Extensions.Diagnostics.HealthChecks (1)
Microsoft.JSInterop (1)
Microsoft.Maui (1)
Microsoft.Maui.Controls (1)
Microsoft.Maui.Essentials (1)
Microsoft.ML.AutoML (1)
Microsoft.ML.Core (1)
Microsoft.ML.Data (6)
Microsoft.ML.PerformanceTests (5)
Microsoft.ML.Samples (1)
Microsoft.ML.Samples.GPU (1)
Microsoft.VisualStudio.LanguageServices (5)
Microsoft.VisualStudio.LanguageServices.CSharp (1)
Microsoft.VisualStudio.LanguageServices.Implementation (7)
Roslyn.Diagnostics.Analyzers (5)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TaskExtensions.cs (1)
56return task.Result;
Roslyn.VisualStudio.Next.UnitTests (1)
ScenarioTests.Common.Tests (3)
Security.TransportSecurity.IntegrationTests (4)
Sockets.BindTests (1)
Sockets.FunctionalTests (1)
Stress.AppHost (2)
Swaggatherer (1)
System.Data.Odbc (4)
System.IO.FileSystem.Watcher (1)
System.Net.Http (5)
System.Net.NameResolution (6)
System.Net.Ping (1)
System.Net.Quic (1)
System.Net.Requests (1)
System.Net.Security (2)
System.Net.Sockets (3)
System.Private.CoreLib (31)
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\ConcurrentExclusiveSchedulerPair.cs (1)
643return t.Result;
System.Private.Xml (17)
System.Security.Cryptography (2)
System.Security.Cryptography.Cose (2)
System.ServiceModel.Federation (1)
System.ServiceModel.Http (1)
System.ServiceModel.Primitives (6)
System.ServiceModel.Primitives.Tests (8)
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);
Templates.Blazor.Tests (1)
Templates.Blazor.WebAssembly.Auth.Tests (1)
Templates.Blazor.WebAssembly.Tests (1)
Templates.Mvc.Tests (1)
Templates.Tests (1)
Test.Utilities (6)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TaskExtensions.cs (1)
56return task.Result;
Text.Analyzers (5)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TaskExtensions.cs (1)
56return task.Result;
vbc (1)
VBCSCompiler (3)
VBCSCompiler.UnitTests (1)
Wasm.Performance.ConsoleHost (1)