public static IHttpClientBuilder AddHttpClientForGateway <TGateway>(this IServiceCollection services) where TGateway : class, IGateway { if (services == null) { throw new ArgumentNullException(nameof(services)); } return(services.AddHttpClient(GatewayHelper.GetName <TGateway>())); }