예제 #1
0
 private IEnumerable <MessageRec> CreateMessageRecsForAdditions(List <AddCommand> additions)
 {
     foreach (AddCommand addition in additions)
     {
         yield return(new MessageRec(EasMailbox.GetEntryId(addition.ServerId), base.EntryId, EasFolder.GetCreationTimestamp(addition.ApplicationData.DateReceived), (int)((addition.ApplicationData.Body == null) ? 0U : addition.ApplicationData.Body.EstimatedDataSize), MsgRecFlags.None, this.GetAdditionalProps(addition)));
     }
     yield break;
 }
예제 #2
0
        private List <MessageRec> CreateMessageRecsForFetches(IReadOnlyCollection <Fetch> fetches)
        {
            List <MessageRec> list = new List <MessageRec>(fetches.Count);

            foreach (Fetch fetch in fetches)
            {
                if (fetch.Status == 1)
                {
                    list.Add(new MessageRec(EasMailbox.GetEntryId(fetch.ServerId), base.EntryId, EasFolder.GetCreationTimestamp(fetch.Properties.DateReceived), (int)fetch.Properties.Body.EstimatedDataSize, MsgRecFlags.None, this.GetAdditionalProps(fetch)));
                }
            }
            return(list);
        }