public void SetLSubFlags(cLSubFlags pLSubFlags, cTrace.cContext pParentContext) { var lContext = pParentContext.NewMethod(nameof(cMailboxCacheItem), nameof(SetLSubFlags), pLSubFlags); if (pLSubFlags == null) { throw new ArgumentNullException(nameof(pLSubFlags)); } fMailboxProperties lDifferences = cLSubFlags.Differences(mLSubFlags, pLSubFlags); mLSubFlags = pLSubFlags; mSynchroniser.InvokeMailboxPropertiesChanged(this, lDifferences, lContext); }
public void ResetLSubFlags(cMailboxPathPattern pPattern, int pSequence, cTrace.cContext pParentContext) { // called after an LSub with subscribed = true // called after a list-extended/subscribed with subscribed = true var lContext = pParentContext.NewMethod(nameof(cMailboxCache), nameof(ResetLSubFlags), pPattern, pSequence); cLSubFlags lNotSubscribed = new cLSubFlags(mSequence++, false); foreach (var lItem in mDictionary.Values) { if (lItem.MailboxName != null && pPattern.Matches(lItem.MailboxName.Path)) { if (lItem.LSubFlags == null || lItem.LSubFlags.Sequence < pSequence) { lItem.SetLSubFlags(lNotSubscribed, lContext); } } } }