Example #1
0
                public void UpdateStatus(cStatus pStatus, cTrace.cContext pParentContext)
                {
                    var lContext = pParentContext.NewMethod(nameof(cMailboxCacheItem), nameof(UpdateStatus), pStatus);

                    if (pStatus == null)
                    {
                        throw new ArgumentNullException(nameof(pStatus));
                    }
                    mStatus = cStatus.Combine(mStatus, pStatus);
                }
Example #2
0
        public static cStatus Combine(cStatus pOld, cStatus pNew)
        {
            if (pNew == null)
            {
                throw new ArgumentNullException(nameof(pNew));
            }
            if (pOld == null)
            {
                return(pNew);
            }

            return
                (new cStatus
                 (
                     pNew.Sequence,
                     pNew.Messages ?? pOld.Messages,
                     pNew.Recent ?? pOld.Recent,
                     pNew.UIDNext ?? pOld.UIDNext,
                     pNew.UIDValidity ?? pOld.UIDValidity,
                     pNew.Unseen ?? pOld.Unseen,
                     pNew.HighestModSeq ?? pOld.HighestModSeq
                 ));
        }
Example #3
0
                public void ResetExists(cTrace.cContext pParentContext)
                {
                    var lContext = pParentContext.NewMethod(nameof(cMailboxCacheItem), nameof(ResetExists));

                    fMailboxProperties lProperties;

                    if (mExists == true)
                    {
                        lProperties = fMailboxProperties.exists;
                    }
                    else
                    {
                        lProperties = 0;
                    }

                    mExists             = false;
                    mListFlags          = null;
                    mStatus             = null;
                    mMailboxStatus      = null;
                    mSelectedProperties = cMailboxSelectedProperties.NeverBeenSelected;

                    mSynchroniser.InvokeMailboxPropertiesChanged(this, lProperties, lContext);
                }
Example #4
0
                public void ClearStatus(cTrace.cContext pParentContext)
                {
                    var lContext = pParentContext.NewMethod(nameof(cMailboxCacheItem), nameof(ClearStatus));

                    mStatus = null;
                }