Пример #1
0
        public AspNetBundleContext(IBundleConfiguration bundleConfiguration, IBundleDiagnostic diagnostic, IBundleVirtualPathProvider bundleVirtualPathProvider, IBundleFileWatcher bundleFileWatcher, IBundleUrlHelper bundleUrlHelper)
        {
            if (bundleConfiguration == null)
            {
                throw new ArgumentNullException(nameof(bundleConfiguration));
            }
            if (diagnostic == null)
            {
                throw new ArgumentNullException(nameof(diagnostic));
            }
            if (bundleVirtualPathProvider == null)
            {
                throw new ArgumentNullException(nameof(bundleVirtualPathProvider));
            }
            if (bundleFileWatcher == null)
            {
                throw new ArgumentNullException(nameof(bundleFileWatcher));
            }
            if (bundleUrlHelper == null)
            {
                throw new ArgumentNullException(nameof(bundleUrlHelper));
            }

            Configuration       = bundleConfiguration;
            Diagnostic          = diagnostic;
            VirtualPathProvider = bundleVirtualPathProvider;
            Watcher             = bundleFileWatcher;
            UrlHelper           = bundleUrlHelper;
        }
Пример #2
0
        public DefaultBundleFileWatcher(IBundleDiagnostic bundleDiagnostic, IBundleVirtualPathProvider virtualPathProvider)
        {
            _bundleDiagnostic    = bundleDiagnostic;
            _virtualPathProvider = virtualPathProvider;
            _fileSystemWatcher   = new FileSystemWatcher(virtualPathProvider.GetPhysicalPath("~/"))
            {
                IncludeSubdirectories = true,
                NotifyFilter          = NotifyFilters.LastWrite | NotifyFilters.DirectoryName
            };

            _fileSystemWatcher.Changed            += FileSystemWatcher_Event;
            _fileSystemWatcher.EnableRaisingEvents = true;

            _watchEventGroupingTask = Task.Run(new Action(GroupingTask));
        }
Пример #3
0
 public AspNetBundleContext(IBundleConfiguration bundleConfiguration, IBundleDiagnostic diagnostic) : this(bundleConfiguration, diagnostic, new AspNetBundleVirtualPathProvider())
 {
 }
Пример #4
0
 public AspNetBundleContext(IBundleConfiguration bundleConfiguration, IBundleDiagnostic diagnostic, IBundleVirtualPathProvider bundleVirtualPathProvider, IBundleFileWatcher bundleFileWatcher)
     : this(bundleConfiguration, diagnostic, bundleVirtualPathProvider, bundleFileWatcher, new AspNetBundleUrlHelper())
 {
 }
Пример #5
0
 public DotLessBundleLogger(IBundleDiagnostic bundleDiagnostic)
 {
     _bundleDiagnostic = bundleDiagnostic;
 }