Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 3
0
        /// <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();
        }
Ejemplo n.º 4
0
 private void Register(IServiceCollection services)
 {
     Swagger.Configure(services);
     ContextConfiguration.MongoConfigure(services, Configuration);
 }