30 references to RunAsync
Microsoft.CodeAnalysis.CSharp.Scripting.Desktop.UnitTests (4)
InteractiveSessionReferencesTests.cs (4)
174var state = await script.RunAsync().ContinueWith<IEnumerable<int>>("x", options.WithFilePath(null)); 274Assert.NotNull(script.RunAsync().Result.ReturnValue); 537var s0 = await CSharpScript.Create("new C()", options: ScriptOptions.AddReferences(portableLibRef), assemblyLoader: loader).RunAsync(); 586int result = script.RunAsync(globals).Result.ReturnValue;
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (20)
InteractiveSessionTests.cs (11)
1141RunAsync(). 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; 1865ScriptingTestHelpers.AssertCompilationError(() => script.RunAsync(new F()).Wait(), 1887ScriptingTestHelpers.AssertCompilationError(() => script.RunAsync(new F()).Wait(), 1930var state1 = await s1.RunAsync(catchException: e => true); 1957var state2 = await s2.RunAsync(catchException: e => true); 1985var state3 = await s3.RunAsync(catchException: e => true); 2048var state3 = await s3.RunAsync(globals, catchException: e => true, cancellationToken: cancellationSource.Token); 2082var state3 = await s3.RunAsync(globals, catchException: e => true, cancellationToken: cancellationSource.Token); 2117s3.RunAsync(globals, catchException: e => e is not OperationCanceledException, cancellationToken: cancellationSource.Token));
ScriptTests.cs (9)
140var state = await script.RunAsync(); 149var state = await script.RunAsync(); 298var state = await script.RunAsync(new Globals { X = 1, Y = 2 }); 309await Assert.ThrowsAsync<ArgumentException>("globals", () => script.RunAsync(new Globals { X = 1, Y = 2 })); 318await Assert.ThrowsAsync<ArgumentException>("globals", () => script.RunAsync()); 327await Assert.ThrowsAsync<ArgumentException>("globals", () => script.RunAsync(new object())); 401var state = await script.RunAsync(globals); 421var s1 = await script.RunAsync(); 1115await script.RunAsync();
Microsoft.CodeAnalysis.InteractiveHost (1)
Interactive\Core\InteractiveHost.Service.cs (1)
755? script.RunAsync(serviceState.Globals, catchException: e => true, cancellationToken: CancellationToken.None)
Microsoft.CodeAnalysis.Scripting (3)
Hosting\CommandLine\CommandLineRunner.cs (1)
306? newScript.RunAsync(globals, catchException: e => true, cancellationToken: cancellationToken)
Script.cs (2)
382=> RunAsync(globals, catchException, cancellationToken).CastAsync<ScriptState<T>, ScriptState>(); 470=> RunAsync(globals, null, cancellationToken);
Microsoft.CodeAnalysis.Scripting.TestUtilities (1)
ScriptingTestHelpers.cs (1)
26var task = script.RunAsync();
Microsoft.CodeAnalysis.VisualBasic.Scripting.UnitTests (1)
ScriptTests.vb (1)
49Dim state = Await script.RunAsync()