27 references to EvaluateAsync
Microsoft.CodeAnalysis.CSharp.Scripting (1)
CSharpScript.cs (1)
145return EvaluateAsync<object>(code, options, globals, globalsType, cancellationToken);
Microsoft.CodeAnalysis.CSharp.Scripting.Desktop.UnitTests (1)
InteractiveSessionReferencesTests.cs (1)
230var process = CSharpScript.EvaluateAsync<Process>($@"
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (25)
InteractiveSessionTests.cs (25)
275Type c = CSharpScript.EvaluateAsync<Type>(source, ScriptOptions).Result; 829var result = CSharpScript.EvaluateAsync<int>(@" 851Assert.Equal(18, CSharpScript.EvaluateAsync<int>("(4 + 5) * 2", ScriptOptions).Result); 852Assert.Equal(1, CSharpScript.EvaluateAsync<long>("6 / (2 * 3)", ScriptOptions).Result); 873var f = CSharpScript.EvaluateAsync<Func<int, int>>(@" 889var result = CSharpScript.EvaluateAsync<List<string>>(@" 932var result = CSharpScript.EvaluateAsync<List<int>>(@" 956var result = CSharpScript.EvaluateAsync<List<int>>(@" 1003var result = CSharpScript.EvaluateAsync<int>(@" 1014var result = CSharpScript.EvaluateAsync<object[]>(@" 1037var result1 = await CSharpScript.EvaluateAsync<int[]>("new int[] { 1,2,3,4 }", ScriptOptions); 1040var result2 = await CSharpScript.EvaluateAsync<int[]>("new int[] { 1,2,3,4,5 }", ScriptOptions); 1076Assert.Equal(3, CSharpScript.EvaluateAsync<int>("0 + await System.Threading.Tasks.Task.FromResult(3)", ScriptOptions).Result); 1082var task = CSharpScript.EvaluateAsync<object>("await System.Threading.Tasks.Task.Run(() => { })", ScriptOptions); 1430Assert.Equal(2, CSharpScript.EvaluateAsync<int>("1+1", ScriptOptions).Result); 1432Assert.Null(CSharpScript.EvaluateAsync<string>("null", ScriptOptions).Result); 1448var cint = CSharpScript.EvaluateAsync<C<int>>("null", options).Result; 1451Assert.Null(CSharpScript.EvaluateAsync<int?>("null", options).Result); 1483var value = CSharpScript.EvaluateAsync<IEnumerable<Exception>>(@" 1547var result = CSharpScript.EvaluateAsync<string>("G()", options: ScriptOptions, globals: m); 1592var result = CSharpScript.EvaluateAsync<int>("Z()", options: ScriptOptions, globals: c, globalsType: typeof(I)); 1630var r0 = CSharpScript.EvaluateAsync<int>("X + Y + Z", options: ScriptOptions, globals: obj); 1634var r1 = CSharpScript.EvaluateAsync<int>("X", options: ScriptOptions, globals: obj); 1844var result = await CSharpScript.EvaluateAsync<bool>(code, options: ScriptOptions, globalsType: typeof(E), globals: new E()); 1908var result = await CSharpScript.EvaluateAsync<bool>(code, options: ScriptOptions, globalsType: typeof(F), globals: new F());