Esempio n. 1
0
        public static void AddDependencyInjectionSetup(this IServiceCollection services)
        {
            if (services == null)
            {
                throw new ArgumentNullException(nameof(services));
            }

            NativeInject.RegisterServices(services);
        }
Esempio n. 2
0
        public void ConfigureServices(IServiceCollection services)
        {
            services.Configure <AppSettings>(_configuration.GetSection(
                                                 SettingsIntegration.SettingsIntegrations));
            NativeInject.RegisterServices(services);
            services.AddHttpClient <IContractIntegrationWeathermap, ContractIntegrationWeathermap>();
            services.AddHttpClient <IContractIntegrationSpotify, ContractIntegrationSpotify>();

            services.AddControllers();
            services.AddMvc().AddJsonOptions(opcoes =>
            {
                opcoes.JsonSerializerOptions.IgnoreNullValues = true;
            });

            services.AddSwaggerGen();
        }