Пример #1
0
 public void HandleResponse(Exception ex, Response response)
 {
     if (_parent.HasCompleted())
     {
         //Do nothing else, another execution finished already set the response
         return;
     }
     try
     {
         if (ex != null)
         {
             HandleException(ex);
             return;
         }
         if (typeof(T) == typeof(RowSet))
         {
             HandleRowSetResult(response);
             return;
         }
         if (typeof(T) == typeof(PreparedStatement))
         {
             HandlePreparedResult(response);
             return;
         }
         throw new DriverInternalError(String.Format("RequestExecution with type {0} is not supported", typeof(T).FullName));
     }
     catch (Exception handlerException)
     {
         _parent.SetCompleted(handlerException);
     }
 }
Пример #2
0
 public void HandleResponse(Exception ex, Response response)
 {
     if (_parent.HasCompleted())
     {
         //Do nothing else, another execution finished already set the response
         return;
     }
     try
     {
         if (ex != null)
         {
             HandleException(ex);
             return;
         }
         HandleRowSetResult(response);
     }
     catch (Exception handlerException)
     {
         _parent.SetCompleted(handlerException);
     }
 }