29 references to RunAsync
Microsoft.CodeAnalysis.CSharp.Scripting.Desktop.UnitTests (4)
InteractiveSessionReferencesTests.cs (4)
172
var state = await script.
RunAsync
().ContinueWith<IEnumerable<int>>("x", options.WithFilePath(null));
272
Assert.NotNull(script.
RunAsync
().Result.ReturnValue);
535
var s0 = await CSharpScript.Create("new C()", options: ScriptOptions.AddReferences(portableLibRef), assemblyLoader: loader).
RunAsync
();
584
int result = script.
RunAsync
(globals).Result.ReturnValue;
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (20)
InteractiveSessionTests.cs (11)
1141
RunAsync
().
1295
var r2 = CSharpScript.Create($@"#r ""{fileMain.Path}""", ScriptOptions).ContinueWith($@"M.X.F").
RunAsync
().Result.ReturnValue;
1326
var r2 = CSharpScript.Create($@"#r ""{fileMain.Path}""", ScriptOptions).ContinueWith($@"M.X.F").
RunAsync
().Result.ReturnValue;
1865
ScriptingTestHelpers.AssertCompilationError(() => script.
RunAsync
(new F()).Wait(),
1887
ScriptingTestHelpers.AssertCompilationError(() => script.
RunAsync
(new F()).Wait(),
1930
var state1 = await s1.
RunAsync
(catchException: e => true);
1957
var state2 = await s2.
RunAsync
(catchException: e => true);
1985
var state3 = await s3.
RunAsync
(catchException: e => true);
2048
var state3 = await s3.
RunAsync
(globals, catchException: e => true, cancellationToken: cancellationSource.Token);
2082
var state3 = await s3.
RunAsync
(globals, catchException: e => true, cancellationToken: cancellationSource.Token);
2117
s3.
RunAsync
(globals, catchException: e => e is not OperationCanceledException, cancellationToken: cancellationSource.Token));
ScriptTests.cs (9)
136
var state = await script.
RunAsync
();
145
var state = await script.
RunAsync
();
294
var state = await script.
RunAsync
(new Globals { X = 1, Y = 2 });
305
await Assert.ThrowsAsync<ArgumentException>("globals", () => script.
RunAsync
(new Globals { X = 1, Y = 2 }));
314
await Assert.ThrowsAsync<ArgumentException>("globals", () => script.
RunAsync
());
323
await Assert.ThrowsAsync<ArgumentException>("globals", () => script.
RunAsync
(new object()));
397
var state = await script.
RunAsync
(globals);
417
var s1 = await script.
RunAsync
();
1156
await script.
RunAsync
();
Microsoft.CodeAnalysis.InteractiveHost (1)
Interactive\Core\InteractiveHost.Service.cs (1)
757
? script.
RunAsync
(serviceState.Globals, catchException: e => true, cancellationToken: CancellationToken.None)
Microsoft.CodeAnalysis.Scripting (3)
Hosting\CommandLine\CommandLineRunner.cs (1)
304
? newScript.
RunAsync
(globals, catchException: e => true, cancellationToken: cancellationToken)
Script.cs (2)
381
=>
RunAsync
(globals, catchException, cancellationToken).CastAsync<ScriptState<T>, ScriptState>();
469
=>
RunAsync
(globals, null, cancellationToken);
Microsoft.CodeAnalysis.Scripting.TestUtilities (1)
ScriptingTestHelpers.cs (1)
24
var task = script.
RunAsync
();