protected override void beforeEach() { const string viewPath = "/_Package1_/Handlers/Models/SerieSL.spark"; var appRoot = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Templates"); var packageRoot = Path.Combine(appRoot, "App", "fubu-packages", "Package1", "WebContent"); var binding1 = new Template(Path.Combine(packageRoot, "Handlers", "Shared", "bindings.xml"), packageRoot, "Package1"); var binding2 = new Template(Path.Combine(appRoot, "Shared", "bindings.xml"), appRoot, TemplateConstants.HostOrigin); var viewPathPolicy = new ViewPathPolicy <ITemplate>(); viewPathPolicy.Apply(binding1); viewPathPolicy.Apply(binding2); _viewFolder = MockFor <IViewFolder>(); _viewFolder.Expect(x => x.GetViewSource(binding1.ViewPath)).Return(new FileSystemViewFile(binding1.FilePath)); _viewFolder.Expect(x => x.GetViewSource(binding2.ViewPath)).Return(new FileSystemViewFile(binding2.FilePath)); _request = new BindingRequest(_viewFolder) { ViewPath = viewPath }; _templateRegistry = MockFor <ISparkTemplateRegistry>(); _templateRegistry.Expect(x => x.BindingsForView(viewPath)).Return(new[] { binding1, binding2 }); }
public FubuSparkCmsViewEngine(ISparkTemplateRegistry sparkTemplateRegistry, IServiceLocator services, IViewEntryProviderCache viewEntryProviderCache, IPartialInvoker partialInvoker) { _sparkTemplateRegistry = sparkTemplateRegistry; _services = services; _viewEntryProviderCache = viewEntryProviderCache; _partialInvoker = partialInvoker; }
public SparkActivator(ISparkTemplateRegistry templateRegistry, ISparkViewEngine engine, CommonViewNamespaces namespaces, ITemplateDirectoryProvider<ITemplate> directoryProvider, SparkEngineSettings settings) { _templateRegistry = templateRegistry; _engine = engine; _namespaces = namespaces; _directoryProvider = directoryProvider; _settings = settings; }
public SparkPrecompiler(ISparkTemplateRegistry templates, IViewEntryProviderCache providerCache, SparkEngineSettings settings) { _templates = templates; _providerCache = providerCache; _settings = settings; UseActivation(p => Task.Factory.StartNew(() => Precompile(p))); }
public SparkActivator(ISparkTemplateRegistry templateRegistry, ISparkViewEngine engine, CommonViewNamespaces namespaces, ITemplateDirectoryProvider <ITemplate> directoryProvider, SparkEngineSettings settings) { _templateRegistry = templateRegistry; _engine = engine; _namespaces = namespaces; _directoryProvider = directoryProvider; _settings = settings; }
public TopicLoader(BehaviorGraph graph) { // Just need to force the views to be executed and found var views = graph.Settings.Get <ViewEngines>().Views; // Not super wild about this _sparkTemplates = (ISparkTemplateRegistry)graph.Services.DefaultServiceFor <ISparkTemplateRegistry>().Value; }
public SparkActivator (ISparkTemplateRegistry templateRegistry, ISparkViewEngine engine, CommonViewNamespaces namespaces) { _templateRegistry = templateRegistry; _engine = engine; _namespaces = namespaces; }
public SparkActivator(ISparkTemplateRegistry templateRegistry, ISparkViewEngine engine) { _templateRegistry = templateRegistry; _engine = engine; }
public FubuBindingProvider(ISparkTemplateRegistry templateRegistry) { _templateRegistry = templateRegistry; }
public SparkActivator (ISparkTemplateRegistry templateRegistry, ISparkViewEngine engine) { _templateRegistry = templateRegistry; _engine = engine; }
public TopicLoader(ISparkTemplateRegistry sparkTemplates) { _sparkTemplates = sparkTemplates; }