public CakeScriptGenerator( IBufferedFileSystem fileSystem, ICakeEnvironment environment, IGlobber globber, ICakeConfiguration configuration, IScriptProcessor processor, IScriptAliasFinder aliasFinder, ICakeAliasGenerator aliasGenerator, ICakeLog log, IScriptConventions scriptConventions, IReferenceAssemblyResolver referenceAssemblyResolver, IEnumerable <ILoadDirectiveProvider> loadDirectiveProviders = null) { _fileSystem = fileSystem ?? throw new ArgumentNullException(nameof(fileSystem)); _environment = environment ?? throw new ArgumentNullException(nameof(environment)); _globber = globber ?? throw new ArgumentNullException(nameof(globber)); _log = log ?? throw new ArgumentNullException(nameof(log)); _configuration = configuration ?? throw new ArgumentNullException(nameof(configuration)); _processor = processor ?? throw new ArgumentNullException(nameof(processor)); _aliasFinder = aliasFinder ?? throw new ArgumentNullException(nameof(aliasFinder)); _aliasGenerator = aliasGenerator ?? throw new ArgumentNullException(nameof(aliasGenerator)); _analyzer = new ScriptAnalyzer(_fileSystem, _environment, _log, loadDirectiveProviders); _scriptConventions = scriptConventions ?? throw new ArgumentNullException(nameof(scriptConventions)); _referenceAssemblyResolver = referenceAssemblyResolver ?? throw new ArgumentNullException(nameof(referenceAssemblyResolver)); _addinRoot = GetAddinPath(_environment.WorkingDirectory); _hostObject = GetHostObject(); }
/// <summary> /// Initializes a new instance of the <see cref="ScriptRunner"/> class. /// </summary> /// <param name="environment">The environment.</param> /// <param name="log">The log.</param> /// <param name="configuration">The configuration.</param> /// <param name="engine">The session factory.</param> /// <param name="aliasFinder">The alias finder.</param> /// <param name="analyzer">The script analyzer.</param> /// <param name="processor">The script processor.</param> /// <param name="conventions">The script conventions.</param> /// <param name="assemblyLoader">The assembly loader.</param> public ScriptRunner( ICakeEnvironment environment, ICakeLog log, ICakeConfiguration configuration, IScriptEngine engine, IScriptAliasFinder aliasFinder, IScriptAnalyzer analyzer, IScriptProcessor processor, IScriptConventions conventions, IAssemblyLoader assemblyLoader) { if (environment == null) { throw new ArgumentNullException(nameof(environment)); } if (log == null) { throw new ArgumentNullException(nameof(log)); } if (configuration == null) { throw new ArgumentNullException(nameof(configuration)); } if (engine == null) { throw new ArgumentNullException(nameof(engine)); } if (aliasFinder == null) { throw new ArgumentNullException(nameof(aliasFinder)); } if (analyzer == null) { throw new ArgumentNullException(nameof(analyzer)); } if (processor == null) { throw new ArgumentNullException(nameof(processor)); } if (conventions == null) { throw new ArgumentNullException(nameof(conventions)); } if (assemblyLoader == null) { throw new ArgumentNullException(nameof(assemblyLoader)); } _environment = environment; _log = log; _configuration = configuration; _engine = engine; _aliasFinder = aliasFinder; _analyzer = analyzer; _processor = processor; _conventions = conventions; _assemblyLoader = assemblyLoader; }
/// <summary> /// Initializes a new instance of the <see cref="ScriptRunner"/> class. /// </summary> /// <param name="environment">The environment.</param> /// <param name="log">The log.</param> /// <param name="configuration">The configuration.</param> /// <param name="engine">The session factory.</param> /// <param name="aliasFinder">The alias finder.</param> /// <param name="analyzer">The script analyzer.</param> /// <param name="processor">The script processor.</param> /// <param name="conventions">The script conventions.</param> public ScriptRunner( ICakeEnvironment environment, ICakeLog log, ICakeConfiguration configuration, IScriptEngine engine, IScriptAliasFinder aliasFinder, IScriptAnalyzer analyzer, IScriptProcessor processor, IScriptConventions conventions) { if (environment == null) { throw new ArgumentNullException("environment"); } if (log == null) { throw new ArgumentNullException("log"); } if (configuration == null) { throw new ArgumentNullException("configuration"); } if (engine == null) { throw new ArgumentNullException("engine"); } if (aliasFinder == null) { throw new ArgumentNullException("aliasFinder"); } if (analyzer == null) { throw new ArgumentNullException("analyzer"); } if (processor == null) { throw new ArgumentNullException("processor"); } if (conventions == null) { throw new ArgumentNullException("conventions"); } _environment = environment; _log = log; _configuration = configuration; _engine = engine; _aliasFinder = aliasFinder; _analyzer = analyzer; _processor = processor; _conventions = conventions; }