Ejemplo n.º 1
0
 public SearchRequest(IFolder folder, SearchCriteria criteria, RequestCompletedCallback callback)
     : base(callback)
 {
     PreCommand    = new SelectFolderCommand(folder, null);
     Command       = new SearchCommand(criteria, null);
     ProcessorType = typeof(SearchProcessor);
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Create new changeflag request
 /// </summary>
 /// <param name="msg"></param>
 /// <param name="flag"></param>
 /// <param name="value"></param>
 /// <param name="callback"></param>
 public ChangeFlagRequest(IMessage msg, string flag, bool value, RequestCompletedCallback callback)
     : base(callback)
 {
     PreCommand    = new SelectFolderCommand(msg.Folder, null);
     Command       = new ChangeFlagCommand(msg, flag, value, null);
     ProcessorType = typeof(ChangeFlagProcessor);
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MoveMessageRequest"/> class.
 /// </summary>
 /// <param name="message">The messagy to copy.</param>
 /// <param name="destFolder">The destination folder.</param>
 /// <param name="callback">The callback to call when copy operation is completed.</param>
 public CopyMessageRequest(IMessage message, IFolder destFolder, RequestCompletedCallback callback)
     : base(callback)
 {
     PreCommand    = new SelectFolderCommand(message.Folder, null);
     Command       = new CopyMessageCommand(message, destFolder, null);
     ProcessorType = typeof(CopyMessageProcessor);
 }
Ejemplo n.º 4
0
 public DeleteMessageRequest(IMessage msg, RequestCompletedCallback callback)
     : base(callback)
 {
     PreCommand    = new SelectFolderCommand(msg.Folder, null);
     Command       = new ChangeFlagCommand(msg, MessageFlag.Deleted, true, null);
     PostCommand   = new ExpungeCommand(null);
     ProcessorType = typeof(DeleteMessageProcessor);
 }