public void Configuration(IAppBuilder appBuilder) { HttpConfiguration httpConfiguration = new HttpConfiguration(); WebApi.Configure(httpConfiguration); Swagger.Configure(httpConfiguration); appBuilder.UseWebApi(httpConfiguration); }
public static void Configure(IApplicationBuilder app, IHostingEnvironment env) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } else { app.UseHsts(); app.UseHttpsRedirection(); } Swagger.Configure(app); Mvc.Configure(app); }
/// <summary> /// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. /// </summary> /// <param name="app">Application Builder</param> public void Configure(IApplicationBuilder app) { if (Environment.IsDevelopment()) { app.UseDeveloperExceptionPage(); } else { app.UseHsts(); } // Error Page Redirection //Localization.Configure(app); Swagger.Configure(app, Environment); //app.UseAuthentication(); app.UseHttpsRedirection(); app.UseMvc(); }
private void Register(IServiceCollection services) { Swagger.Configure(services); ContextConfiguration.MongoConfigure(services, Configuration); }