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(); }
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!"); }
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(); } }