public void SetUp()
        {
            var behaviorGraph = BehaviorGraph.BuildEmptyGraph();

            theContentCache = behaviorGraph.Services.DefaultServiceFor<IAssetContentCache>()
                .Value.ShouldBeOfType<AssetContentCache>();

            theChain = behaviorGraph.BehaviorFor<AssetWriter>(x => x.Write(null));
        }
        public void SetUp()
        {
            BehaviorGraph behaviorGraph = new FubuRegistry().BuildGraph();

            theContentCache = behaviorGraph.Services.DefaultServiceFor<IAssetContentCache>()
                .Value.ShouldBeOfType<AssetContentCache>();

            theChain = behaviorGraph.BehaviorFor<AssetWriter>(x => x.Write(null));
        }
示例#3
0
        private static void addCaching(BehaviorChain chain, AssetContentCache assetCache)
        {
            var cacheNode = new OutputCachingNode
                            {
                                ETagCache = ObjectDef.ForValue(assetCache),
                                OutputCache = ObjectDef.ForValue(assetCache)
                            };

            chain.AddToEnd(cacheNode);
        }
        public void SetUp()
        {
            file1 = new AssetFile("1");
            file2 = new AssetFile("2");
            file3 = new AssetFile("3");
            file4 = new AssetFile("4");
            file5 = new AssetFile("5");
            file6 = new AssetFile("6");

            theOutputCache = MockRepository.GenerateMock<IOutputCache>();
            headersCache = MockRepository.GenerateMock<IHeadersCache>();

            theCache = new AssetContentCache(headersCache, theOutputCache);

            theGraph = BehaviorGraph.BuildFrom(new FubuRegistry());
        }
示例#5
0
        public AssetServicesRegistry()
        {
            var pipeline = new AssetPipeline();
            SetServiceIfNone<IAssetPipeline>(pipeline);
            SetServiceIfNone<IAssetFileRegistration>(pipeline);

            SetServiceIfNone(new AssetGraph());
            SetServiceIfNone(new AssetLogsCache());

            SetServiceIfNone<IAssetTagWriter, AssetTagWriter>();

            SetServiceIfNone<ICombinationDeterminationService, CombinationDeterminationService>();

            SetServiceIfNone<IAssetCombinationCache, AssetCombinationCache>();
            SetServiceIfNone<IAssetDependencyFinder, AssetDependencyFinderCache>();
            SetServiceIfNone<IAssetTagPlanner, AssetTagPlanner>();
            SetServiceIfNone<IAssetTagBuilder, AssetTagBuilder>();
            SetServiceIfNone<IAssetRequirements, AssetRequirements>();

            SetServiceIfNone<IMissingAssetHandler, TraceOnlyMissingAssetHandler>();

            SetServiceIfNone<IAssetTagPlanCache, AssetTagPlanCache>();

            SetServiceIfNone<ITransformerPolicyLibrary, TransformerPolicyLibrary>();

            SetServiceIfNone<IContentPlanner, ContentPlanner>();
            SetServiceIfNone<IContentPlanCache, ContentPlanCache>();
            SetServiceIfNone<IContentPipeline, ContentPipeline>();

            SetServiceIfNone<IContentWriter, ContentWriter>();

            SetServiceIfNone<IETagGenerator<IEnumerable<AssetFile>>, AssetFileEtagGenerator>();

            var assetCache = new AssetContentCache();
            SetServiceIfNone<IAssetFileChangeListener>(assetCache);
            SetServiceIfNone<IAssetContentCache>(assetCache);
            SetServiceIfNone<IAssetFileWatcher, AssetFileWatcher>();

            FillType(typeof (IActivator), typeof (AssetPrecompilerActivator));
            FillType(typeof(IActivator), typeof(AssetGraphConfigurationActivator));
            FillType(typeof(IActivator), typeof(AssetPipelineBuilderActivator));
            FillType(typeof(IActivator), typeof(AssetDeclarationVerificationActivator));
            FillType(typeof(IActivator), typeof(MimetypeRegistrationActivator));
            FillType(typeof(IActivator), typeof(AssetCombinationBuildingActivator));
            FillType(typeof(IActivator), typeof(AssetPolicyActivator));
            FillType(typeof(IActivator), typeof(AssetFileWatchingActivator));
        }
        public void SetUp()
        {
            file1 = new AssetFile("1");
            file2 = new AssetFile("2");
            file3 = new AssetFile("3");
            file4 = new AssetFile("4");
            file5 = new AssetFile("5");
            file6 = new AssetFile("6");

            theCache = new AssetContentCache();

            theGraph = new FubuRegistry().BuildGraph();
        }