Ejemplo n.º 1
0
        private PropValueData[] GetAdditionalProps(AddCommand add)
        {
            List <PropValueData> list = new List <PropValueData>();

            list.Add(new PropValueData(PropTag.LastModificationTime, CommonUtils.DefaultLastModificationTime));
            list.Add(new PropValueData(PropTag.ObjectType, 0));
            if (EasFolder.IsContactFolder(base.EasFolderType))
            {
                List <PropValueData> contactProperties = EasFxContactMessage.GetContactProperties(add.ApplicationData);
                if (contactProperties.Count > 0)
                {
                    list.AddRange(contactProperties);
                }
            }
            return(SyncEmailUtils.GetMessageProps(new SyncEmailContext
            {
                IsRead = new bool?(add.IsRead()),
                IsDraft = new bool?(base.EasFolderType == EasFolderType.Drafts),
                SyncMessageId = add.ServerId
            }, this.UserSmtpAddressString, base.EntryId, list.ToArray()));
        }
Ejemplo n.º 2
0
        private PropValueData[] GetAdditionalProps(ChangeCommand change)
        {
            bool?isRead = change.IsRead();
            EasMessageCategory   easMessageCategory = (isRead == null) ? EasMessageCategory.AddOrUpdate : (isRead.Value ? EasMessageCategory.ChangeToRead : EasMessageCategory.ChangeToUnread);
            List <PropValueData> list = new List <PropValueData>();

            list.Add(new PropValueData(PropTag.LastModificationTime, DateTime.UtcNow));
            list.Add(new PropValueData(PropTag.ObjectType, (int)easMessageCategory));
            if (EasFolder.IsContactFolder(base.EasFolderType))
            {
                List <PropValueData> contactProperties = EasFxContactMessage.GetContactProperties(change.ApplicationData);
                if (contactProperties.Count > 0)
                {
                    list.AddRange(contactProperties);
                }
            }
            return(SyncEmailUtils.GetMessageProps(new SyncEmailContext
            {
                IsRead = isRead,
                IsDraft = new bool?(base.EasFolderType == EasFolderType.Drafts),
                SyncMessageId = change.ServerId
            }, this.UserSmtpAddressString, base.EntryId, list.ToArray()));
        }