public void MessageUniqueIdThrowsError() { var client = new TargetProcessClient { ApiSiteInfo = new ApiSiteInfo(TargetProcessRoutes.Route.MessageUniqueIds) }; var messageUniqueId = new MessageUniqueId { }; }
public void CreateMessageUniqueIdThrowsError() { var client = CommonMethods.GetClientByRoute(TargetProcessRoutes.Route.MessageUniqueIds); var messageUniqueId = new MessageUniqueId(); }
public Task <IApiResponse <MessageUniqueId> > CreateMessageUniqueIdAsync(MessageUniqueId messageUniqueId) => CreateDataAsync <MessageUniqueId>(messageUniqueId);
/// <summary> /// First phase: the complete list of the UIds is built. /// </summary> /// <returns></returns> public List <MessageUniqueId> RetrieveUIds() { List <Pop3Client.PopServerUniqueId> lstUId = null; List <MessageUniqueId> lstMUId = null; int iMailHeader; // Create the object if (triggerChanges == null) { triggerChanges = new PostOfficeChangesTrigger(this); } // Restart the container (BUT without requesting reloading (recursive comes here again!) if (MailHeaderSyncCheck(true, false) < 0) { // Problems while connecting ... return(null); } // Get the full UIds list from PostOffice do { switch (InProtoGet()) { case IncomingProtocols.POP3: // Ask server lstUId = this.Pop3.RetrieveUIds(); // Convert from one type to (an)other(s) ... do { lstMUId = new List <MessageUniqueId>(); iMailHeader = 0; foreach (Pop3Client.PopServerUniqueId PSUId in lstUId) { // ------------------------------------------------------------ // iMailHeader++; if (iMailHeader != PSUId.Index) { // Unsynchronized lists (local vs. server) iMailHeader = iMailHeader; } MailHeader mh = new MailHeader(); mh.Index = PSUId.Index.ToString(); mh.UniqueId = PSUId.UniqueId; mh.Date = DateTime.MinValue; // This value flags that the rest is not loaded yet. aMailHeader[iMailHeader] = mh; // ------------------------------------------------------------ // MessageUniqueId muid = new MessageUniqueId(); muid.Ordinal = PSUId.Index; muid.UId = PSUId.UniqueId; lstMUId.Add(muid); // ------------------------------------------------------------ // } // The following line means: if it has changed in the meanwhile, please reload it! } while (triggerChanges.StatisticsUpdate()); break; case IncomingProtocols.IMAP: // doesn't yet exist! lstUId = this.imapController.RetrieveUIds( Constants.MAILBOX ); // Convert from one type to another ... //lstMUId = new List<MessageUniqueId>(); //foreach( Pop3Client.PopServerUniqueId Puid in lstUId ) // { // MessageUniqueId muid = new MessageUniqueId(); // muid.Ordinal = Puid.Index; // muid.UId = Puid.UniqueId; // lstMUId.Add( muid ); // } //TASK: Allineamento log - Ciro ManagedException mEx = new ManagedException("Imap not supported at all!", "ERR_MAIL_0112", string.Empty, string.Empty, null); ErrorLogInfo err = new ErrorLogInfo(mEx); _log.Error(mEx); throw mEx; //throw new ManagedException("Imap not supported at all!", String.Empty, String.Empty, String.Empty, null); break; default: return(null); } } while ((this.Pop3.Pop3Client.IsConnected) && (triggerChanges.StatisticsUpdate() == true)); return(lstMUId); } // List<MailUniqueId> RetrieveUIds()
public IApiResponse <MessageUniqueId> CreateMessageUniqueId(MessageUniqueId messageUniqueId) => CreateData <MessageUniqueId>(messageUniqueId);