Beispiel #1
0
 public ResourceCompiler(ContentFilterPipelineMap contentFilterPipelineMap, DependencyManager dependencyManager, IResourceGroupManager scriptGroups, IResourceGroupManager styleGroups, IResourceFinder finder, ResourceMode resourceMode)
 {
     _contentFilterPipelineMap = contentFilterPipelineMap;
     _dependencyManager = dependencyManager;
     _scriptGroups = scriptGroups;
     _styleGroups = styleGroups;
     _finder = finder;
     _resourceMode = resourceMode;
 }
Beispiel #2
0
 public ResourceTestContext(ResourceMode resourceMode = ResourceMode.Debug)
 {
     Mode = resourceMode;
     _innerFinder = new StubResourceFinder();
     _outerFinder = new ResourceModeFilteringFinder(resourceMode, _innerFinder);
     _contentFilterPipelineMap = new ContentFilterPipelineMap();
     _scriptGroups = new ResourceGroupManager(Mode);
     _styleGroups = new ResourceGroupManager(Mode);
     _dependencyCache = new InMemoryDependencyCache();
     _dependencyProvider = new StubDependencyProvider();
     _dependencyManager = new DependencyManager(_outerFinder, _dependencyCache, _scriptGroups, _styleGroups, resourceMode);
     _dependencyManager.MapProvider(".js", _dependencyProvider);
     _dependencyManager.MapProvider(".css", _dependencyProvider);
 }
Beispiel #3
0
        internal AssmanContext(ResourceMode resourceMode)
        {
            var resourceCache = ResourceCacheFactory.GetCache(resourceMode);

            _scriptGroups = ResourceGroupManager.GetInstance(resourceMode, resourceCache);
            _styleGroups = ResourceGroupManager.GetInstance(resourceMode, resourceCache);
            _compositeFinder = new CompositeResourceFinder();
            _compositeFinder.Exclude(new ConsolidatedResourceExcluder(_scriptGroups));
            _compositeFinder.Exclude(new ConsolidatedResourceExcluder(_styleGroups));
            _compositeFinder.Exclude(new PreCompiledResourceExcluder());
            _compositeFinder.Exclude(new VsDocResourceExcluder());
            _finder = new ResourceModeFilteringFinder(resourceMode, new CachingResourceFinder(resourceCache, _compositeFinder));
            _filterPipelineMap = new ContentFilterPipelineMap();
            _assemblies = new List<Assembly>();
            _dependencyManager = DependencyManagerFactory.GetDependencyManager(_finder, _scriptGroups, _styleGroups, resourceMode);
            _resourceMode = resourceMode;
            _scriptPathResolver = new ResourcePathResolver(_scriptGroups, _dependencyManager, _finder);
            _stylePathResolver = new ResourcePathResolver(_styleGroups, _dependencyManager, _finder);
        }
 public void SetupContext()
 {
     _pipelineMap = new ContentFilterPipelineMap();
 }