示例#1
0
        public SparkRenderer()
        {
            var factory = new SparkViewEngineFactory();

            _engine = factory.CreateViewEngine();

            _report = new SparkViewDescriptor().AddTemplate(SparkViewEngineFactory.ReportTemplate);
            _index  = new SparkViewDescriptor().AddTemplate(SparkViewEngineFactory.IndexTemplate);
        }
 public SparkRenderer()
 {
   var factory = new SparkViewEngineFactory();
   
   _engine = factory.CreateViewEngine();
   _engine.LoadBatchCompilation(Assembly.Load(factory.TemplateAssembly));
   
   _report = new SparkViewDescriptor().AddTemplate(SparkViewEngineFactory.ReportTemplate);
   _index = new SparkViewDescriptor().AddTemplate(SparkViewEngineFactory.IndexTemplate);
 }
        public SparkRenderer()
        {
            var factory = new SparkViewEngineFactory();

            _engine = factory.CreateViewEngine();
            _engine.LoadBatchCompilation(Assembly.Load(factory.TemplateAssembly));

            _report = new SparkViewDescriptor().AddTemplate(SparkViewEngineFactory.ReportTemplate);
            _index  = new SparkViewDescriptor().AddTemplate(SparkViewEngineFactory.IndexTemplate);
        }
    public override void Install(IDictionary stateSaver)
    {
      var factory = new SparkViewEngineFactory();

      var descriptors = new List<SparkViewDescriptor>
                        {
                          new SparkViewDescriptor().AddTemplate(SparkViewEngineFactory.ReportTemplate),
                          new SparkViewDescriptor().AddTemplate(SparkViewEngineFactory.IndexTemplate)
                        };

      var targetPath = factory.TemplateAssemblyPath;
      
      var engine = factory.CreateViewEngine();
      engine.BatchCompilation(targetPath, descriptors);
    }