67 references to RunAsync
Microsoft.CodeAnalysis.CSharp.Scripting.Desktop.UnitTests (14)
InteractiveSessionReferencesTests.cs (14)
45var s0 = await CSharpScript.RunAsync("", options);
60var s0 = await CSharpScript.RunAsync("using System.Diagnostics;", ScriptOptions);
72var s0 = await CSharpScript.RunAsync("using System.Diagnostics;", ScriptOptions);
91CSharpScript.RunAsync("using System;", ScriptOptions).
454var s0 = CSharpScript.RunAsync("var x = new { a = 3 }; x", ScriptOptions);
632var s0 = await CSharpScript.RunAsync($@"#r ""{file1.Path}""", ScriptOptions);
690var s0 = await CSharpScript.RunAsync($@"#r ""{file1.Path}""", ScriptOptions);
756var s0 = await CSharpScript.RunAsync($@"#r ""{file1.Path}""", ScriptOptions);
824var s0 = await CSharpScript.RunAsync($@"#r ""{file1.Path}""", ScriptOptions);
892var s0 = await CSharpScript.RunAsync($@"#r ""{file1.Path}""", ScriptOptions);
960var s0 = await CSharpScript.RunAsync($@"#r ""{file1.Path}""", ScriptOptions);
1028var s0 = await CSharpScript.RunAsync($@"#r ""{file1.Path}""", ScriptOptions);
1096var s0 = await CSharpScript.RunAsync($@"#r ""{file1.Path}""", ScriptOptions);
1122var s0 = await CSharpScript.RunAsync("C c;", ScriptOptions.WithReferences(libFile.Path));
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (53)
InteractiveSessionTests.cs (26)
423var s0 = CSharpScript.RunAsync("", ScriptOptions.AddReferences(HostAssembly));
465var state = CSharpScript.RunAsync("Environment.ProcessorCount", options);
476var state1 = CSharpScript.RunAsync("internal class C1 { } protected int X; 1", ScriptOptions);
518var state = CSharpScript.RunAsync("", ScriptOptions);
572CSharpScript.RunAsync("System", options: ScriptOptions, globals: new C1()).
582CSharpScript.RunAsync("using System;", options: ScriptOptions, globals: new C1()).
593CSharpScript.RunAsync("int System = 2;", options: ScriptOptions, globals: new C1()).
622var s0 = await CSharpScript.RunAsync("int x = 1;", ScriptOptions);
649var state0 = await CSharpScript.RunAsync("", options: ScriptOptions, globals: new HostObjectWithOverrides());
664var state0 = await CSharpScript.RunAsync("", options: ScriptOptions, globals: new object());
682var state0 = CSharpScript.RunAsync("", ScriptOptions);
761var state = CSharpScript.RunAsync(@"
794var state = CSharpScript.RunAsync(@"
858var s = CSharpScript.RunAsync(@"
906var f = CSharpScript.RunAsync("using System;", ScriptOptions).
916var s = CSharpScript.RunAsync(@"
983var result = CSharpScript.RunAsync(@"
1093var s0 = await CSharpScript.RunAsync(@"
1120CSharpScript.RunAsync("int i = 0;", options).
1152var state = await CSharpScript.RunAsync("var x = (false, 4);", ScriptOptions);
1161var state = await CSharpScript.RunAsync("object x = 1;", options: options);
1381var s1 = CSharpScript.RunAsync("new int[] { 1, 2, 3 }.First()", options);
1599var s0 = CSharpScript.RunAsync("static int goo = StaticField;", options: ScriptOptions, globals: new C());
1618var s0 = CSharpScript.RunAsync("int goo(double a) { return 2; }", options: ScriptOptions, globals: new D());
1998var state0 = await CSharpScript.RunAsync(@"
2128CSharpScript.RunAsync(
ScriptTests.cs (27)
65var state = await CSharpScript.RunAsync("1 + 2", options: ScriptOptions, globals: new ScriptTests());
73var state = await CSharpScript.RunAsync("1 + 2", options: ScriptOptions, globals: new ScriptTests());
132var state = await CSharpScript.RunAsync("1 + 2", ScriptOptions);
164var state = await CSharpScript.RunAsync("1 + 2", ScriptOptions);
180var state = await CSharpScript.RunAsync(
189await CSharpScript.RunAsync(@"
204await CSharpScript.RunAsync(@"
223var state = CSharpScript.RunAsync(@"if (true)
241var state = CSharpScript.RunAsync(@"if (true)
249var state = CSharpScript.RunAsync(@"System.Console.WriteLine(true) ", options: ScriptOptions, globals: new ScriptTests());
256var state = CSharpScript.RunAsync(@"
270var state = CSharpScript.RunAsync(@"if (e) a = b
290var state = await CSharpScript.RunAsync("X + Y", options: ScriptOptions, globals: new Globals { X = 1, Y = 2 });
333var state = await CSharpScript.RunAsync("X + Y", options: ScriptOptions, globals: new Globals());
341var state1 = await CSharpScript.RunAsync("X + Y + 1", options: ScriptOptions, globals: new Globals());
342var state2 = await CSharpScript.RunAsync("X + Y + 2", options: ScriptOptions, globals: new Globals());
351var state = await CSharpScript.RunAsync("int X = 100;", ScriptOptions).ContinueWith("X + X");
365var state = await CSharpScript.RunAsync("", ScriptOptions);
438var state = await CSharpScript.RunAsync(@"
459var state1 = await CSharpScript.RunAsync("int M(int x) { return x + x; }", ScriptOptions);
475var state0 = await CSharpScript.RunAsync("static int Add(int x, int y) => x + y;", options: ScriptOptions.WithLanguageVersion(LanguageVersion.Preview));
484var state0 = await CSharpScript.RunAsync("class Id<T> { static T Core(T t) => t; public static System.Func<T, T> Get => Core; }", ScriptOptions);
492var state0 = await CSharpScript.RunAsync("class Id { static T Core<T>(T t) => t; public static System.Func<T, T> Get<T>() => Core; }", ScriptOptions);
852var script = await CSharpScript.RunAsync(code, opts);
1007await CSharpScript.RunAsync(@"var data = notExistentVariable switch { _ => null };", options: ScriptOptions, globals: new ScriptTests());
1029await CSharpScript.RunAsync(@"var data = ""data"" switch { < 5 => null };", options: ScriptOptions, globals: new ScriptTests());
1054await CSharpScript.RunAsync(@"var data = ""test"" switch { _ => armError };", options: ScriptOptions, globals: new ScriptTests());