1 write to ReturnValue
Microsoft.CodeAnalysis.Scripting (1)
ScriptState.cs (1)
278ReturnValue = value;
101 references to ReturnValue
Microsoft.CodeAnalysis.CSharp.Scripting.Desktop.UnitTests (17)
InteractiveSessionReferencesTests.cs (17)
106Assert.IsType<List<Version>>(s.Result.ReturnValue); 109Assert.Equal(Environment.Version, s.Result.ReturnValue); 112Assert.Equal(2, s.Result.ReturnValue); 115Assert.Equal(0.0, s.Result.ReturnValue); 176AssertEx.Equal(new[] { 2, 3, 4 }, state.ReturnValue); 195Assert.NotNull(s0.ReturnValue); 203Assert.NotNull(s1.ReturnValue); 211Assert.NotNull(s2.ReturnValue); 219Assert.NotNull(s3.ReturnValue); 274Assert.NotNull(script.RunAsync().Result.ReturnValue); 456Assert.Equal(s0.Result.ReturnValue.GetType(), s1.Result.ReturnValue); 513Assert.Equal(1, s0.ReturnValue); 520Assert.Equal(1, s1.ReturnValue); 586int result = script.RunAsync(globals).Result.ReturnValue; 1098Assert.Equal(1, s1.ReturnValue); 1101Assert.Equal(2, s3.ReturnValue);
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (74)
InteractiveSessionTests.cs (58)
431Assert.Equal(1, state.Result.ReturnValue); 441Assert.Equal(1, state.Result.ReturnValue); 466Assert.Equal(Environment.ProcessorCount, state.Result.ReturnValue); 469Assert.Equal(Environment.ProcessorCount, state.Result.ReturnValue); 483Assert.Equal(1, state1.Result.ReturnValue); 488Assert.Equal(2, state2.Result.ReturnValue); 499Assert.Equal(3, state3.Result.ReturnValue); 573Result.ReturnValue; 584Result.ReturnValue; 595Result.ReturnValue; 633Assert.Null(s2.ReturnValue); 636Assert.Equal(12, s3.ReturnValue); 652Assert.True(state1.ReturnValue); 655Assert.Equal(1234567, state2.ReturnValue); 658Assert.Equal("HostObjectToString impl", state3.ReturnValue); 670Assert.True(state1.ReturnValue); 673Assert.Equal("System.Object", state2.ReturnValue); 676Assert.False(state3.ReturnValue); 778Assert.Equal(111, state.Result.ReturnValue); 785Assert.Equal(222, state.Result.ReturnValue); 812Assert.Equal(111, state.Result.ReturnValue); 819Assert.Equal(222, state.Result.ReturnValue); 908ContinueWith<Func<int, int>>("new Func<int,int>(Sqr)").Result.ReturnValue; 924Assert.Equal(3, s.ContinueWith(@"arr_1[2]").Result.ReturnValue); 925Assert.Equal(5, s.ContinueWith(@"arr_2[0]").Result.ReturnValue); 926Assert.Equal(0, s.ContinueWith(@"arr_3[0]").Result.ReturnValue); 990ContinueWith<List<int>>("result").Result.ReturnValue; 1044AssertEx.Equal(new[] { 1, 2, 3, 4, 5, 6 }, s1.ReturnValue); 1047AssertEx.Equal(new[] { 1, 2, 3, 4, 5, 6, 7 }, s2.ReturnValue); 1050AssertEx.Equal(new[] { 1, 2, 3, 4, 5, 6, 7, 8 }, s3.ReturnValue); 1106Assert.Equal(4, s1.ReturnValue); 1109Assert.Equal(5, s2.ReturnValue); 1127Assert.Equal(3, state.ReturnValue); 1146Assert.Equal(3, state.ReturnValue); 1154Assert.Equal(true, state.ReturnValue); 1163Assert.Equal(true, state.ReturnValue); 1165Assert.Equal(true, state.ReturnValue); 1167Assert.Equal(false, state.ReturnValue); 1169Assert.Equal(true, state.ReturnValue); 1295var r2 = CSharpScript.Create($@"#r ""{fileMain.Path}""", ScriptOptions).ContinueWith($@"M.X.F").RunAsync().Result.ReturnValue; 1326var r2 = CSharpScript.Create($@"#r ""{fileMain.Path}""", ScriptOptions).ContinueWith($@"M.X.F").RunAsync().Result.ReturnValue; 1382Assert.Equal(1, s1.Result.ReturnValue); 1385Assert.IsType<List<int>>(s2.Result.ReturnValue); 1532Assert.Equal(6, s0.Result.ReturnValue); 1535Assert.Equal(1, s1.Result.ReturnValue); 1540Assert.Equal(20, s3.Result.ReturnValue); 1557Assert.Equal(3, s0.ReturnValue); 1565Assert.Equal("2", s1.ReturnValue); 1604Assert.Equal(123, s3.Result.ReturnValue); 1620Assert.Equal(2, s1.Result.ReturnValue); 1623Assert.Equal(2, s2.Result.ReturnValue); 1936Assert.Equal(10, state2.ReturnValue); 1963Assert.Equal(120, state3.ReturnValue); 1991Assert.Equal(1200, state4.ReturnValue); 2020Assert.Equal(1204, state4.ReturnValue); 2054Assert.Equal(1230, state4.ReturnValue); 2088Assert.Equal(1234, state4.ReturnValue); 2142Result.ReturnValue;
ScriptTests.cs (16)
133Assert.Equal(3, state.ReturnValue); 142Assert.Equal(3, state.ReturnValue); 151Assert.Equal(3, state.ReturnValue); 165Assert.Equal(3, state.ReturnValue); 174Assert.Null(state.ReturnValue); 183Assert.Null(state.ReturnValue); 291Assert.Equal(3, state.ReturnValue); 299Assert.Equal(3, state.ReturnValue); 352Assert.Equal(200, state.ReturnValue); 371Assert.Equal(10100, state.ReturnValue); 432Assert.Equal(2, s3.ReturnValue); 464Assert.Equal(25, state2.ReturnValue); 469Assert.Equal(10, state3.ReturnValue); 478Assert.Equal(2, state2.ReturnValue); 486Assert.Equal(1, state1.ReturnValue); 494Assert.Equal(1, state1.ReturnValue);
Microsoft.CodeAnalysis.InteractiveHost (1)
Interactive\Core\InteractiveHost.Service.cs (1)
766serviceState.Globals.Print(newState.ReturnValue);
Microsoft.CodeAnalysis.Scripting (4)
Hosting\CommandLine\CommandLineRunner.cs (2)
210return script.RunAsync(globals, cancellationToken).GetAwaiter().GetResult().ReturnValue; 316globals.Print(state.ReturnValue);
ScriptState.cs (1)
273internal override object GetReturnValue() => ReturnValue;
Utilities\TaskExtensions.cs (1)
21return (await task.ConfigureAwait(true)).ReturnValue;
Microsoft.CodeAnalysis.VisualBasic.Scripting.UnitTests (5)
InteractiveSessionTests.vb (1)
26Assert.Equal(3, s.ReturnValue)
ScriptTests.vb (4)
43Assert.Equal(3, state.ReturnValue) 51Assert.Equal(3, state.ReturnValue) 57Assert.Equal(3, state.ReturnValue) 70Assert.Null(state.ReturnValue)