@@ -103,6 +103,12 @@ public async Task UsingSystemLinq()
103103 Assert . Equal ( "0123" , await EvalAsync ( "using System.Linq; string.Join(\" \" , Enumerable.Range(0, 4))" ) ) ;
104104 }
105105
106+ [ Fact ]
107+ public async Task ScriptCanUseTuples ( )
108+ {
109+ await EvalAsync ( "using System; var t = Tuple.Create(1, 2); return t.ToString();" ) ;
110+ }
111+
106112 [ Fact ]
107113 public async Task UsingSystemIO ( )
108114 {
@@ -156,19 +162,19 @@ public async Task ScriptsCanHandleEndpointObjects()
156162 {
157163 var endpoint = new Endpoint ( "foo" , "bar" ) ;
158164
159- endpoint . SetScriptObject ( "obj" , new Dictionary < string , string > ( ) ) ;
160- var obj = ( Dictionary < string , string > ) endpoint . GetScriptObject ( "obj" ) ;
165+ endpoint . ScriptObjects [ "obj" ] = new Dictionary < string , string > ( ) ;
166+ var obj = ( Dictionary < string , string > ) endpoint . ScriptObjects [ "obj" ] ;
161167
162168 obj [ "a" ] = "b" ;
163169 Assert . Equal (
164170 "b" ,
165- await EvalAsync ( "using System.Collections.Generic; return ((Dictionary<string, string>)Endpoint.GetScriptObject( \" obj\" ) )[\" a\" ];" , new RequestInfo { Endpoint = endpoint } )
171+ await EvalAsync ( "using System.Collections.Generic; return ((Dictionary<string, string>)Endpoint.ScriptObjects[ \" obj\" ] )[\" a\" ];" , new RequestInfo { Endpoint = endpoint } )
166172 ) ;
167173
168174 obj [ "a" ] = "c" ;
169175 Assert . Equal (
170176 "c" ,
171- await EvalAsync ( "using System.Collections.Generic; return ((Dictionary<string, string>)Endpoint.GetScriptObject( \" obj\" ) )[\" a\" ];" , new RequestInfo { Endpoint = endpoint } )
177+ await EvalAsync ( "using System.Collections.Generic; return ((Dictionary<string, string>)Endpoint.ScriptObjects[ \" obj\" ] )[\" a\" ];" , new RequestInfo { Endpoint = endpoint } )
172178 ) ;
173179 }
174180
0 commit comments