代码之家  ›  专栏  ›  技术社区  ›  Jörg W Mittag

在Spark SetPageBaseType设置中放置什么

  •  0
  • Jörg W Mittag  · 技术社区  · 16 年前

    //A shared view that all other views should use
    public abstract class SharedView : AbstractSparkView
    {
        public string BasePath = string.Empty;
    }
    
    public abstract class ApplicationView : SharedView
    {
        public Application Application { get; set; }
    } 
    

    然后我为Spark设置如下

    var settings = new SparkSettings()
                .SetPageBaseType(typeof(ApplicationView )) //What should go in here!?
                .AddNamespace("SomeNameSpaces")
                ;
    

    现在,当我 将ApplicationView作为SetPageBaseType- ?

    基本上我需要上面的帮助和SetPageBaseType的一般解释以及如何使用它。

    1 回复  |  直到 16 年前
        1
  •  1
  •   Mark mergoc    15 年前

    通过直接从引擎的setting属性更改设置,可以更改每个视图的PageBaseType。

    engine.Settings.PageBaseType = typeof(ApplicationView).FullName;
    

    我为这个过程写了一个简单的包装。。。你能找到的 here

    推荐文章