예제 #1
0
        /// <summary>
        /// This method gets called by the runtime. Use this method to add services to the container.
        /// </summary>
        public void ConfigureServices(IServiceCollection services)
        {
            ApiVersioningConfiguration.ConfigureService(services);

            services.AddMvc();

            LoadAppSettings.IntoInjector(services, Configuration);

            DependencyInjectorHost.Configure(services);

            // Swagger
            SwaggerStartupConfiguration.ConfigureService(services, environment);
        }
예제 #2
0
        /// <summary>
        /// This method gets called by the runtime. Use this method to add services to the container.
        /// </summary>
        public void ConfigureServices(IServiceCollection services)
        {
            //Ini Habilitar Cors
            services.AddCors();

            services.AddControllers();
            LoadAppSettings.IntoInjector(services, Configuration);
            DependencyInjectorHost.Configure(services);
            SwaggerStartupConfiguration.ConfigureService(services);
            AuthenticationConfiguration.AuthServices(services);
            CorsStartupConfiguration.ConfigureServices(services);

            //services.AddSingleton<ISingleton, Singleton>();
        }
예제 #3
0
        /// <summary>
        /// This method gets called by the runtime. Use this method to add services to the container.
        /// </summary>
        public void ConfigureServices(IServiceCollection services)
        {
            //services.AddHttpClient();
            services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2);

            ApiVersioningConfiguration.ConfigureService(services);

            services.AddMvc();
            services.AddHttpClient();

            LoadAppSettings.IntoInjector(services, Configuration);

            DependencyInjectorHost.Configure(services);

            // Swagger
            SwaggerStartupConfiguration.ConfigureService(services, environment);
        }