PowerTCP Mail for .NET
BeginClear Method
See Also  Send comments on this topic.
Dart.PowerTCP.Mail Namespace > ImapMessageCollection Class : BeginClear Method




state
Begins an asynchronous operation which clears all messages in the currently selected mailbox.

Syntax

Visual Basic (Declaration) 
Public Overridable Function BeginClear( _
   ByVal state As Object _
) As IAsyncResult
Visual Basic (Usage)Copy Code
Dim instance As ImapMessageCollection
Dim state As Object
Dim value As IAsyncResult
 
value = instance.BeginClear(state)
C# 
public virtual IAsyncResult BeginClear( 
   object state
)
Managed Extensions for C++ 
public: virtual IAsyncResult* BeginClear( 
   Object* state
) 
C++/CLI 
public:
virtual IAsyncResult^ BeginClear( 
   Object^ state
) 

Parameters

state

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

This method begins to asynchronously clear all messages in the currently selected mailbox (the mailbox represented by Imap.CurrentMailbox). The messages are cleared by first setting their MessageBase.Delete flag to true then sending an "EXPUNGE" command by calling Mailbox.Purge. When this operation is complete, the Imap.EndClear event will be raised.

Requirements

Target Platforms: Microsoft .NET Framework 2.0

See Also

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