/// <summary> /// Implementation of the IDisposable interface. /// Recycle the client instance. /// </summary> public void Dispose() { if ((Client.State != CommunicationState.Opened) || (!_webService.PushClient(Client, _operationTimeout))) { // Client is not in state open or // was not added to the client pool. // Release resources. Client.Close(); } Client = null; }
/// <summary> /// Create a web service client. /// </summary> /// <returns>A web service client.</returns> protected override Object CreateClient() { AnalysisServiceClient client; client = new AnalysisServiceClient(GetBinding(), GetEndpointAddress()); // Increase data size for all methods that // sends or receives a lot of data. IncreaseDataSize("GetLog", client.Endpoint); IncreaseDataSize("GetHostsBySpeciesFactSearchCriteria", client.Endpoint); IncreaseDataSize("GetTaxaBySpeciesFactSearchCriteria", client.Endpoint); return(client); }
// Создание COM-объекта, выполняющего перевод private void loadComprenoApi() { _client = new AnalysisServiceClient(); }