Esempio n. 1
0
 public async Task StreamWithOffset()
 {
     var resolver = new StreamOffsetResolver();
     var options  = ScriptOptions.Default.WithSourceResolver(resolver);
     var script   = CSharpScript.Create(@"#load ""a.csx""", options);
     await script.EvaluateAsync();
 }
Esempio n. 2
0
        public void StreamWithOffset()
        {
            var resolver = new StreamOffsetResolver();
            var options  = ScriptOptions.Default.WithSourceResolver(resolver);
            var script   = CSharpScript.Create(@"#load ""a.csx""", options);

            ScriptingTestHelpers.EvaluateScriptWithOutput(script, "Hello World!");
        }
Esempio n. 3
0
        public async Task StreamWithOffset()
        {
            var resolver = new StreamOffsetResolver();
            var options  = ScriptOptions.Default.WithSourceResolver(resolver);
            var script   = CSharpScript.Create(@"#load ""a.csx""", options);

            using (var redirect = new OutputRedirect(CultureInfo.InvariantCulture))
            {
                await script.EvaluateAsync();
            }
        }
Esempio n. 4
0
 public async Task StreamWithOffset()
 {
     var resolver = new StreamOffsetResolver();
     var options = ScriptOptions.Default.WithSourceResolver(resolver);
     var script = CSharpScript.Create(@"#load ""a.csx""", options);
     using (var redirect = new OutputRedirect(CultureInfo.InvariantCulture))
     {
         await script.EvaluateAsync();
     }
 }
Esempio n. 5
0
 public async Task StreamWithOffset()
 {
     var resolver = new StreamOffsetResolver();
     var options = ScriptOptions.Default.WithSourceResolver(resolver);
     var script = CSharpScript.Create(@"#load ""a.csx""", options);
     await script.EvaluateAsync();
 }