58 references to ContinueWithAsync
Microsoft.CodeAnalysis.CSharp.Scripting.Desktop.UnitTests (32)
InteractiveSessionReferencesTests.cs (32)
49var s1 = s0.ContinueWithAsync($"#r \"{typeof(Process).Assembly.Location}\""); 62var s1 = s0.ContinueWithAsync(@"Process.GetCurrentProcess()", newOptions); 72var s1 = s0.ContinueWithAsync($@" 205var s2 = await s1.ContinueWithAsync(@" 513var s1 = await s0.ContinueWithAsync($@" 631var s1 = await s0.ContinueWithAsync($@"var l1 = new Lib1();"); 632var s2 = await s1.ContinueWithAsync($@"#r ""{file2.Path}"""); 633var s3 = await s2.ContinueWithAsync($@"var l2 = new Lib2();"); 634var s4 = await s3.ContinueWithAsync($@"l2.libBase.X"); 689var s1 = await s0.ContinueWithAsync($@"var l1 = new Lib1();"); 690var s2 = await s1.ContinueWithAsync($@"#r ""{file2.Path}"""); 691var s3 = await s2.ContinueWithAsync($@"var l2 = new Lib2();"); 692var s4 = await s3.ContinueWithAsync($@"l2.libBase.X"); 755var s1 = await s0.ContinueWithAsync($@"var l1 = new Lib1();"); 756var s2 = await s1.ContinueWithAsync($@"#r ""{file2.Path}"""); 761await s2.ContinueWithAsync($@"var l2 = new Lib2();"); 823var s1 = await s0.ContinueWithAsync($@"new Lib1().libBase.X"); 824var s2 = await s1.ContinueWithAsync($@"#r ""{file2.Path}"""); 829await s2.ContinueWithAsync($@"new Lib2().libBase.X"); 891var s1 = await s0.ContinueWithAsync($@"new Lib1().libBase.X"); 892var s2 = await s1.ContinueWithAsync($@"#r ""{file2.Path}"""); 897await s2.ContinueWithAsync($@"new Lib2().libBase.X"); 959var s1 = await s0.ContinueWithAsync($@"new Lib1().libBase.X"); 960var s2 = await s1.ContinueWithAsync($@"#r ""{file2.Path}"""); 965await s2.ContinueWithAsync($@"new Lib2().libBase.X"); 1027var s1 = await s0.ContinueWithAsync($@"var l1 = new Lib1().libBase.X;"); 1028var s2 = await s1.ContinueWithAsync($@"#r ""{file2.Path}"""); 1033await s2.ContinueWithAsync($@"var l2 = new Lib2().libBase.X;"); 1095var s1 = await s0.ContinueWithAsync($@"new Lib1().libBase.X"); 1097var s2 = await s1.ContinueWithAsync($@"#r ""{file2.Path}"""); 1098var s3 = await s2.ContinueWithAsync($@"new Lib2().libBase.X"); 1121await 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)
364state = await state.ContinueWithAsync(submission); 426var s3 = await s1.ContinueWithAsync("x"); 459var state2 = await state1.ContinueWithAsync("int M(int x) { return x * x; } M(5)"); 464var state3 = await state1.ContinueWithAsync("M(5)"); 472var state1 = await state0.ContinueWithAsync("System.Func<int, int, int> adder = Add;"); 473var state2 = await state1.ContinueWithAsync("adder(1, 1)"); 481var state1 = await state0.ContinueWithAsync("Id<int>.Get(1)"); 489var state1 = await state0.ContinueWithAsync("Id.Get<int>()(1)");
Microsoft.CodeAnalysis.Scripting.TestUtilities (3)
ScriptingTestHelpers.cs (3)
61AssertCompilationError(() => state.Result.ContinueWithAsync(code).Wait(), expectedDiagnostics); 66AssertCompilationError(() => state.Result.ContinueWithAsync(code).Wait(), expectedDiagnostics); 71AssertCompilationError(() => state.ContinueWithAsync(code).Wait(), expectedDiagnostics);