コード例 #1
0
 /// <summary>
 /// Creates a SolidHttpClientFactory
 /// </summary>
 /// <param name="events">The events to be triggered when a SolidHttpClient is created</param>
 /// <param name="deserializers">The deserializer provider for SolidHttp</param>
 /// <param name="configuration">The application configuration</param>
 public SolidHttpClientFactory(
     IHttpClientCache cache,
     ISolidHttpEventInvoker events,
     IEnumerable <IDeserializer> deserializers,
     ISolidHttpOptions options, // this is only added so that the ServicePRovider initializes it
     IConfiguration configuration = null)
 {
     _cache         = cache;
     _events        = events;
     _deserializers = deserializers;
     _configuration = configuration;
 }
コード例 #2
0
ファイル: SolidHttpClient.cs プロジェクト: HX-Rd/SolidHttp
 /// <summary>
 /// Create a SolidHttpClient
 /// </summary>
 /// <param name="client">The inner HttpClient to be used</param>
 /// <param name="serializers">The deserializers supported by this SolidHttpClient</param>
 public SolidHttpClient(HttpClient client, IEnumerable <IDeserializer> deserializers, ISolidHttpEventInvoker events)
 {
     Events        = events;
     InnerClient   = client;
     Deserializers = deserializers;
 }