/// <summary>
 /// 
 /// </summary>
 /// <param name="folder"></param>
 public void DeleteFolder(IPrivateMessageFolder folder)
 {
     // folder index = folder id + 1
     int index = folder.FolderID + 1;
     // set folder field to empty
     this.FolderTable[index] = string.Empty;
 }
 private static bool DeleteFolder(IPrivateMessageFolder folder)
 {
     bool value = false;
     if (folder.FolderID != UNKNOWN_FOLDER_ID)
     {
         var signal = new AutoResetEvent(false);
         IPrivateMessageFolderRequest request = null;
         Service.BeginEditFolderRequest((a, result) => { request = result; signal.Set(); });
         signal.WaitOne();
         if (request != null)
         {
             request.DeleteFolder(folder);
             Service.SendEditFolderRequest(request, result => { value = result == ActionResult.Success; signal.Set(); });
             signal.WaitOne();
         }
     }
     return value;
 }
 /// <summary>
 /// 
 /// </summary>
 /// <param name="folder"></param>
 /// <param name="newFolderName"></param>
 public void RenameFolder(IPrivateMessageFolder folder, string newFolderName)
 {
     // folder index = folder id + 1
     int index = folder.FolderID + 1;
     // rename field
     this.FolderTable[index] = newFolderName;
 }