NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

MessageQueue.BeginPeek ()

Returns without removing (peeks) the first message available in the queue referenced by the MessageQueue.

[Visual Basic]
Overloads Public Function BeginPeek() As IAsyncResult
[C#]
public IAsyncResult BeginPeek();
[C++]
public: IAsyncResult* BeginPeek();
[JScript]
public function BeginPeek() : IAsyncResult;

Return Value

The IAsyncResult that identifies the asynchronous request posted.

Remarks

BeginPeek is used in asynchronous processing to raise the System.Messaging.MessageQueue.MessageQueue.PeekCompleted event when a message is available. This overload does not specify a timeout, so System.Messaging.MessageQueue.PeekCompleted will only be raised when a message is received.

Because BeginPeek is asynchronous, you can use this method to peek the queue without blocking the current thread of execution. To peek the queue synchronously, use the Peek method.

See Also

MessageQueue Class | MessageQueue Members | System.Messaging Namespace | MessageQueue.BeginPeek Overload List | EndPeek | BeginReceive | Peek | Receive