I added this nancy module to my previously working nancy application. It compiles, but at application startup I get an error : "Unable to resolve type: HubJH.Web.SignAndStore.SignAndStoreModule"
public class SignAndStoreModule : NancyModule
{
private IConnectionFactory connFac;
SignAndStoreModule(IConnectionFactory connFac)
{
this.connFac = connFac;
Post["/"] = p =>
{
return 200;
};
}
}
What am I doing wrong?
答案 0 :(得分:1)
Ok silly me. The constructor needs to be public. So this works...
public class SignAndStoreModule : NancyModule
{
private IConnectionFactory connFac;
public SignAndStoreModule(IConnectionFactory connFac)
{
this.connFac = connFac;
Post["/"] = p =>
{
return 200;
};
}
}