private static void OnComplete(object parameter)
            {
                MsmqReceiveHelper.TryTransactedReceiveAsyncResult result = parameter as MsmqReceiveHelper.TryTransactedReceiveAsyncResult;
                Transaction current = Transaction.Current;

                Transaction.Current = result.txCurrent;
                try
                {
                    Exception exception = null;
                    try
                    {
                        result.expired = !result.receiver.TryReceive(result.msmqMessage, result.timeoutHelper.RemainingTime(), result.transactionMode, out result.messageProperty);
                    }
                    catch (Exception exception2)
                    {
                        if (Fx.IsFatal(exception2))
                        {
                            throw;
                        }
                        exception = exception2;
                    }
                    result.Complete(false, exception);
                }
                finally
                {
                    Transaction.Current = current;
                }
            }
 internal static bool End(IAsyncResult result, out MsmqInputMessage msmqMessage, out MsmqMessageProperty property)
 {
     MsmqReceiveHelper.TryTransactedReceiveAsyncResult result2 = AsyncResult.End <MsmqReceiveHelper.TryTransactedReceiveAsyncResult>(result);
     msmqMessage = result2.msmqMessage;
     property    = result2.messageProperty;
     return(!result2.expired);
 }