Beispiel #1
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);
 }
        private void SetupWithMode(ResourceMode resourceMode)
        {
            _dependencyProvider = new StubDependencyProvider();
            _resourceFinder = new StubResourceFinder();
            _dependencyCache = new InMemoryDependencyCache();
            _scriptGroups = new ResourceGroupManager(resourceMode);
            _styleGroups = new ResourceGroupManager(resourceMode);

            _dependencyManager = new DependencyManager(new ResourceModeFilteringFinder(resourceMode, _resourceFinder), _dependencyCache, _scriptGroups, _styleGroups,
                                                       resourceMode);
            _dependencyManager.MapProvider(".js", _dependencyProvider);
        }