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