示例#1
0
        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;
 }
示例#3
0
 public SparkActivator(ISparkTemplateRegistry templateRegistry, ISparkViewEngine engine, CommonViewNamespaces namespaces, ITemplateDirectoryProvider<ITemplate> directoryProvider, SparkEngineSettings settings)
 {
     _templateRegistry = templateRegistry;
     _engine = engine;
     _namespaces = namespaces;
     _directoryProvider = directoryProvider;
     _settings = settings;
 }
示例#4
0
        public SparkPrecompiler(ISparkTemplateRegistry templates, IViewEntryProviderCache providerCache, SparkEngineSettings settings)
        {
            _templates     = templates;
            _providerCache = providerCache;
            _settings      = settings;

            UseActivation(p => Task.Factory.StartNew(() => Precompile(p)));
        }
示例#5
0
 public SparkActivator(ISparkTemplateRegistry templateRegistry, ISparkViewEngine engine, CommonViewNamespaces namespaces, ITemplateDirectoryProvider <ITemplate> directoryProvider, SparkEngineSettings settings)
 {
     _templateRegistry  = templateRegistry;
     _engine            = engine;
     _namespaces        = namespaces;
     _directoryProvider = directoryProvider;
     _settings          = settings;
 }
示例#6
0
        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 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)
		{
			_templateRegistry = templateRegistry;
			_engine = engine;
		    _namespaces = namespaces;
		}
示例#9
0
 public SparkActivator(ISparkTemplateRegistry templateRegistry, ISparkViewEngine engine)
 {
     _templateRegistry = templateRegistry;
     _engine           = engine;
 }
示例#10
0
 public FubuBindingProvider(ISparkTemplateRegistry templateRegistry)
 {
     _templateRegistry = templateRegistry;
 }
		public SparkActivator (ISparkTemplateRegistry templateRegistry, ISparkViewEngine engine)
		{
			_templateRegistry = templateRegistry;
			_engine = engine;
		}
示例#12
0
 public FubuBindingProvider(ISparkTemplateRegistry templateRegistry)
 {
     _templateRegistry = templateRegistry;
 }
示例#13
0
 public TopicLoader(ISparkTemplateRegistry sparkTemplates)
 {
     _sparkTemplates = sparkTemplates;
 }