Beispiel #1
0
        public CakeScriptGenerator(
            IBufferedFileSystem fileSystem,
            ICakeEnvironment environment,
            IGlobber globber,
            ICakeConfiguration configuration,
            IScriptProcessor processor,
            IScriptAliasFinder aliasFinder,
            ICakeAliasGenerator aliasGenerator,
            ICakeLog log,
            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);

            _addinRoot         = GetAddinPath(_environment.WorkingDirectory);
            _cakeRoot          = GetCakePath(GetToolPath(_environment.WorkingDirectory));
            _hostObject        = GetHostObject(_cakeRoot);
            _defaultReferences = new Lazy <ISet <FilePath> >(() => GetDefaultReferences(_cakeRoot));
        }
Beispiel #2
0
        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();
        }
Beispiel #3
0
 public CacheModule(IScriptAliasFinder aliasFinder,
                    IScriptProcessor processor,
                    ICakeEnvironment environment,
                    ICakeAliasGenerator aliasGenerator,
                    IEnumerable <ILoadDirectiveProvider> loadDirectiveProviders)
 {
     _aliasFinder            = aliasFinder ?? throw new ArgumentNullException(nameof(aliasFinder));
     _processor              = processor ?? throw new ArgumentNullException(nameof(processor));
     _environment            = environment ?? throw new ArgumentNullException(nameof(environment));
     _aliasGenerator         = aliasGenerator ?? throw new ArgumentNullException(nameof(aliasGenerator));
     _loadDirectiveProviders = loadDirectiveProviders ?? throw new ArgumentNullException(nameof(loadDirectiveProviders));
 }
 public CachingCakeAliasGenerator(ICakeAliasGenerator aliasGenerator)
 {
     _aliasGenerator = aliasGenerator ?? throw new ArgumentNullException(nameof(aliasGenerator));
     _cache          = new Dictionary <CakeScriptAlias, string>(new CakeScriptAliasComparer());
 }