public void VisitRoute(IRouteDefinition route, BehaviorChain chain) { if (_behaviorFilters.MatchesAll(chain) && _routeFilters.MatchesAll(route)) { _actions.Do(route, chain); } }
private ScanRequest buildRequest(ICollection <ITemplate> templates, params SparkRoot[] sparkRoots) { var request = new ScanRequest(); _requestConfig.Do(request); sparkRoots.Each(r => request.AddRoot(r.Path)); request.AddHandler(fileFound => { var origin = sparkRoots.First(x => x.Path == fileFound.Root).Origin; var sparkFile = new Template(fileFound.Path, fileFound.Root, origin); templates.Add(sparkFile); }); return(request); }
public IEnumerable <ITemplate> FindInHost() { var templates = new List <ITemplate>(); var root = new SparkRoot { Origin = FubuSparkConstants.HostOrigin, Path = HostPath }; var request = buildRequest(templates, root); _hostExcludes.Do(request); _fileScanner.Scan(request); return(templates); }
public void VisitBehavior(BehaviorChain chain) { if (!_filters.MatchesAll(chain)) { return; } var matchesDescriptions = _filters.GetDescriptionOfMatches(chain).Join(", "); if (matchesDescriptions == string.Empty) { matchesDescriptions = "(no filters defined)"; } chain.Calls.Each(call => call.Trace("Visiting: {0}. Matched on filters [{1}]", _reasonToVisit, matchesDescriptions)); _actions.Do(chain); }
public void Configure(TemplateComposer <ITemplate> composer) { _configurations.Do(composer); }
public void Render(IFubuRequestContext context) { PreRender.Do(_view); _view.Render(context); PostRender.Do(_view); }
public void Render() { PreRender.Do(_view); _view.Render(); PostRender.Do(_view); }
public void OnFound(FileFound file) { _onFound.Do(file); }