public DefaultPageBuilder()
        {
            SparkSettings settings = new SparkSettings();
            //settings.SetStatementMarker("#*");
            //settings.StatementMarker = "#*";
            settings.SetPrefix("s");
            settings.SetPageBaseType(typeof(TemplateBase));
            _engine = new SparkViewEngine(settings);
            //var sm = _engine.Settings.StatementMarker;

            var templateDirPath = Path.GetFullPath("./Veis/Views/");
            var viewFolder = new FileSystemViewFolder(templateDirPath);

            _engine.ViewFolder = viewFolder.Append(new SubViewFolder(viewFolder, "Shared"));

               //var viewFolder = new FileSystemViewFolder(templateDirPath);

            //// Create an engine using the templates path as the root location
            //// as well as the shared location
            //var engine = new SparkViewEngine
            //{
            //    DefaultPageBaseType = typeof(SparkView).FullName,
            //    ViewFolder = viewFolder.Append(new SubViewFolder(viewFolder, "Shared"))
            //};
        }
 public SparkEngine()
 {
     // TODO read settings from config
     var settings = new SparkSettings
     {
         DefaultLanguage = LanguageType.CSharp
     };
     settings.SetPageBaseType(typeof(ViewBase));
     _engine = new SparkViewEngine();
 }
Exemple #3
0
        public SparkRenderer()
        {
            SparkSettings settings = new SparkSettings();
            settings.SetPageBaseType(typeof(MarkdownPageTemplate));
            settings.DefaultLanguage = LanguageType.CSharp;
            settings.Debug = true;

            settings.AddNamespace("System");

            this.engine = new SparkViewEngine(settings);
        }
Exemple #4
0
 public DefaultMessageBuilder()
 {
     SparkSettings settings = new SparkSettings();
     settings.SetPageBaseType(typeof(TemplateBase));
     _engine = new SparkViewEngine(settings);
 }