Пример #1
0
 public override void Configure(INancyEnvironment environment)
 {
     if (_webHostEnvironment.IsDevelopment())
     {
         environment.Tracing(true, true);
     }
 }
Пример #2
0
 public override void Configure(INancyEnvironment environment)
 {
     environment.Tracing(enabled: true, displayErrorTraces: true);
     environment.Diagnostics(
         enabled: true,
         password: "******");
 }
        public override void Configure(INancyEnvironment environment)
        {
            environment.Diagnostics(true, "password");
            environment.Tracing(true, true);

            base.Configure(environment);
        }
Пример #4
0
        /// <summary>
        /// Configures the Nancy environment
        /// </summary>
        /// <param name="environment">The <see cref="T:Nancy.Configuration.INancyEnvironment" /> instance to configure</param>
        public override void Configure(INancyEnvironment environment)
        {
            base.Configure(environment);

            environment.Tracing(true, true);
            environment.Diagnostics("wb");
        }
Пример #5
0
        // Override with a valid password(albeit a really really bad one!)
        // to enable the diagnostics dashboard
        public override void Configure(INancyEnvironment environment)
        {
            // https://github.com/NancyFx/Nancy/issues/2632
            // Nancy.Json.JsonConfiguration.Default = new

            // Nancy.Json.JsonConfiguration(

            //Nancy.Json.JsonConfiguration.Default.RetainCasing = true;
            //Nancy.Json.JsonSettings.RetainCasing = true;
            // base.Configure(environment);

            /*
             * environment.Diagnostics(
             *  enabled: true,
             *  password: "******",
             *  path: "/_Nancy",
             *  cookieName: "__custom_cookie",
             *  slidingTimeout: 30,
             *  cryptographyConfiguration: CryptographyConfiguration.NoEncryption);
             */

            environment.Tracing(
                enabled: true,
                displayErrorTraces: true);
        }
Пример #6
0
 public override void Configure(INancyEnvironment environment)
 {
     environment.Tracing(
         enabled: true,
         displayErrorTraces: true
         );
 }
        public override void Configure(INancyEnvironment environment)
        {
            base.Configure(environment);

#if DEBUG
            environment.Tracing(true, true);
#endif
        }
        public override void Configure(INancyEnvironment environment)
        {
            base.Configure(environment);
            //TODO: для отладки, потом убрать
            environment.Diagnostics(true, "Qaz123");

            environment.Tracing(enabled: false, displayErrorTraces: true);
        }
Пример #9
0
        public override void Configure(INancyEnvironment environment)
        {
            base.Configure(environment);

            environment.AddValue("AssetServer", this.assetServer);

            environment.Tracing(enabled: true, displayErrorTraces: true);
        }
Пример #10
0
        public override void Configure(INancyEnvironment environment)
        {
            var hostEnv = _services.BuildServiceProvider().GetService <IWebHostEnvironment>();

            if (!hostEnv.IsProduction())
            {
                environment.Tracing(false, true);
            }
        }
Пример #11
0
 public override void Configure(INancyEnvironment environment)
 {
     base.Configure(environment);
     if (Application.isEditor)
     {
         environment.Tracing(enabled: true, displayErrorTraces: true);
         environment.Diagnostics(password: "******");
     }
 }
Пример #12
0
        public override void Configure(INancyEnvironment environment)
        {
            base.Configure(environment);

#if DEBUG
            environment.Views(runtimeViewUpdates: true);
#endif
            environment.Tracing(false, true);
        }
Пример #13
0
        public override void Configure(INancyEnvironment environment)
        {
            base.Configure(environment);

            //activate that errors are shown on webpage
            environment.Tracing(
                enabled: true,
                displayErrorTraces: true);
        }
Пример #14
0
        public override void Configure(INancyEnvironment environment)
        {
            environment.Diagnostics(
                enabled: true,
                password: "******"
            );

            environment.Tracing(
                enabled: false,
                displayErrorTraces: true
            );
        }
Пример #15
0
    public override void Configure(INancyEnvironment environment)
    {
        environment.Diagnostics(
            enabled: true,
            password: "******",
            path: "/_Nancy",
            cookieName: "__custom_cookie",
            slidingTimeout: 30,
            cryptographyConfiguration: CryptographyConfiguration.NoEncryption);

        environment.Tracing(
            enabled: true,
            displayErrorTraces: true);
    }
