Beispiel #1
0
        /*private byte[] favicon;
         *
         * protected override byte[] FavIcon
         * {
         *      get { return favicon ?? (favicon = LoadFavIcon()); }
         * }
         *
         * private byte[] LoadFavIcon()
         * {
         *      var ico = Assembly.GetEntryAssembly().GetManifestResourceStream($"{PROJECT}.{PROJECT}Web.res.img.{PROJECT}.ico");
         *      favicon = new byte[ico.Length];
         *      ico.Read(favicon, 0, favicon.Length);
         *      return favicon;
         * }*/

        public override void Configure(INancyEnvironment environment)
        {
            base.Configure(environment);

#if DEBUG
            environment.Views(runtimeViewUpdates: true);
#endif
        }
Beispiel #2
0
        public override void Configure(INancyEnvironment environment)
        {
            base.Configure(environment);

            Dapper.DefaultTypeMap.MatchNamesWithUnderscores = true;

            environment.Json(retainCasing: true);
            environment.Views(
                runtimeViewUpdates: true,
                runtimeViewDiscovery: true
                );
            environment.Tracing(
                enabled: true,
                displayErrorTraces: true
                );
        }
 public override void Configure(INancyEnvironment environment)
 {
     base.Configure(environment);
     environment.Tracing(false, true);
     environment.Views(false, true);
 }