예제 #1
0
파일: Object.cs 프로젝트: stick/zeroc-ice
 /// <summary>
 /// Dispatches an invocation to a servant. This method is used by dispatch interceptors to forward an invocation
 /// to a servant (or to another interceptor).
 /// </summary>
 /// <param name="request">The details of the invocation.</param>
 /// <param name="cb">The callback object for asynchchronous dispatch. For synchronous dispatch, the
 /// callback object must be null.</param>
 /// <returns>The dispatch status for the operation.</returns>
 public virtual DispatchStatus ice_dispatch(Request request, DispatchInterceptorAsyncCallback cb)
 {
     if (request.isCollocated())
     {
         return(collocDispatch__((IceInternal.Direct)request));
     }
     else
     {
         IceInternal.Incoming inc = (IceInternal.Incoming)request;
         if (cb != null)
         {
             inc.push(cb);
         }
         try
         {
             inc.startOver(); // may raise ResponseSentException
             return(dispatch__(inc, inc.getCurrent()));
         }
         finally
         {
             if (cb != null)
             {
                 inc.pop();
             }
         }
     }
 }
예제 #2
0
 public virtual Ice.DispatchStatus ice_dispatch(Ice.Request request, Ice.DispatchInterceptorAsyncCallback cb)
 {
     IceInternal.Incoming inc = (IceInternal.Incoming)request;
     if (cb != null)
     {
         inc.push(cb);
     }
     try
     {
         inc.startOver();
         return(dispatch__(inc, inc.getCurrent()));
     }
     finally
     {
         if (cb != null)
         {
             inc.pop();
         }
     }
 }