Beispiel #1
0
 public void CopyFrom(HttpClientSettings settings)
 {
     ServicePotocol = settings.ServicePotocol;
     Port           = settings.Port;
     Context        = settings.Context;
     Hostname       = settings.Hostname;
 }
Beispiel #2
0
 public static void ConfigureHttpClientService(this IServiceCollection services, HttpClientSettings settings)
 {
     services.AddHttpClient <HttpGenericBaseClient>();
     services.Configure <HttpClientSettings>(o => o.CopyFrom(settings));
     services.TryAddTransient <IHttpGenericBaseClient, HttpGenericBaseClient>();
 }