Ejemplo n.º 1
0
 /// <summary>Creates an instance of the HttpPipeline for each call.</summary>
 /// <param name="boundParameters">The bound parameters from the cmdlet call.</param>
 /// <returns>An instance of Microsoft.Rest.ClientRuntime.HttpPipeline for the remote call.</returns>
 public Microsoft.Rest.ClientRuntime.HttpPipeline CreatePipelineWithProxy(System.Collections.Generic.Dictionary <string, object> boundParameters)
 {
     Microsoft.Rest.ClientRuntime.HttpPipeline pipeline = null;
     BeforeCreatePipeline(boundParameters, ref pipeline);
     pipeline = (pipeline ?? (_handlerSkipSSL.UseProxy ? _pipelineWithProxyWithSkipSSL : _pipelineWithSkipSSL)).Clone();
     AfterCreatePipeline(boundParameters, ref pipeline);
     return(pipeline);
 }
Ejemplo n.º 2
0
        /// <summary>Creates the module instance.</summary>
        private Module()
        {
            /// constructor
            ClientAPI      = new Nutanix.Powershell.NutanixIntentfulAPI();
            _handler.Proxy = _webProxy;

            // SkipSSL handlers
            _handlerDefaultSkipSSL.ServerCertificateCustomValidationCallback = (message, cert, chain, errors) => { return(true); };
            _handlerSkipSSL.ServerCertificateCustomValidationCallback        = (message, cert, chain, errors) => { return(true); };
            _handlerSkipSSL.Proxy = _webProxy;

            // var httpClientHandler = new System.Net.Http.HttpClientHandler();
            // httpClientHandler.ServerCertificateCustomValidationCallback = (message, cert, chain, errors) => { return true; };

            _pipeline          = new Microsoft.Rest.ClientRuntime.HttpPipeline(new Microsoft.Rest.ClientRuntime.HttpClientFactory(new System.Net.Http.HttpClient()));
            _pipelineWithProxy = new Microsoft.Rest.ClientRuntime.HttpPipeline(new Microsoft.Rest.ClientRuntime.HttpClientFactory(new System.Net.Http.HttpClient(_handler)));

            // skip ssl pipelines
            _pipelineWithSkipSSL          = new Microsoft.Rest.ClientRuntime.HttpPipeline(new Microsoft.Rest.ClientRuntime.HttpClientFactory(new System.Net.Http.HttpClient(_handlerDefaultSkipSSL)));
            _pipelineWithProxyWithSkipSSL = new Microsoft.Rest.ClientRuntime.HttpPipeline(new Microsoft.Rest.ClientRuntime.HttpClientFactory(new System.Net.Http.HttpClient(_handlerSkipSSL)));
        }
Ejemplo n.º 3
0
 /// <summary>FIXME: Method BeforeCreatePipeline is MISSING DESCRIPTION</summary>
 /// <param name="boundParams">FIXME: Parameter boundParams is MISSING DESCRIPTION</param>
 /// <param name="pipeline">FIXME: Parameter pipeline is MISSING DESCRIPTION</param>
 partial void BeforeCreatePipeline(System.Collections.Generic.Dictionary <string, object> boundParams, ref Microsoft.Rest.ClientRuntime.HttpPipeline pipeline);