Esempio n. 1
0
 public ScriptRunner(ScriptCompiler scriptCompiler, ScriptLogger logger, ScriptConsole scriptConsole)
 {
     Logger             = logger;
     ScriptCompiler     = scriptCompiler;
     ScriptConsole      = scriptConsole;
     _scriptEnvironment = ScriptEnvironment.Default;
 }
Esempio n. 2
0
        public InteractiveRunner(ScriptCompiler scriptCompiler, ScriptLogger logger, ScriptConsole console)
        {
            Logger         = logger;
            ScriptCompiler = scriptCompiler;
            Console        = console;

            _globals = new InteractiveScriptGlobals(Console.Out, CSharpObjectFormatter.Instance);
        }
 public InteractiveRunner(ScriptCompiler scriptCompiler, ScriptLogger logger, ScriptConsole console, string[] packageSources)
 {
     Logger          = logger;
     ScriptCompiler  = scriptCompiler;
     Console         = console;
     _packageSources = packageSources ?? Array.Empty <string>();
     _globals        = new InteractiveScriptGlobals(Console.Out, CSharpObjectFormatter.Instance);
 }
Esempio n. 4
0
        public ScriptCompiler(ScriptLogger logger)
        {
            _logger = logger;

            // reset default scripting mode to latest language version to enable C# 7.1 features
            // this is not needed once https://github.com/dotnet/roslyn/pull/21331 ships
            var csharpScriptCompilerType = typeof(CSharpScript).GetTypeInfo().Assembly.GetType("Microsoft.CodeAnalysis.CSharp.Scripting.CSharpScriptCompiler");
            var parseOptionsField        = csharpScriptCompilerType?.GetField("s_defaultOptions", BindingFlags.Static | BindingFlags.NonPublic);

            parseOptionsField?.SetValue(null, new CSharpParseOptions(LanguageVersion.Latest, kind: SourceCodeKind.Script));
        }
Esempio n. 5
0
 public ScriptRunner(ScriptCompiler scriptCompiler, ScriptLogger logger)
 {
     Logger         = logger;
     ScriptCompiler = scriptCompiler;
 }
Esempio n. 6
0
 public ScriptRunner(ScriptCompiler scriptCompiler, ScriptLogger logger, ScriptConsole scriptConsole)
 {
     Logger         = logger;
     ScriptCompiler = scriptCompiler;
     ScriptConsole  = scriptConsole;
 }
Esempio n. 7
0
 public Scaffolder(ScriptLogger logger)
 {
     _scriptEnvironment = ScriptEnvironment.Default;
     _logger            = logger;
 }
 public ScriptCompiler(ScriptLogger logger, RuntimeDependencyResolver runtimeDependencyResolver)
 {
     Logger = logger;
     RuntimeDependencyResolver = runtimeDependencyResolver;
     _scriptEnvironment        = ScriptEnvironment.Default;
 }
Esempio n. 9
0
 public ScriptCompiler(ScriptLogger logger, RuntimeDependencyResolver runtimeDependencyResolver)
 {
     Logger = logger;
     RuntimeDependencyResolver = runtimeDependencyResolver;
 }
Esempio n. 10
0
 public ScriptCompiler(ScriptLogger logger)
 {
     _logger = logger;
 }
 public DebugScriptRunner(ScriptCompiler scriptCompiler, ScriptLogger logger) : base(scriptCompiler, logger)
 {
 }