58 references to ContinueWithAsync
Microsoft.CodeAnalysis.CSharp.Scripting.Desktop.UnitTests (32)
InteractiveSessionReferencesTests.cs (32)
51var s1 = s0.ContinueWithAsync($"#r \"{typeof(Process).Assembly.Location}\""); 64var s1 = s0.ContinueWithAsync(@"Process.GetCurrentProcess()", newOptions); 74var s1 = s0.ContinueWithAsync($@" 207var s2 = await s1.ContinueWithAsync(@" 515var s1 = await s0.ContinueWithAsync($@" 633var s1 = await s0.ContinueWithAsync($@"var l1 = new Lib1();"); 634var s2 = await s1.ContinueWithAsync($@"#r ""{file2.Path}"""); 635var s3 = await s2.ContinueWithAsync($@"var l2 = new Lib2();"); 636var s4 = await s3.ContinueWithAsync($@"l2.libBase.X"); 691var s1 = await s0.ContinueWithAsync($@"var l1 = new Lib1();"); 692var s2 = await s1.ContinueWithAsync($@"#r ""{file2.Path}"""); 693var s3 = await s2.ContinueWithAsync($@"var l2 = new Lib2();"); 694var s4 = await s3.ContinueWithAsync($@"l2.libBase.X"); 757var s1 = await s0.ContinueWithAsync($@"var l1 = new Lib1();"); 758var s2 = await s1.ContinueWithAsync($@"#r ""{file2.Path}"""); 763await s2.ContinueWithAsync($@"var l2 = new Lib2();"); 825var s1 = await s0.ContinueWithAsync($@"new Lib1().libBase.X"); 826var s2 = await s1.ContinueWithAsync($@"#r ""{file2.Path}"""); 831await s2.ContinueWithAsync($@"new Lib2().libBase.X"); 893var s1 = await s0.ContinueWithAsync($@"new Lib1().libBase.X"); 894var s2 = await s1.ContinueWithAsync($@"#r ""{file2.Path}"""); 899await s2.ContinueWithAsync($@"new Lib2().libBase.X"); 961var s1 = await s0.ContinueWithAsync($@"new Lib1().libBase.X"); 962var s2 = await s1.ContinueWithAsync($@"#r ""{file2.Path}"""); 967await s2.ContinueWithAsync($@"new Lib2().libBase.X"); 1029var s1 = await s0.ContinueWithAsync($@"var l1 = new Lib1().libBase.X;"); 1030var s2 = await s1.ContinueWithAsync($@"#r ""{file2.Path}"""); 1035await s2.ContinueWithAsync($@"var l2 = new Lib2().libBase.X;"); 1097var s1 = await s0.ContinueWithAsync($@"new Lib1().libBase.X"); 1099var s2 = await s1.ContinueWithAsync($@"#r ""{file2.Path}"""); 1100var s3 = await s2.ContinueWithAsync($@"new Lib2().libBase.X"); 1123await s0.ContinueWithAsync("c = new C()");
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (23)
InteractiveSessionTests.cs (15)
624Assert.Throws<CompilationErrorException>(() => s0.ContinueWithAsync("invalid$syntax").Result); 626var s1 = await s0.ContinueWithAsync("x = 2; x = 10"); 628Assert.Throws<CompilationErrorException>(() => s1.ContinueWithAsync("invalid$syntax").Result); 629Assert.Throws<CompilationErrorException>(() => s1.ContinueWithAsync("x = undefined_symbol").Result); 631var s2 = await s1.ContinueWithAsync("int y = 2;"); 635var s3 = await s2.ContinueWithAsync("x + y"); 1105var s1 = await s0.ContinueWithAsync("F(async () => await Task.FromResult(4))"); 1108var s2 = await s1.ContinueWithAsync("G(5, async x => await Task.FromResult(x))"); 1153state = await state.ContinueWithAsync("x is (false, var y)"); 1162state = await state.ContinueWithAsync("x is long or int", options: options); 1164state = await state.ContinueWithAsync("x is int and < 10", options: options); 1166state = await state.ContinueWithAsync("x is (long or < 10L)", options: options); 1168state = await state.ContinueWithAsync("x is not > 100", options: options); 2001var state1 = await state0.ContinueWithAsync(@" 2017var state4 = await state2.ContinueWithAsync(@"
ScriptTests.cs (8)
368state = await state.ContinueWithAsync(submission); 430var s3 = await s1.ContinueWithAsync("x"); 463var state2 = await state1.ContinueWithAsync("int M(int x) { return x * x; } M(5)"); 468var state3 = await state1.ContinueWithAsync("M(5)"); 476var state1 = await state0.ContinueWithAsync("System.Func<int, int, int> adder = Add;"); 477var state2 = await state1.ContinueWithAsync("adder(1, 1)"); 485var state1 = await state0.ContinueWithAsync("Id<int>.Get(1)"); 493var state1 = await state0.ContinueWithAsync("Id.Get<int>()(1)");
Microsoft.CodeAnalysis.Scripting.TestUtilities (3)
ScriptingTestHelpers.cs (3)
67AssertCompilationError(() => state.Result.ContinueWithAsync(code).Wait(), expectedDiagnostics); 72AssertCompilationError(() => state.Result.ContinueWithAsync(code).Wait(), expectedDiagnostics); 77AssertCompilationError(() => state.ContinueWithAsync(code).Wait(), expectedDiagnostics);