コード例 #1
0
 public Object EndCall(Mailbox mb, XType responseType)
 {
     try
     {
         int     timeout = disableTimeout ? 0 : responseType.Timeout;
         Element mbe     = mb.Read(timeout);
         if (mbe == null)
         {
             throw new TimeoutException("timeout waiting for " + responseType);
         }
         Message rmsg = mbe.msg;
         rmsg.CheckType(responseType);
         Object r = rmsg.Get(responseType.ResponseField);
         if (r is Exception)
         {
             Exception e = (Exception)r;
             throw e;
         }
         return(r);
     }
     finally
     {
         mb.CloseRead();
     }
 }