コード例 #1
0
 public RoslynScriptEngine(IAssemblyLoader loader, IScriptHostSettings settings, ICakeConfiguration configuration, ICakeLog log)
 {
     _loader        = loader;
     _settings      = settings;
     _configuration = configuration;
     _log           = log;
 }
コード例 #2
0
        public RoslynScriptSession(
            IScriptHost host,
            IAssemblyLoader loader,
            ICakeConfiguration configuration,
            ICakeLog log,
            IScriptHostSettings settings)
        {
            _host          = host;
            _loader        = loader;
            _log           = log;
            _configuration = configuration;
            _settings      = settings;

            ReferencePaths = new HashSet <FilePath>(PathComparer.Default);
            References     = new HashSet <Assembly>();
            Namespaces     = new HashSet <string>(StringComparer.Ordinal);
        }
コード例 #3
0
ファイル: RoslynScriptSession.cs プロジェクト: gitfool/cake
        public RoslynScriptSession(
            IScriptHost host,
            IAssemblyLoader loader,
            ICakeConfiguration configuration,
            ICakeLog log,
            IScriptHostSettings settings)
        {
            _host          = host;
            _fileSystem    = host.Context.FileSystem;
            _loader        = loader;
            _log           = log;
            _configuration = configuration;
            _settings      = settings;

            ReferencePaths = new HashSet <FilePath>(PathComparer.Default);
            References     = new HashSet <Assembly>();
            Namespaces     = new HashSet <string>(StringComparer.Ordinal);

            var cacheEnabled = configuration.GetValue(Constants.Settings.EnableScriptCache) ?? bool.FalseString;

            _scriptCacheEnabled = cacheEnabled.Equals(bool.TrueString, StringComparison.OrdinalIgnoreCase);
            _regenerateCache    = host.Context.Arguments.HasArgument(Constants.Cache.InvalidateScriptCache);
            _scriptCachePath    = configuration.GetScriptCachePath(settings.Script.GetDirectory(), host.Context.Environment);
        }