c# - Custom Nancy bootstrapper not being called -


i building nancy based application uses nancyhost embedded web server.

i trying serve static content, creating custom bootstrapper described in documentation here. however, problem see custom bootstrapper class never instantiated , configureconventions method never called. there specific action have in order make sure custom bootstrapper registered?

the custom bootstrapper code below:

using nancy; using nancy.conventions; using system;  namespace application {     public class custombootstrapper : defaultnancybootstrapper     {         protected override void configureconventions(nancyconventions conventions)         {             console.writeline("test");             conventions.staticcontentsconventions.add(staticcontentconventionbuilder.adddirectory("client", @"client"));             conventions.staticcontentsconventions.add(staticcontentconventionbuilder.adddirectory("lib", @"lib"));             base.configureconventions(conventions);         }     } } 

it turns out had pass reference custombootstrapper in nancyhost constructor.

var host = new nancyhost(new uri(jsonhelper.url), new custombootstrapper(), config); host.start(); 

Comments

Popular posts from this blog

Hatching array of circles in AutoCAD using c# -

ios - UITEXTFIELD InputView Uipicker not working in swift -

Python Pig Latin Translator -