Begins asynchronous UnselectFolder operation. Unselects the currently selected folder and optionally permanently removes all messages marked as deleted (with a Deleted flag) from the current folder.

Namespace:  Rebex.Net
Assembly:  Rebex.Imap (in Rebex.Imap.dll)

Syntax

Visual Basic
Public Function BeginUnselectFolder ( _
	purgeDeleted As Boolean, _
	callback As AsyncCallback, _
	state As Object _
) As IAsyncResult
C#
public IAsyncResult BeginUnselectFolder(
	bool purgeDeleted,
	AsyncCallback callback,
	Object state
)

Parameters

purgeDeleted
Type: System..::..Boolean
Specifies whether to purge (permanently remove) all messages marked as deleted.
callback
Type: System..::..AsyncCallback
An optional asynchronous callback to be called when the operation is complete.
state
Type: System..::..Object
A user-provided object that identifies this particular asynchronous operation.

Return Value

An IAsyncResult that references the asynchronous operation.

Remarks

CurrentFolder will be null (Nothing in Visual Basic) after a call to this method.

This method uses IMAP CLOSE command to purge the messages. No purging is performed if the current folder is selected as read-only.

In builds for .NET 4.0 and higher, this method is available as an extension method. Add 'using Rebex.Legacy' (C#) or 'Import Rebex.Legacy' (VB.NET) to your code in order to use it.

Version Information

.NET Compact Framework

Supported in: 3.9, 3.5

See Also