PowerTCP Mail for .NET
BeginGet(Stream,Object) Method
See Also  Send comments on this topic.
Dart.PowerTCP.Mail Namespace > PopMessage Class > BeginGet Method : BeginGet(Stream,Object) Method




message
The Stream to use for encapsulating the message.
state
User state information.
Asynchronously get a single message from the server, specifying the Stream object to use for encapsulating the message.

Syntax

Visual Basic (Declaration) 
Public Overloads Sub BeginGet( _
   ByVal message As Stream, _
   ByVal state As Object _
) 
Visual Basic (Usage)Copy Code
Dim instance As PopMessage
Dim message As Stream
Dim state As Object
 
instance.BeginGet(message, state)
C# 
public void BeginGet( 
   Stream message,
   object state
)
Managed Extensions for C++ 
public: void BeginGet( 
   Stream* message,
   Object* state
) 
C++/CLI 
public:
void BeginGet( 
   Stream^ message,
   Object^ state
) 

Parameters

message
The Stream to use for encapsulating the message.
state
User state information.

Return Value

An IAsyncResult that represents the asynchronous operation, which could still be pending.

Remarks

This method begins to get a single message from the server, specifying the Stream to use. Upon completion, the Pop.EndGet event will be raised. A PopEventArgs object will be passed into the Pop.EndGet event, providing data about the message retrieved. The behavior of this method depends on the type of Stream passed in. The following list describes how this method can be used:

  • If message is a FileStream, the encoded message will be dumped to disk.
  • If message is a MemoryStream, the encoded message will be in memory by accessing the e.PopMessage.Message property.
  • If message is a MessageStream, the decoded message will be in memory by accessing the e.PopMessage.Message property.

To perform this operation synchronously, use the PopMessage.Get method.

Requirements

Target Platforms: Microsoft .NET Framework 2.0

See Also

Documentation Version 3.2
© 2010 Dart Communications. All Rights Reserved.