PowerTCP Mail for .NET
BeginSet(ImapMessage,ImapMessage,ImapFlagModifier,ImapFlags,Object) Method
See Also  Send comments on this topic.
Dart.PowerTCP.Mail Namespace > Mailbox Class > BeginSet Method : BeginSet(ImapMessage,ImapMessage,ImapFlagModifier,ImapFlags,Object) Method




first
An ImapMessage object representing the first message in the range to set.
last
An ImapMessage object representing the last message in the range to set.
operation
An ImapFlagModifier value specifying the operation to perform on the flags.
flags
An ImapFlags value specifying the flags to modify.
state
User state information.
Begins to asynchronously set flag values on a range of messages.

Syntax

Visual Basic (Declaration) 
Public Overloads Function BeginSet( _
   ByVal first As ImapMessage, _
   ByVal last As ImapMessage, _
   ByVal operation As ImapFlagModifier, _
   ByVal flags As ImapFlags, _
   ByVal state As Object _
) As IAsyncResult
Visual Basic (Usage)Copy Code
Dim instance As Mailbox
Dim first As ImapMessage
Dim last As ImapMessage
Dim operation As ImapFlagModifier
Dim flags As ImapFlags
Dim state As Object
Dim value As IAsyncResult
 
value = instance.BeginSet(first, last, operation, flags, state)
C# 
public IAsyncResult BeginSet( 
   ImapMessage first,
   ImapMessage last,
   ImapFlagModifier operation,
   ImapFlags flags,
   object state
)
Managed Extensions for C++ 
public: IAsyncResult* BeginSet( 
   ImapMessage* first,
   ImapMessage* last,
   ImapFlagModifier operation,
   ImapFlags flags,
   Object* state
) 
C++/CLI 
public:
IAsyncResult^ BeginSet( 
   ImapMessage^ first,
   ImapMessage^ last,
   ImapFlagModifier operation,
   ImapFlags flags,
   Object^ state
) 

Parameters

first
An ImapMessage object representing the first message in the range to set.
last
An ImapMessage object representing the last message in the range to set.
operation
An ImapFlagModifier value specifying the operation to perform on the flags.
flags
An ImapFlags value specifying the flags to modify.
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.
System.ArgumentOutOfRangeExceptionindex was out of range
System.IndexOutOfRangeExceptionindex was outside bounds of array
Dart.PowerTCP.Mail.InvalidParameterTypeExceptionCollection contains instances of wrong type of object

Remarks

The Mailbox.BeginSet method begins to asynchronously sets the values of one or more flags on the messages represented by the ImapMessage objects contained within the range specified by first and last. Upon completion of the operation the Imap.EndSet event is raised. This command results in an IMAP STORE command being issued to the server for each message. The command uses the UIDs of the messages in the collection to perform the set operation. The ImapMessage objects contained within messages must be within this mailbox.

This method is useful for bulk operations. If you would like to set a flag on a single message, use the properties of the ImapMessage object representing that message.

Requirements

Target Platforms: Microsoft .NET Framework 2.0

See Also

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