Esempio n. 1
0
 // ----- Public methods
 public TResponse Send <TRequest, TResponse>(TRequest request)
 {
     lock (_locker) {
         try {
             _requestDispatcher.SendRequest(request);
             return(_requestDispatcher.ReceiveResponse <TResponse>());
         }
         catch (RequestException ex) {
             throw new RemoteClientException(string.Format("An error occured during the execution of the request {0}.", typeof(TRequest).Name), ex);
         }
     }
 }