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




message
The Stream to use to contain the message data.
state
User state information.
Begins to asynchronously get the entire message into a user-defined stream.

Syntax

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

Parameters

message
The Stream to use to contain the message data.
state
User state information.

Return Value

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

Exceptions

ExceptionDescription
System.InvalidOperationExceptionBeginXXX method used without providing an EndXXX event handler.
Dart.PowerTCP.Mail.ProtocolExceptionBad IMAP protocol response received from server.
System.Net.Sockets.SocketExceptionThe requested address is not valid in its context.

Remarks

The ImapMessage.BeginGet method begins to asynchronously get the full message, including flags, internal date, and UID. Upon completion, the Imap.EndGet event will be raised. The Stream parameter is used as the internal Stream representation of the message. If the parameter is null, a new MessageStream object will be created and used as the internal Stream.

The stream passed in is accessible as ImapMessage.Stream.

For bulk operations, use Mailbox.BeginGet which gets all messages in a mailbox.

Requirements

Target Platforms: Microsoft .NET Framework 2.0

See Also

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