/// <summary>
 /// Constructor for the ClientProxy class.
 /// Allocates an instance of the real web service client.
 /// </summary>
 /// <param name="webService">Web service proxy.</param>
 /// <param name="operationTimeoutMinutes">Operation timeout to set in the client. Unit is minutes.</param>
 /// <param name="operationTimeoutSeconds">Operation timeout to set in the client. Unit is seconds.</param>
 public ClientProxy(
     DyntaxaInternalServiceProxy webService,
     Int32 operationTimeoutMinutes,
     Int32 operationTimeoutSeconds = 0)
 {
     _operationTimeout = (operationTimeoutMinutes * 60) + operationTimeoutSeconds;
     _webService       = webService;
     _client           = (DyntaxaInternalServiceClient)_webService.PopClient(_operationTimeout);
     _webService.SetTimeout(Client.Endpoint.Binding, _operationTimeout);
 }
 /// <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()
        {
            DyntaxaInternalServiceClient client;

            client = new DyntaxaInternalServiceClient(
                GetBinding(),
                GetEndpointAddress());

            // Increase data size for all methods that
            // sends or receives a lot of data.
            //IncreaseDataSize("GetLog", client.Endpoint);
            //IncreaseDataSize("GetTaxaByIds", client.Endpoint);
            //IncreaseDataSize("GetTaxaBySearchCriteria", client.Endpoint);
            //IncreaseDataSize("GetTaxonNamesBySearchCriteria", client.Endpoint);
            //IncreaseDataSize("GetTaxonNamesByTaxonIds", client.Endpoint);
            //IncreaseDataSize("GetTaxonRelationsBySearchCriteria", client.Endpoint);
            //IncreaseDataSize("GetTaxonRevisionEventsByTaxonRevisionId", client.Endpoint);
            //IncreaseDataSize("GetTaxonTreesBySearchCriteria", client.Endpoint);

            return(client);
        }