Esempio n. 1
0
        public HttpPipeline(HttpPipelineTransport transport, HttpPipelinePolicy[] policies = null, IServiceProvider services = null)
        {
            _transport = transport ?? throw new ArgumentNullException(nameof(transport));

            policies = policies ?? Array.Empty <HttpPipelinePolicy>();

            var all = new HttpPipelinePolicy[policies.Length + 1];

            all[policies.Length] = new HttpPipelineTransportPolicy(_transport);
            policies.CopyTo(all, 0);

            _pipeline = all;
            _services = services ?? HttpClientOptions.EmptyServiceProvider.Singleton;
        }
Esempio n. 2
0
 public HttpPipelineTransportPolicy(HttpPipelineTransport transport)
 {
     _transport = transport;
 }