Ejemplo n.º 1
0
        private static void OnScheduled(object state)
        {
            OperationWithTimeoutAsyncResult result = (OperationWithTimeoutAsyncResult)state;
            Exception exception = null;

            try
            {
                using ((result.CallbackActivity == null) ? null : ServiceModelActivity.BoundOperation(result.CallbackActivity))
                {
                    result.operationWithTimeout(result.timeoutHelper.RemainingTime());
                }
            }
            catch (Exception exception2)
            {
                if (Fx.IsFatal(exception2))
                {
                    throw;
                }
                exception = exception2;
            }
            result.Complete(false, exception);
        }
Ejemplo n.º 2
0
        private static void OnScheduled(object state)
        {
            OperationWithTimeoutAsyncResult thisResult = (OperationWithTimeoutAsyncResult)state;
            Exception completionException = null;

            try
            {
                using (thisResult.CallbackActivity == null ? null : ServiceModelActivity.BoundOperation(thisResult.CallbackActivity))
                {
                    thisResult._operationWithTimeout(thisResult._timeoutHelper.RemainingTime());
                }
            }
#pragma warning suppress 56500 // covered by FxCOP
            catch (Exception e)
            {
                if (Fx.IsFatal(e))
                {
                    throw;
                }

                completionException = e;
            }
            thisResult.Complete(false, completionException);
        }
Ejemplo n.º 3
0
 public void OnEndOpen(IAsyncResult result)
 {
     OperationWithTimeoutAsyncResult.End(result);
 }