public void Setup() { var types = new TypePool(); types.AddAssembly(GetType().Assembly); _runner = new ViewEngineSettings(); }
public virtual void Fill(ViewEngineSettings settings, BehaviorGraph graph, IPerfTimer timer, IFubuApplicationFiles files) { var builder = CreateBuilder(graph.Settings, files); var match = FindMatching(graph.Settings); // HAS TO BE SHALLOW match.DeepSearch = false; _bottle = new ViewCollection <T>(this, files, builder, settings, match); _views = _bottle.AllViews().ToList(); }
public BottleViews(ViewFacility <T> facility, ContentFolder content, Func <IFubuFile, T> builder, ViewEngineSettings settings, FileSet match) { if (match == null) { throw new ArgumentNullException("match"); } _facility = facility; _content = content; _builder = builder; _settings = settings; _match = match; _top = buildFolder(content.Path); }
public ViewCollection(ViewFacility <T> facility, IFubuApplicationFiles files, Func <IFubuFile, T> builder, ViewEngineSettings settings, FileSet match) { if (match == null) { throw new ArgumentNullException("match"); } _facility = facility; _files = files; _builder = builder; _settings = settings; _match = match; _top = buildFolder(_files.RootPath); }
public override void Fill(ViewEngineSettings settings, BehaviorGraph graph, IPerfTimer timer, IFubuApplicationFiles files) { configureNamespaces(graph); base.Fill(settings, graph, timer, files); var bindingTemplates = files .FindFiles(FileSet.Shallow("Shared/bindings.xml")) .Select(x => new SparkTemplate(files, x, _engine, graph.Settings.Get <SparkEngineSettings>())).ToArray(); _engine.ViewFolder = new TemplateViewFolder(AllTemplates()); _engine.DefaultPageBaseType = typeof(FubuSparkView).FullName; _engine.BindingProvider = new FubuBindingProvider(bindingTemplates); _engine.PartialProvider = new FubuPartialProvider(this); }
public void should_ignore_folders() { var settings = new ViewEngineSettings(); settings.FolderShouldBeIgnored("/foo/fubu-content/").ShouldBeTrue(); settings.FolderShouldBeIgnored("/foo/fubu-content").ShouldBeTrue(); settings.FolderShouldBeIgnored("fubu-content").ShouldBeTrue(); settings.FolderShouldBeIgnored("bin").ShouldBeTrue(); settings.FolderShouldBeIgnored("obj").ShouldBeTrue(); settings.FolderShouldBeIgnored("node_modules").ShouldBeTrue(); settings.FolderShouldBeIgnored("node_modules/").ShouldBeTrue(); settings.FolderShouldBeIgnored("/foo/node_modules/").ShouldBeTrue(); settings.FolderShouldBeIgnored("/foo/bar/node_modules/").ShouldBeTrue(); settings.FolderShouldBeIgnored("ok").ShouldBeFalse(); settings.FolderShouldBeIgnored("ok/").ShouldBeFalse(); settings.FolderShouldBeIgnored("/ok").ShouldBeFalse(); settings.FolderShouldBeIgnored("/ok/good/alright").ShouldBeFalse(); }
public virtual void Fill(ViewEngineSettings settings, BehaviorGraph graph) { var builder = CreateBuilder(graph.Settings); var match = FindMatching(graph.Settings); // HAS TO BE SHALLOW match.DeepSearch = false; graph.Files.AllFolders.Each(folder => { var bottle = new BottleViews <T>(this, folder, builder, settings, match); _bottles.Add(bottle); }); LayoutAttachment = PackageRegistry.Timer.RecordTask("Attaching Layouts for " + GetType().Name, () => { AttachLayouts(settings); }); _views = _bottles.SelectMany(x => x.AllViews()).ToList(); }
public PageActivationExpression(ViewEngineSettings parent, Func <IViewToken, bool> filter) { _parent = parent; _filter = filter; }
public void Fill(ViewEngineSettings settings, BehaviorGraph graph) { _views = tokens().Where(x => !graph.Settings.Get <ViewEngineSettings>().IsExcluded(x)).ToList(); }
public PartialRenderer(ViewEngineSettings views) { _views = views; }
public void AttachLayouts(ViewEngineSettings settings) { }
public void Fill(ViewEngineSettings settings, BehaviorGraph graph) { _views = tokens().Where(x => !graph.Settings.Get<ViewEngineSettings>().IsExcluded(x)).ToList(); }
public void AttachLayouts(ViewEngineSettings settings) { _bottles.Each(x => x.AttachLayouts(settings.ApplicationLayoutName)); }
public void Fill(ViewEngineSettings settings, BehaviorGraph graph, IPerfTimer timer, IFubuApplicationFiles files) { _views = tokens().Where(x => !graph.Settings.Get<ViewEngineSettings>().IsExcluded(x)).ToList(); }
public void Fill(ViewEngineSettings settings, BehaviorGraph graph) { throw new NotImplementedException(); }
public void Setup() { _runner = new ViewEngineSettings(); }
public void Fill(ViewEngineSettings settings, BehaviorGraph graph, IPerfTimer timer, IFubuApplicationFiles files) { throw new NotImplementedException(); }
public void Fill(ViewEngineSettings settings, BehaviorGraph graph, IPerfTimer timer, IFubuApplicationFiles files) { _views = tokens().Where(x => !graph.Settings.Get <ViewEngineSettings>().IsExcluded(x)).ToList(); }