Beispiel #1
0
        public bool WaitForMessage(TimeSpan timeout)
        {
            if (DoneReceivingInCurrentState())
            {
                return(true);
            }

            bool shouldFault = true;

            try
            {
                bool success = MessageSource.WaitForMessage(timeout);
                shouldFault = !success; // need to fault if we've timed out because we're now toast
                return(success);
            }
            finally
            {
                if (shouldFault)
                {
                    Fault();
                }
            }
        }