static Evaluation() { Console.SetOut(printStream); // Adding Default references var references = new Assembly[] { typeof(System.Linq.Enumerable).Assembly, typeof(System.Text.ASCIIEncoding).Assembly, typeof(ICSharp.Kernel.Kernel).Assembly, typeof(XPlot.Plotly.Graph).Assembly }; // Source paths string baseDirectory = Path.GetDirectoryName(typeof(Evaluation).GetTypeInfo().Assembly.ManifestModule.FullyQualifiedName); List <string> searchPaths = new List <string>(); searchPaths.Add(Directory.GetCurrentDirectory()); searchPaths.Add(Path.GetTempPath()); sourceResolver = ScriptSourceResolver.Default .WithBaseDirectory(baseDirectory) .WithSearchPaths(searchPaths); globals = new InteractiveScriptGlobals(printStream, Microsoft.CodeAnalysis.CSharp.Scripting.Hosting.CSharpObjectFormatter.Instance); scriptOptions = ScriptOptions.Default .WithReferences(references) .WithSourceResolver(sourceResolver); }
public Resolver(ScriptSourceResolver resolver, IConsole output) : base(resolver.SearchPaths, resolver.BaseDirectory) { this.output = output; }