/// <summary> /// Конструктор репозитория. В нем происходит инициализация клиента для подклбчения к веб службе и загрузка списка IP-адресов. /// </summary> public IPsRepository() { _client = new IPsRepositoryWCFClient(); _ipList = new IPList(); Task.WaitAll(Task.Run(() => GetIpListFromIPsWCFAsync())); }
private static System.ServiceModel.EndpointAddress GetDefaultEndpointAddress() { return(IPsRepositoryWCFClient.GetEndpointAddress(EndpointConfiguration.BasicHttpBinding_IIPsRepositoryWCF)); }
private static System.ServiceModel.Channels.Binding GetDefaultBinding() { return(IPsRepositoryWCFClient.GetBindingForEndpoint(EndpointConfiguration.BasicHttpBinding_IIPsRepositoryWCF)); }
public IPsRepositoryWCFClient(EndpointConfiguration endpointConfiguration, System.ServiceModel.EndpointAddress remoteAddress) : base(IPsRepositoryWCFClient.GetBindingForEndpoint(endpointConfiguration), remoteAddress) { this.Endpoint.Name = endpointConfiguration.ToString(); ConfigureEndpoint(this.Endpoint, this.ClientCredentials); }
public IPsRepositoryWCFClient(EndpointConfiguration endpointConfiguration) : base(IPsRepositoryWCFClient.GetBindingForEndpoint(endpointConfiguration), IPsRepositoryWCFClient.GetEndpointAddress(endpointConfiguration)) { this.Endpoint.Name = endpointConfiguration.ToString(); ConfigureEndpoint(this.Endpoint, this.ClientCredentials); }
public IPsRepositoryWCFClient() : base(IPsRepositoryWCFClient.GetDefaultBinding(), IPsRepositoryWCFClient.GetDefaultEndpointAddress()) { this.Endpoint.Name = EndpointConfiguration.BasicHttpBinding_IIPsRepositoryWCF.ToString(); ConfigureEndpoint(this.Endpoint, this.ClientCredentials); }