public void Dispose()
        {
            if (_client.State != CommunicationState.Closed)
            {
                _client.Close();
            }

            _client = null;
        }
 private static System.ServiceModel.EndpointAddress GetDefaultEndpointAddress()
 {
     return(DownloadQueueExternalBasicClient.GetEndpointAddress(EndpointConfiguration.BasicHttpBinding_IDownloadQueueExternalBasic));
 }
 private static System.ServiceModel.Channels.Binding GetDefaultBinding()
 {
     return(DownloadQueueExternalBasicClient.GetBindingForEndpoint(EndpointConfiguration.BasicHttpBinding_IDownloadQueueExternalBasic));
 }
 public DownloadQueueExternalBasicClient(EndpointConfiguration endpointConfiguration, System.ServiceModel.EndpointAddress remoteAddress) :
     base(DownloadQueueExternalBasicClient.GetBindingForEndpoint(endpointConfiguration), remoteAddress)
 {
     this.Endpoint.Name = endpointConfiguration.ToString();
     ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
 }
 public DownloadQueueExternalBasicClient(EndpointConfiguration endpointConfiguration) :
     base(DownloadQueueExternalBasicClient.GetBindingForEndpoint(endpointConfiguration), DownloadQueueExternalBasicClient.GetEndpointAddress(endpointConfiguration))
 {
     this.Endpoint.Name = endpointConfiguration.ToString();
     ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
 }
 public DownloadQueueExternalBasicClient() :
     base(DownloadQueueExternalBasicClient.GetDefaultBinding(), DownloadQueueExternalBasicClient.GetDefaultEndpointAddress())
 {
     this.Endpoint.Name = EndpointConfiguration.BasicHttpBinding_IDownloadQueueExternalBasic.ToString();
     ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
 }
 public AltinnDownloadQueueClient(Binding binding, IOptions <AltinnDownloadQueueConnectionSettings> connectionOptions)
 {
     _client            = new DownloadQueueExternalBasicClient(binding, new EndpointAddress(connectionOptions.Value.EndpointUrl));
     _connectionOptions = connectionOptions;
 }