Beispiel #1
0
        public IActionBehavior BuildBehavior(ServiceArguments arguments, Guid behaviorId)
        {
            var diagnostics = _container.Get <DiagnosticBehavior>();

            var writer = _container.Get <IOutputWriter>();
            var report = _container.Get <IDebugReport>();

            arguments.Set(typeof(IOutputWriter), new RecordingOutputWriter(report, writer));

            var behavior = _inner.BuildBehavior(arguments, behaviorId);

            diagnostics.Inner = behavior;

            return(diagnostics);
        }
Beispiel #2
0
        private IList <RouteBase> buildRoutes()
        {
            var routes = new List <RouteBase>();

            // Build route objects from route definitions on graph + add packaging routes
            var factory = facility.BuildFactory();

            facility.Get <IRoutePolicy>().BuildRoutes(_graph, factory).Each(routes.Add);
            _fubuFacility.AddPackagingContentRoutes(routes);

            return(routes);
        }
Beispiel #3
0
        public void Activate(IEnumerable <IPackageInfo> packages, IPackageLog log)
        {
            var list = new List <string>();

            log.Trace("Setting up the {0} with directories", typeof(XmlDirectoryLocalizationStorage).Name);

            list.Add(FubuMvcPackageFacility.GetApplicationPath());

            packages.Each(pak => pak.ForFolder(BottleFiles.WebContentFolder, list.Add));

            var storage = new XmlDirectoryLocalizationStorage(list);

            _facility.Register(typeof(ILocalizationStorage), ObjectDef.ForValue(storage));

            _facility.Get <SpinUpLocalizationCaches>().Activate(packages, log);
        }