Example #1
0
        private static void StartAccepting(object state)
        {
            ReliableChannelListener <TChannel, TReliableChannel, TInnerChannel> listener = (ReliableChannelListener <TChannel, TReliableChannel, TInnerChannel>)state;

            try
            {
                listener.StartAccepting();
            }
            catch (Exception exception)
            {
                if (Fx.IsFatal(exception))
                {
                    throw;
                }
                listener.Fault(exception);
            }
        }
Example #2
0
 private static void OnAcceptCompletedStatic(IAsyncResult result)
 {
     if (!result.CompletedSynchronously)
     {
         ReliableChannelListener <TChannel, TReliableChannel, TInnerChannel> asyncState = (ReliableChannelListener <TChannel, TReliableChannel, TInnerChannel>)result.AsyncState;
         try
         {
             asyncState.OnAcceptCompleted(result);
         }
         catch (Exception exception)
         {
             if (Fx.IsFatal(exception))
             {
                 throw;
             }
             asyncState.Fault(exception);
         }
     }
 }