Пример #1
0
        /// <summary>
        /// ConfigureServices
        /// </summary>
        /// <remarks>
        /// This method gets called by the runtime. Use this method to add services to the container.
        /// </remarks>
        public void Configure(IApplicationBuilder app, IHostingEnvironment env)
        {
            app.UseHttpsRedirection();
            app.UseRewriter(new RewriteOptions().AddRedirectToHttps());

            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }

            app.UseAuthentication();
            app.UseMvc();

            var swaggerStartupConfigure = new SwaggerStartupConfigure(app, false, "SwaggerAPI").RedirectToSwagger();
        }
Пример #2
0
        public void Configure(IApplicationBuilder app, IHostingEnvironment env)
        {
            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }

            app.UseMvc();

            bool   withInjectStyleSheet         = true;
            string relativePathInjectStyleSheet = "../Stateless/swaggercustom.css";
            string swaggerDocumentationRoute    = "Swagger";

            var swaggerStartupConfigure =
                new SwaggerStartupConfigure(app, withInjectStyleSheet, swaggerDocumentationRoute, relativePathInjectStyleSheet).RedirectToSwagger();
        }
Пример #3
0
 public void Configure(IApplicationBuilder app, IHostingEnvironment env)
 {
     app.UseMvc();
     var swaggerStartupConfigure =
         new SwaggerStartupConfigure(app).RedirectToSwagger();
 }