TryPoll() public method

public TryPoll ( System.TimeSpan inTimeout, Message &outItem ) : bool
inTimeout System.TimeSpan
outItem jabber.protocol.client.Message
return bool
コード例 #1
0
        void IAuctionSniperDriver.HasReceivedMessageFromServer()
        {
            Message msg;

            Assert.That(mQueue.TryPoll(TimeSpan.FromSeconds(5), out msg), Is.True, "expired at 5 seconds");
            Assert.That(msg, Is.Not.Null);
        }
コード例 #2
0
        private Message ReceiveMessage(JID inJId, NUnit.Framework.Constraints.Constraint inMatcher)
        {
            Message result;

            Assert.That(mQueue.TryPoll(TimeSpan.FromSeconds(5), out result), Is.True, "5秒間に何らかのメッセージが送られてこなければならない");
            Assert.That(result, Is.Not.Null);
            Assert.That(result.Body, inMatcher);
            Assert.That(result.From.ToString(), Is.EqualTo(inJId.ToString()));

            return(result);
        }