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