public CssSpriteCreator(ICacheManager cacheManager, IRetryableFileOpener retryableFileOpener, IPathProvider pathProvider, IRetryableFileWriter retryableFileWriter) { CacheManager = cacheManager; RetryableFileOpener = retryableFileOpener; PathProvider = pathProvider; RetryableFileWriter = retryableFileWriter; }
public CssCrusher(IRetryableFileOpener retryableFileOpener, IRetryableFileWriter retryableFileWriter, ICssPathRewriter cssPathRewriter, IPathProvider pathProvider) { RetryableFileOpener = retryableFileOpener; RetryableFileWriter = retryableFileWriter; CssPathRewriter = cssPathRewriter; PathProvider = pathProvider; }
public CssSpriteCreator(ICacheManager cacheManager, IRetryableFileOpener retryableFileOpener, IPathProvider pathProvider, IRetryableFileWriter retryableFileWriter, IMetaData fileMetaData) { CacheManager = cacheManager; RetryableFileOpener = retryableFileOpener; PathProvider = pathProvider; RetryableFileWriter = retryableFileWriter; FileMetaData = fileMetaData; }
public JsCrusher(ICacheManager cacheManager, IPathProvider pathProvider, IRetryableFileOpener retryableFileOpener, IRetryableFileWriter retryableFileWriter) { CacheManager = cacheManager; PathProvider = pathProvider; RetryableFileOpener = retryableFileOpener; RetryableFileWriter = retryableFileWriter; YahooYuiJavaScriptCompressor = new Lazy <Yahoo.Yui.Compressor.JavaScriptCompressor>(); MicrosoftAjaxMinJavaScriptCompressor = new Lazy <Microsoft.Ajax.Utilities.Minifier>(); }
public JsCrusher(ICacheManager cacheManager, IPathProvider pathProvider, IRetryableFileOpener retryableFileOpener, IRetryableFileWriter retryableFileWriter) { CacheManager = cacheManager; PathProvider = pathProvider; RetryableFileOpener = retryableFileOpener; RetryableFileWriter = retryableFileWriter; YahooYuiJavaScriptCompressorPool = new Pool <JavaScriptCompressor>(64, pool => new JavaScriptCompressor(), LoadingMode.LazyExpanding, AccessMode.Circular); MicrosoftAjaxMinJavaScriptCompressorPool = new Pool <Minifier>(64, pool => new Minifier(), LoadingMode.LazyExpanding, AccessMode.Circular); }
public JsCrusher(ICacheManager cacheManager, IPathProvider pathProvider, IRetryableFileOpener retryableFileOpener, IRetryableFileWriter retryableFileWriter) { CacheManager = cacheManager; PathProvider = pathProvider; RetryableFileOpener = retryableFileOpener; RetryableFileWriter = retryableFileWriter; YahooYuiJavaScriptCompressor = new Lazy<Yahoo.Yui.Compressor.JavaScriptCompressor>(); MicrosoftAjaxMinJavaScriptCompressor = new Lazy<Microsoft.Ajax.Utilities.Minifier>(); }
public CssCrusher(ICacheManager cacheManager, IPathProvider pathProvider, IRetryableFileOpener retryableFileOpener, IRetryableFileWriter retryableFileWriter, ICssPathRewriter cssPathRewriter) { CacheManager = cacheManager; PathProvider = pathProvider; RetryableFileOpener = retryableFileOpener; RetryableFileWriter = retryableFileWriter; CssPathRewriter = cssPathRewriter; YahooYuiCssCompressor = new Lazy<Yahoo.Yui.Compressor.CssCompressor>(); MicrosoftAjaxMinCssCompressor = new Lazy<Microsoft.Ajax.Utilities.Minifier>(); }
public CssCrusher(ICacheManager cacheManager, IPathProvider pathProvider, IRetryableFileOpener retryableFileOpener, IRetryableFileWriter retryableFileWriter, ICssPathRewriter cssPathRewriter) { CacheManager = cacheManager; PathProvider = pathProvider; RetryableFileOpener = retryableFileOpener; RetryableFileWriter = retryableFileWriter; CssPathRewriter = cssPathRewriter; YahooYuiCssCompressorPool = new Pool <Yahoo.Yui.Compressor.CssCompressor>(64, pool => new Yahoo.Yui.Compressor.CssCompressor(), LoadingMode.LazyExpanding, AccessMode.Circular); MicrosoftAjaxMinCssCompressorPool = new Pool <Microsoft.Ajax.Utilities.Minifier>(64, pool => new Microsoft.Ajax.Utilities.Minifier(), LoadingMode.LazyExpanding, AccessMode.Circular); }
public CssCrusher(ICacheManager cacheManager, IPathProvider pathProvider, IRetryableFileOpener retryableFileOpener, IRetryableFileWriter retryableFileWriter, ICssPathRewriter cssPathRewriter) { CacheManager = cacheManager; PathProvider = pathProvider; RetryableFileOpener = retryableFileOpener; RetryableFileWriter = retryableFileWriter; CssPathRewriter = cssPathRewriter; YahooYuiCssCompressor = new Lazy <Yahoo.Yui.Compressor.CssCompressor>(); MicrosoftAjaxMinCssCompressor = new Lazy <Microsoft.Ajax.Utilities.Minifier>(); }
public JsCrusher(ICacheManager cacheManager, IPathProvider pathProvider, IRetryableFileOpener retryableFileOpener, IRetryableFileWriter retryableFileWriter, IMetaData fileMetaData) { CacheManager = cacheManager; PathProvider = pathProvider; RetryableFileOpener = retryableFileOpener; RetryableFileWriter = retryableFileWriter; FileMetaData = fileMetaData; YahooYuiJavaScriptCompressorPool = new Pool<JavaScriptCompressor>(64, pool => new JavaScriptCompressor(), LoadingMode.LazyExpanding, AccessMode.Circular); MicrosoftAjaxMinJavaScriptCompressorPool = new Pool<Minifier>(64, pool => new Minifier(), LoadingMode.LazyExpanding, AccessMode.Circular); }
public CssCrusher(ICacheManager cacheManager, IPathProvider pathProvider, IRetryableFileOpener retryableFileOpener, IRetryableFileWriter retryableFileWriter, ICssPathRewriter cssPathRewriter, IMetaData fileMetaData, bool watchAssets) { CacheManager = cacheManager; PathProvider = pathProvider; RetryableFileOpener = retryableFileOpener; RetryableFileWriter = retryableFileWriter; CssPathRewriter = cssPathRewriter; FileMetaData = fileMetaData; WatchAssets = watchAssets; YahooYuiCssCompressorPool = new Pool<Yahoo.Yui.Compressor.CssCompressor>(64, pool => new Yahoo.Yui.Compressor.CssCompressor(), LoadingMode.LazyExpanding, AccessMode.Circular); MicrosoftAjaxMinCssCompressorPool = new Pool<Microsoft.Ajax.Utilities.Minifier>(64, pool => new Microsoft.Ajax.Utilities.Minifier(), LoadingMode.LazyExpanding, AccessMode.Circular); }
public CrusherMsBuildCommand(string applicationPath, string binDirectoryPath, string configPath, Action <string> logMessage, Action <string> logError) { if (string.IsNullOrEmpty(applicationPath)) { throw new ArgumentNullException("applicationPath"); } if (string.IsNullOrEmpty(binDirectoryPath)) { throw new ArgumentNullException("binDirectoryPath"); } if (string.IsNullOrEmpty(configPath)) { throw new ArgumentNullException("configPath"); } if (logMessage == null) { throw new ArgumentNullException("logMessage"); } if (logError == null) { throw new ArgumentNullException("logError"); } _applicationPath = applicationPath; _binDirectoryPath = binDirectoryPath; _configPath = configPath; _logMessage = logMessage; _logError = logError; _retryableFileOpener = new RetryableFileOpener(); _hasher = new Hasher(_retryableFileOpener); _retryableFileWriter = new RetryableFileWriter(BufferSize, Encoding, _retryableFileOpener, _hasher); _fileMetaData = new MultiFileMetaData(_retryableFileOpener, _retryableFileWriter); _cssSpriteConfiguration = GetCssSpriteSection(_configPath, CssSpriteSectionName); _crusherConfiguration = GetCrusherSection(_configPath, CrusherSectionName); var configUri = new Uri(_configPath, UriKind.RelativeOrAbsolute); if (!configUri.IsAbsoluteUri) { configUri = new Uri(Path.Combine(Environment.CurrentDirectory, configUri.ToString())); } var physicalApplicationPath = new FileInfo(configUri.LocalPath).DirectoryName; _pathProvider = new PathProvider(_applicationPath, physicalApplicationPath); _cacheManager = new HttpCacheManager(); }
public CrusherMsBuildCommand(string applicationPath, string binDirectoryPath, string configPath, Action<string> logMessage, Action<string> logError) { if (string.IsNullOrEmpty(applicationPath)) { throw new ArgumentNullException("applicationPath"); } if (string.IsNullOrEmpty(binDirectoryPath)) { throw new ArgumentNullException("binDirectoryPath"); } if (string.IsNullOrEmpty(configPath)) { throw new ArgumentNullException("configPath"); } if (logMessage == null) { throw new ArgumentNullException("logMessage"); } if (logError == null) { throw new ArgumentNullException("logError"); } _applicationPath = applicationPath; _binDirectoryPath = binDirectoryPath; _configPath = configPath; _logMessage = logMessage; _logError = logError; _retryableFileOpener = new RetryableFileOpener(); _hasher = new Hasher(_retryableFileOpener); _retryableFileWriter = new RetryableFileWriter(BufferSize, Encoding, _retryableFileOpener, _hasher); _fileMetaData = new MultiFileMetaData(_retryableFileOpener, _retryableFileWriter); _cssSpriteConfiguration = GetCssSpriteSection(_configPath, CssSpriteSectionName); _crusherConfiguration = GetCrusherSection(_configPath, CrusherSectionName); var configUri = new Uri(_configPath, UriKind.RelativeOrAbsolute); if (!configUri.IsAbsoluteUri) { configUri = new Uri(Path.Combine(Environment.CurrentDirectory, configUri.ToString())); } var physicalApplicationPath = new FileInfo(configUri.LocalPath).DirectoryName; _pathProvider = new PathProvider(_applicationPath, physicalApplicationPath); _cacheManager = new HttpCacheManager(); }
private CrusherManager() { _crusherConfiguration = CurrentCrusherConfiguration.Current; _retryableFileOpener = new RetryableFileOpener(); _hasher = new Md5Hasher(_retryableFileOpener); _retryableFileWriter = new RetryableFileWriter(BufferSize, _encoding, _retryableFileOpener, _hasher); _pathProvider = new PathProvider(); _cacheManager = new HttpCacheManager(); _fileMetaData = new MultiFileMetaData(_retryableFileOpener, _retryableFileWriter); InitManager(); }
public JsCrusher(ICacheManager cacheManager, IPathProvider pathProvider, IRetryableFileOpener retryableFileOpener, IRetryableFileWriter retryableFileWriter, IMetaData fileMetaData) { CacheManager = cacheManager; PathProvider = pathProvider; RetryableFileOpener = retryableFileOpener; RetryableFileWriter = retryableFileWriter; FileMetaData = fileMetaData; YahooYuiJavaScriptCompressorPool = new Pool <Yahoo.Yui.Compressor.JavaScriptCompressor>(4, pool => new Yahoo.Yui.Compressor.JavaScriptCompressor(), LoadingMode.LazyExpanding, AccessMode.Circular); MicrosoftAjaxMinJavaScriptCompressorPool = new Pool <Microsoft.Ajax.Utilities.Minifier>(44, pool => new Microsoft.Ajax.Utilities.Minifier(), LoadingMode.LazyExpanding, AccessMode.Circular); CoffeeCompilerPool = new Pool <Coffee.CoffeeCompiler>(4, pool => new Coffee.CoffeeCompiler(new EmbeddedResourceLoader()), LoadingMode.LazyExpanding, AccessMode.Circular); IcedCoffeeCompilerPool = new Pool <IcedCoffee.IcedCoffeeCompiler>(4, pool => new IcedCoffee.IcedCoffeeCompiler(new EmbeddedResourceLoader()), LoadingMode.LazyExpanding, AccessMode.Circular); LiveScriptCompilerPool = new Pool <LiveScript.LiveScriptCompiler>(4, pool => new LiveScript.LiveScriptCompiler(new EmbeddedResourceLoader()), LoadingMode.LazyExpanding, AccessMode.Circular); HoganCompilerPool = new Pool <Hogan.HoganCompiler>(4, pool => new Hogan.HoganCompiler(new EmbeddedResourceLoader()), LoadingMode.LazyExpanding, AccessMode.Circular); }
public JsCrusher(ICacheManager cacheManager, IPathProvider pathProvider, IRetryableFileOpener retryableFileOpener, IRetryableFileWriter retryableFileWriter, IMetaData fileMetaData) { CacheManager = cacheManager; PathProvider = pathProvider; RetryableFileOpener = retryableFileOpener; RetryableFileWriter = retryableFileWriter; FileMetaData = fileMetaData; YahooYuiJavaScriptCompressorPool = new Pool<Yahoo.Yui.Compressor.JavaScriptCompressor>(4, pool => new Yahoo.Yui.Compressor.JavaScriptCompressor(), LoadingMode.LazyExpanding, AccessMode.Circular); MicrosoftAjaxMinJavaScriptCompressorPool = new Pool<Microsoft.Ajax.Utilities.Minifier>(44, pool => new Microsoft.Ajax.Utilities.Minifier(), LoadingMode.LazyExpanding, AccessMode.Circular); CoffeeCompilerPool = new Pool<Coffee.CoffeeCompiler>(4, pool => new Coffee.CoffeeCompiler(new EmbeddedResourceLoader()), LoadingMode.LazyExpanding, AccessMode.Circular); IcedCoffeeCompilerPool = new Pool<IcedCoffee.IcedCoffeeCompiler>(4, pool => new IcedCoffee.IcedCoffeeCompiler(new EmbeddedResourceLoader()), LoadingMode.LazyExpanding, AccessMode.Circular); LiveScriptCompilerPool = new Pool<LiveScript.LiveScriptCompiler>(4, pool => new LiveScript.LiveScriptCompiler(new EmbeddedResourceLoader()), LoadingMode.LazyExpanding, AccessMode.Circular); HoganCompilerPool = new Pool<Hogan.HoganCompiler>(4, pool => new Hogan.HoganCompiler(new EmbeddedResourceLoader()), LoadingMode.LazyExpanding, AccessMode.Circular); }
public SingleFileMetaData(FileInfo metaDataFile, IRetryableFileOpener retryableFileOpener, IRetryableFileWriter retryableFileWriter) { _timer = new System.Timers.Timer(); _timer.Elapsed += OnTimerElapsed; _timer.Interval = PollTime; _timer.Enabled = false; _timer.AutoReset = false; _metaDataFile = metaDataFile; _retryableFileWriter = retryableFileWriter; if (metaDataFile.Exists) { _metaDataForFiles = retryableFileOpener.ReadAllText(_metaDataFile) .Split(new[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries) .ToDictionary(k => k.Split(new[] { "|" }, StringSplitOptions.RemoveEmptyEntries)[0], v => v.Split(new[] { "|" }, StringSplitOptions.RemoveEmptyEntries)[1]); } else { _metaDataForFiles = new Dictionary <string, string>(); } }
public SingleFileMetaData(FileInfo metaDataFile, IRetryableFileOpener retryableFileOpener, IRetryableFileWriter retryableFileWriter) { _timer = new System.Timers.Timer(); _timer.Elapsed += OnTimerElapsed; _timer.Interval = PollTime; _timer.Enabled = false; _timer.AutoReset = false; _metaDataFile = metaDataFile; _retryableFileWriter = retryableFileWriter; if (metaDataFile.Exists) { _metaDataForFiles = retryableFileOpener.ReadAllText(_metaDataFile) .Split(new[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries) .ToDictionary(k => k.Split(new[] { "|" }, StringSplitOptions.RemoveEmptyEntries)[0], v => v.Split(new[] { "|" }, StringSplitOptions.RemoveEmptyEntries)[1]); } else { _metaDataForFiles = new Dictionary<string, string>(); } }
public JsCrusher(IRetryableFileOpener retryableFileOpener, IRetryableFileWriter retryableFileWriter, IPathProvider pathProvider) { RetryableFileOpener = retryableFileOpener; RetryableFileWriter = retryableFileWriter; PathProvider = pathProvider; }
public MultiFileMetaData(IRetryableFileOpener retryableFileOpener, IRetryableFileWriter retryableFileWriter) { _retryableFileOpener = retryableFileOpener; _retryableFileWriter = retryableFileWriter; }
public CssSpriteCreator() { RetryableFileOpener = new RetryableFileOpener(); Hasher = new Hasher(RetryableFileOpener); RetryableFileWriter = new RetryableFileWriter(BufferSize, RetryableFileOpener, Hasher); }
public CssSpriteCreator(IRetryableFileOpener retryableFileOpener, IHasher hasher, IRetryableFileWriter retryableFileWriter) { RetryableFileOpener = retryableFileOpener; Hasher = hasher; RetryableFileWriter = retryableFileWriter; }