public void SetupContext() { DependencyManagerFactory.ClearDependencyCache(); _finder = new StubResourceFinder(); _context = new AssmanContext(ResourceMode.Release); _context.AddFinder(_finder); }
internal AssmanContext(ResourceMode resourceMode) { var resourceCache = ResourceCacheFactory.GetCache(resourceMode); _scriptGroups = ResourceGroupManager.GetInstance(resourceMode, resourceCache); _styleGroups = ResourceGroupManager.GetInstance(resourceMode, resourceCache); _finder = new CompositeResourceFinder(resourceCache); _finder.Exclude(new ConsolidatedResourceExcluder(_scriptGroups)); _finder.Exclude(new ConsolidatedResourceExcluder(_styleGroups)); _finder.Exclude(new PreCompiledResourceExcluder()); _finder.Exclude(new VsDocResourceExcluder()); _filterPipelineMap = new ContentFilterPipelineMap(); _assemblies = new List <Assembly>(); _dependencyManager = DependencyManagerFactory.GetDependencyManager(_finder, _scriptGroups, _styleGroups); _resourceMode = resourceMode; }
public void Init() { _finder = new StubResourceFinder(); _finder.CreateResource(myScript); _finder.CreateResource(mySecondScript); _finder.CreateResource(excludedScript); _dependencyProvider = new StubDependencyProvider(); DependencyManagerFactory.ClearDependencyCache(); _instance = AssmanContext.Create(ResourceMode.Debug); _instance.ConsolidateScripts = true; _instance.ConfigurationLastModified = DateTime.MinValue; _instance.AddFinder(_finder); _instance.MapExtensionToDependencyProvider(".js", _dependencyProvider); _groupElement = new ScriptGroupElement(); _groupElement.ConsolidatedUrl = consolidatedScript; _groupElement.Exclude.AddPattern(excludedScript); _instance.ScriptGroups.Add(_groupElement); }
public void Init() { _finder = new StubResourceFinder(); _finder.CreateResource(myScript); _finder.CreateResource(mySecondScript); _finder.CreateResource(excludedScript); _dependencyProvider = new StubDependencyProvider(); DependencyManagerFactory.ClearDependencyCache(); _context = AssmanContext.Create(ResourceMode.Debug); _context.ConsolidateScripts = true; _context.ConfigurationLastModified = DateTime.MinValue; _context.AddFinder(_finder); _context.MapExtensionToDependencyProvider(".js", _dependencyProvider); _groupElement = new ScriptGroupElement(); _groupElement.ConsolidatedUrl = consolidatedScript; _groupElement.Exclude.AddPattern(excludedScript); _context.ScriptGroups.Add(_groupElement); _registry = new ConsolidatingResourceRegistry(new ResourceRequirementCollection(), "Default", _context.ScriptPathResolver, new ConfiguredVersioningStrategy(() => _context.Version)); }