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




state
User state information.
Begins to asynchronously update all of the mailbox properties to reflect the server version.

Syntax

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

Parameters

state
User state information.

Return Value

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

Exceptions

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

Remarks

Any time a method is called to add/delete/modify a mailbox, the command is sent to the server to update the server mailbox and the appropriate modifications are made to the local Mailbox object representing the server mailbox. The Mailbox.BeginRefresh method updates all the Mailbox properties to reflect the server version. Upon completion of this operation, the Imap.EndRefresh event is raised. This method uses the IMAP EXAMINE or REFRESH commands to retrieve the current settings of the mailbox, so calling this method is equivalent to setting the mailbox equal to the current mailbox (i.e. this Mailbox object will be the Imap.CurrentMailbox property after calling this method). In addition, this will get information about any new mailbox updates that may have occurred due to another user being logged into the account.

Requirements

Target Platforms: Microsoft .NET Framework 2.0

See Also

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