Rebex
Products Downloads Buy Support Contact
Show / Hide Table of Contents

Imap.UnselectFolderAsync Method

Namespace: Rebex.Net
Assembly: Rebex.Imap.dll (version 7.0.9147)

UnselectFolderAsync(Boolean, Object)

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.

Declaration
public Task UnselectFolderAsync(bool purgeDeleted, object state = null)
Parameters
Type Name Description
Boolean purgeDeleted

Specifies whether to purge (permanently remove) all messages marked as deleted.

Object state

An optional user-provided object that identifies this particular asynchronous operation.

Returns
Type Description
Task
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.

See Also
SelectFolder(String)
Purge()

UnselectFolderAsync(Object)

Begins asynchronous UnselectFolder operation. Unselects the currently selected folder. Messages marked as deleted (with a Deleted flag) are not permanently removed. To remove them, use UnselectFolder(Boolean) or Purge() method.

Declaration
public Task UnselectFolderAsync(object state = null)
Parameters
Type Name Description
Object state

An optional user-provided object that identifies this particular asynchronous operation.

Returns
Type Description
Task
Remarks

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

This method does not perform any IMAP command. To unselect a folder and purge deleted messages using the CLOSE command, use UnselectFolder(Boolean) mehod.

See Also
SelectFolder(String)
Purge()
In This Article
  • UnselectFolderAsync(Boolean, Object)
  • UnselectFolderAsync(Object)
© REBEX ČR s.r.o. Back to top
Privacy policy
Manage cookies