Ejemplo n.º 1
0
        /// <summary>
        ///     Creates a new SOAP Client
        /// </summary>
        /// <param name="settings">The settings to be used</param>
        /// <exception cref="ArgumentNullException"></exception>
        public SoapClient(SoapClientSettings settings)
        {
            if (settings == null)
            {
                throw new ArgumentNullException(nameof(settings));
            }

            _settings  = settings;
            HttpClient = _settings.HttpClientFactory.Get();
        }
Ejemplo n.º 2
0
        /// <summary>
        ///     Creates a new SOAP Client
        /// </summary>
        /// <param name="settings">The settings to be used</param>
        /// <param name="handler">The handler to be used by the <see cref="HttpClient" /></param>
        /// <exception cref="ArgumentNullException"></exception>
        public SoapClient(SoapClientSettings settings, HttpMessageHandler handler)
        {
            if (settings == null)
            {
                throw new ArgumentNullException(nameof(settings));
            }
            if (handler == null)
            {
                throw new ArgumentNullException(nameof(handler));
            }

            _settings  = settings;
            HttpClient = _settings.HttpClientFactory.Get(handler);
        }
Ejemplo n.º 3
0
        /// <summary>
        ///     Creates a new SOAP Client
        /// </summary>
        /// <param name="settings">The settings to be used</param>
        /// <param name="httpClient">The <see cref="HttpClient" /> to be used</param>
        /// <param name="disposeHttpClient">Should the client also be disposed</param>
        /// <exception cref="ArgumentNullException"></exception>
        public SoapClient(SoapClientSettings settings, HttpClient httpClient, bool disposeHttpClient = true)
        {
            if (settings == null)
            {
                throw new ArgumentNullException(nameof(settings));
            }
            if (httpClient == null)
            {
                throw new ArgumentNullException(nameof(httpClient));
            }

            _settings          = settings;
            HttpClient         = httpClient;
            _disposeHttpClient = disposeHttpClient;
        }
Ejemplo n.º 4
0
 static SoapClientSettings()
 {
     _default = new SoapClientSettings();
 }