public RuntimeServices( ILogProvider logProvider, IDictionary <Type, object> overrides, IConsole console, Type scriptEngineType, Type scriptExecutorType, Type replType, bool initDirectoryCatalog, IInitializationServices initializationServices, string scriptName, IEnumerable <Assembly> applicationAssemblies) : base(logProvider, overrides) { if (logProvider == null) { throw new ArgumentNullException(nameof(logProvider)); } _log = logProvider.ForCurrentType(); _console = console; _scriptEngineType = scriptEngineType; _scriptExecutorType = scriptExecutorType; _replType = replType; _initDirectoryCatalog = initDirectoryCatalog; _initializationServices = initializationServices; _scriptName = scriptName; _applicationAssemblies = applicationAssemblies; }
public ScriptServicesBuilder(IConsole console, ILog logger, IRuntimeServices runtimeServices = null) { _initializationServices = new InitializationServices(logger); _runtimeServices = runtimeServices; _console = console; _logger = logger; }
public CommandFactory(IScriptServicesBuilder scriptServicesBuilder) { if (scriptServicesBuilder == null) { throw new ArgumentNullException(nameof(scriptServicesBuilder)); } _scriptServicesBuilder = scriptServicesBuilder; _initializationServices = _scriptServicesBuilder.InitializationServices; _fileSystem = _initializationServices.GetFileSystem(); if (_fileSystem.PackagesFile == null) { throw new ArgumentException( "The file system provided by the initialization services provided by the script services builder has a null packages file.", "scriptServicesBuilder"); } if (_fileSystem.PackagesFolder == null) { throw new ArgumentException( "The file system provided by the initialization services provided by the script services builder has a null package folder.", "scriptServicesBuilder"); } }
private Repl GetRepl(string[] args, out MemoryBufferConsole memoryBufferConsole) { SetProfile(); var arguments = ParseArguments(args); var scriptServicesBuilder = ScriptServicesBuilderFactory.Create(arguments.CommandArguments, arguments.ScriptArguments); IInitializationServices _initializationServices = scriptServicesBuilder.InitializationServices; IFileSystem _fileSystem = _initializationServices.GetFileSystem(); if (_fileSystem.PackagesFile == null) { throw new ArgumentException("The file system provided by the initialization services provided by the script services builder has a null packages file."); } if (_fileSystem.PackagesFolder == null) { throw new ArgumentException("The file system provided by the initialization services provided by the script services builder has a null package folder."); } ScriptServices scriptServices = scriptServicesBuilder.Build(); memoryBufferConsole = new MemoryBufferConsole(); Repl repl = new Repl(arguments.ScriptArguments, _fileSystem, scriptServices.Engine, scriptServices.ObjectSerializer, scriptServices.Logger, memoryBufferConsole, scriptServices.FilePreProcessor, scriptServices.ReplCommands); var workingDirectory = _fileSystem.CurrentDirectory; var assemblies = scriptServices.AssemblyResolver.GetAssemblyPaths(workingDirectory); var scriptPacks = scriptServices.ScriptPackResolver.GetPacks(); repl.Initialize(assemblies, scriptPacks, null); return(repl); }
public RuntimeServices(ILog logger, IDictionary <Type, object> overrides, IConsole console, Type scriptEngineType, Type scriptExecutorType, bool initDirectoryCatalog, IInitializationServices initializationServices) : base(logger, overrides) { _console = console; _scriptEngineType = scriptEngineType; _scriptExecutorType = scriptExecutorType; _initDirectoryCatalog = initDirectoryCatalog; _initializationServices = initializationServices; }
public RuntimeServices(ILog logger, IDictionary<Type, object> overrides, IConsole console, Type scriptEngineType, Type scriptExecutorType, bool initDirectoryCatalog, IInitializationServices initializationServices) : base(logger, overrides) { _console = console; _scriptEngineType = scriptEngineType; _scriptExecutorType = scriptExecutorType; _initDirectoryCatalog = initDirectoryCatalog; _initializationServices = initializationServices; }
public PvcScriptServicesBuilder(IConsole console, ILog logger, IRuntimeServices runtimeServices = null, ITypeResolver typeResolver = null, IInitializationServices initializationServices = null) : base(console: console, logger: logger, runtimeServices: runtimeServices, typeResolver: typeResolver, initializationServices: initializationServices ?? BuildInitializationServices(logger)) { this.FileSystem<PvcFileSystem>() .PackageContainer<PvcPackageContainer>(); }
public ScriptServicesBuilder( IConsole console, ILogProvider logProvider, IRuntimeServices runtimeServices = null, IInitializationServices initializationServices = null) { InitializationServices = initializationServices ?? new InitializationServices(logProvider); _runtimeServices = runtimeServices; ConsoleInstance = console; _logProvider = logProvider; }
public RuntimeServices(ILog logger, IDictionary <Type, object> overrides, IList <Type> lineProcessors, IConsole console, Type scriptEngineType, Type scriptExecutorType, bool initDirectoryCatalog, IInitializationServices initializationServices, string scriptName) : base(logger, overrides) { _lineProcessors = lineProcessors; _console = console; _scriptEngineType = scriptEngineType; _scriptExecutorType = scriptExecutorType; _initDirectoryCatalog = initDirectoryCatalog; _initializationServices = initializationServices; _scriptName = scriptName; }
public RuntimeServices(ILog logger, IDictionary<Type, object> overrides, IList<Type> lineProcessors, IConsole console, Type scriptEngineType, Type scriptExecutorType, bool initDirectoryCatalog, IInitializationServices initializationServices, string scriptName) : base(logger, overrides) { _lineProcessors = lineProcessors; _console = console; _scriptEngineType = scriptEngineType; _scriptExecutorType = scriptExecutorType; _initDirectoryCatalog = initDirectoryCatalog; _initializationServices = initializationServices; _scriptName = scriptName; }
public ScriptServicesBuilder( IConsole console, ILog logger, IRuntimeServices runtimeServices = null, ITypeResolver typeResolver = null, IInitializationServices initializationServices = null) { InitializationServices = initializationServices ?? new InitializationServices(logger); _runtimeServices = runtimeServices; _typeResolver = typeResolver; _typeResolver = typeResolver ?? new TypeResolver(); ConsoleInstance = console; _logger = logger; }
public ScriptServicesBuilder( IConsole console, Common.Logging.ILog logger, IRuntimeServices runtimeServices = null, ITypeResolver typeResolver = null, IInitializationServices initializationServices = null) : this( console, new CommonLoggingLogProvider(logger), runtimeServices, typeResolver, initializationServices) { }
public CommandFactory(IScriptServicesBuilder scriptServicesBuilder) { Guard.AgainstNullArgument("scriptServicesBuilder", scriptServicesBuilder); _scriptServicesBuilder = scriptServicesBuilder; _initializationServices = _scriptServicesBuilder.InitializationServices; _fileSystem = _initializationServices.GetFileSystem(); if (_fileSystem.PackagesFile == null) { throw new ArgumentException("The file system provided by the initialization services provided by the script services builder has a null packages file."); } if (_fileSystem.PackagesFolder == null) { throw new ArgumentException("The file system provided by the initialization services provided by the script services builder has a null package folder."); } }
public RuntimeServices( Common.Logging.ILog logger, IDictionary<Type, object> overrides, IConsole console, Type scriptEngineType, Type scriptExecutorType, Type replType, bool initDirectoryCatalog, IInitializationServices initializationServices, string scriptName) : this(new CommonLoggingLogProvider(logger), overrides, console, scriptEngineType, scriptExecutorType, replType, initDirectoryCatalog, initializationServices, scriptName) { }
public RuntimeServices( Common.Logging.ILog logger, IDictionary <Type, object> overrides, IConsole console, Type scriptEngineType, Type scriptExecutorType, Type replType, bool initDirectoryCatalog, IInitializationServices initializationServices, string scriptName) : this( new CommonLoggingLogProvider(logger), overrides, console, scriptEngineType, scriptExecutorType, replType, initDirectoryCatalog, initializationServices, scriptName) { }
public RuntimeServices( ILogProvider logProvider, IDictionary <Type, object> overrides, IConsole console, Type scriptEngineType, Type scriptExecutorType, Type replType, bool initDirectoryCatalog, IInitializationServices initializationServices, string scriptName) : base(logProvider, overrides) { Guard.AgainstNullArgument("logProvider", logProvider); _log = logProvider.ForCurrentType(); _console = console; _scriptEngineType = scriptEngineType; _scriptExecutorType = scriptExecutorType; _replType = replType; _initDirectoryCatalog = initDirectoryCatalog; _initializationServices = initializationServices; _scriptName = scriptName; }
public RuntimeServices( ILogProvider logProvider, IDictionary<Type, object> overrides, IConsole console, Type scriptEngineType, Type scriptExecutorType, Type replType, bool initDirectoryCatalog, IInitializationServices initializationServices, string scriptName) : base(logProvider, overrides) { Guard.AgainstNullArgument("logProvider", logProvider); _log = logProvider.ForCurrentType(); _console = console; _scriptEngineType = scriptEngineType; _scriptExecutorType = scriptExecutorType; _replType = replType; _initDirectoryCatalog = initDirectoryCatalog; _initializationServices = initializationServices; _scriptName = scriptName; }
public PvcScriptServicesBuilder(IConsole console, ILog logger, IRuntimeServices runtimeServices = null, ITypeResolver typeResolver = null, IInitializationServices initializationServices = null) : base( console: console, logger: logger, runtimeServices: runtimeServices, typeResolver: typeResolver, initializationServices: initializationServices ?? BuildInitializationServices(logger) ) { this.FileSystem <PvcFileSystem>() .PackageContainer <PvcPackageContainer>(); }