Пример #16
0
        // Override with a valid password (albeit a really really bad one!)
        // to enable the diagnostics dashboard
        public override void Configure(INancyEnvironment environment)
        {
            environment.Diagnostics(
                password: "******",
                path: "/_Nancy",
                cookieName: "__custom_cookie",
                slidingTimeout: 30,
                cryptographyConfiguration: CryptographyConfiguration.NoEncryption);

            environment.Tracing(
                enabled: true,
                displayErrorTraces: true);

            environment.MyConfig("Hello World");
        }
Пример #17
0
        public override void Configure(INancyEnvironment environment)
        {
            var config = ApplicationContainer.Resolve <IConfig>();

            environment.Diagnostics(
                enabled: config.DiagnosticsEnabled,
                password: config.DiagnosticsPassword,
                path: "/_Nancy",
                cookieName: "jira.api",
                slidingTimeout: 30);

            environment.Tracing(
                enabled: true,
                displayErrorTraces: true);
        }
Пример #18
0
        //=============================================================================================/
        /// <summary>
        /// INancyEnvironment の設定
        /// </summary>
        /// <param name="environment"></param>
        //=============================================================================================/
        public override void Configure(INancyEnvironment environment)
        {
            environment.Diagnostics(
                enabled: true,
                password: "******",
                path: "/_Nancy",
                cookieName: "__custom_cookie",
                slidingTimeout: 30
                );

            environment.Tracing(
                enabled: true,
                displayErrorTraces: true
                );
        }
Пример #19
0
        public override void Configure(INancyEnvironment environment)
        {
            environment.Diagnostics(
                enabled: true,
                password: "******",
                path: "/_Nancy",
                cookieName: "__custom_cookie",
                slidingTimeout: 30);

            environment.Tracing(
                enabled: true,
                displayErrorTraces: true);

            //environment.MyConfig("Hello World");
            Console.WriteLine("CustomBootstrapper Configure...");
        }
Пример #20
0
        public override void Configure(INancyEnvironment environment)
        {
            var enabled = Globals.Config.Development;
            var key     = Guid.NewGuid().ToString().Replace("-", null);

            if (enabled)
            {
                Console.WriteLine("Development mode is enabled.");
                Console.WriteLine("Diagnostic interface: http://+/_Nancy");
                Console.WriteLine("Password: " + key);
            }

            environment.Diagnostics(enabled, key);
            environment.Tracing(enabled: enabled, displayErrorTraces: enabled);
            base.Configure(environment);
        }
Пример #21
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)
        {
            var dashboardPassword = Configuration.GetValue <string>("NancyDashboardPassword");

            if (!string.IsNullOrWhiteSpace(dashboardPassword))
            {
                environment.Diagnostics(true, dashboardPassword);
            }

            var displayErrorTraces = Configuration.GetValue <bool>("DisplayErrorTraces");

            if (displayErrorTraces)
            {
                environment.Tracing(enabled: true, displayErrorTraces: true);
            }

            base.Configure(environment);
        }
Пример #23
0
        public override void Configure(INancyEnvironment environment)
        {
            var config = JObject.Parse(File.ReadAllText(_configurationFile));

            foreach(var element in config)
            {
                environment.AddValue<string>(element.Key, element.Value.Value<string>());
            }

            environment.Diagnostics(
                enabled: true,
                password: config["GTDPad.DiagnosticsPassword"].Value<string>()
            );

            environment.Tracing(
                enabled: false,
                displayErrorTraces: true
            );
        }
Пример #24
0
 public override void Configure(INancyEnvironment environment)
 {
     base.Configure(environment);
     environment.Tracing(false, true);
     environment.Views(false, true);
 }
 public override void Configure(INancyEnvironment environment)
 {
     environment.Tracing(true, true);
 }
Пример #26
0
 public override void Configure(INancyEnvironment environment)
 {
     environment.Tracing(false, bool.Parse(Environment.GetEnvironmentVariable(EnvironmentVariableKeys.DisplayErrorTraces)));
     base.Configure(environment);
 }
Пример #27
0
 public override void Configure(INancyEnvironment environment)
 {
     environment.Diagnostics(true, "password");
     environment.Tracing(enabled: false, displayErrorTraces: true);
     base.Configure(environment);
 }
Пример #28
0
        public override void Configure(INancyEnvironment environment)
        {
            bool debug = App.Cfg.Web.DebugMode;

            environment.Tracing(enabled: debug, displayErrorTraces: debug);
        }
 public override void Configure(INancyEnvironment environment)
 {
     base.Configure(environment);
     environment.Tracing(true, true); //enable showing error page for unhandled server exceptions
 }