Пример #1
0
 public ScriptRunner(ScriptCompiler scriptCompiler, ScriptLogger logger, ScriptConsole scriptConsole)
 {
     Logger             = logger;
     ScriptCompiler     = scriptCompiler;
     ScriptConsole      = scriptConsole;
     _scriptEnvironment = ScriptEnvironment.Default;
 }
Пример #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);
 }
Пример #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));
        }
Пример #5
0
 public ScriptRunner(ScriptCompiler scriptCompiler, ScriptLogger logger)
 {
     Logger         = logger;
     ScriptCompiler = scriptCompiler;
 }
Пример #6
0
 public ScriptRunner(ScriptCompiler scriptCompiler, ScriptLogger logger, ScriptConsole scriptConsole)
 {
     Logger         = logger;
     ScriptCompiler = scriptCompiler;
     ScriptConsole  = scriptConsole;
 }
Пример #7
0
 public Scaffolder(ScriptLogger logger)
 {
     _scriptEnvironment = ScriptEnvironment.Default;
     _logger            = logger;
 }
Пример #8
0
 public ScriptCompiler(ScriptLogger logger, RuntimeDependencyResolver runtimeDependencyResolver)
 {
     Logger = logger;
     RuntimeDependencyResolver = runtimeDependencyResolver;
     _scriptEnvironment        = ScriptEnvironment.Default;
 }
Пример #9
0
 public ScriptCompiler(ScriptLogger logger, RuntimeDependencyResolver runtimeDependencyResolver)
 {
     Logger = logger;
     RuntimeDependencyResolver = runtimeDependencyResolver;
 }
Пример #10
0
 public ScriptCompiler(ScriptLogger logger)
 {
     _logger = logger;
 }
 public DebugScriptRunner(ScriptCompiler scriptCompiler, ScriptLogger logger) : base(scriptCompiler, logger)
 {
 }