public static void AddDependencyInjectionSetup(this IServiceCollection services) { if (services == null) { throw new ArgumentNullException(nameof(services)); } NativeInject.RegisterServices(services); }
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(); }