【发布时间】:2015-05-01 03:30:34
【问题描述】:
我想在 NancyFx 中使用除 Views 以外的其他文件夹。我创建了一个自定义引导程序,它看起来像:
using Nancy;
namespace MyBootstrapperTest
{
public class CustomBootstrapper : DefaultNancyBootstrapper
{
protected override void ConfigureConventions(Nancy.Conventions.NancyConventions nancyConventions)
{
nancyConventions.ViewLocationConventions.Add((viewName, model, context)) => string.Concat("html/", viewName));
}
}
}
但 Visual Studio 告诉我重载函数 ViewLocationConventions.Add 具有无效参数。我错过了什么吗?我对 Nancy 很陌生,在 0.21.1 版本中使用 Nancy 自托管。
【问题讨论】:
标签: nancy