Exemple #1
0
        private Task <List <cMailbox> > ZSubscribedAsync(cNamespaceName pNamespaceName, bool pDescend, fMailboxCacheDataSets pDataSets, cTrace.cContext pParentContext)
        {
            var lContext = pParentContext.NewMethod(nameof(cIMAPClient), nameof(ZSubscribedAsync), pNamespaceName, pDescend, pDataSets);

            if (pNamespaceName == null)
            {
                throw new ArgumentNullException(nameof(pNamespaceName));
            }

            string lWildcard;

            if (pDescend)
            {
                lWildcard = "*";
            }
            else
            {
                lWildcard = "%";
            }

            string lListMailbox          = pNamespaceName.Prefix.Replace('*', '%') + lWildcard;
            cMailboxPathPattern lPattern = new cMailboxPathPattern(pNamespaceName.Prefix, lWildcard, pNamespaceName.Delimiter);

            return(ZZSubscribedAsync(lListMailbox, pNamespaceName.Delimiter, lPattern, !pDescend, pDataSets, lContext));
        }
Exemple #2
0
        internal List <cMailbox> Mailboxes(cNamespaceName pNamespaceName, fMailboxCacheDataSets pDataSets)
        {
            var lContext = mRootContext.NewMethod(nameof(cIMAPClient), nameof(Mailboxes));
            var lTask    = ZMailboxesAsync(pNamespaceName, pDataSets, lContext);

            mSynchroniser.Wait(lTask, lContext);
            return(lTask.Result);
        }
Exemple #3
0
        internal List <cMailbox> Subscribed(cNamespaceName pNamespaceName, bool pDescend, fMailboxCacheDataSets pDataSets)
        {
            var lContext = mRootContext.NewMethod(nameof(cIMAPClient), nameof(Subscribed));
            var lTask    = ZSubscribedAsync(pNamespaceName, pDescend, pDataSets, lContext);

            mSynchroniser.Wait(lTask, lContext);
            return(lTask.Result);
        }
Exemple #4
0
        private Task <List <cMailbox> > ZMailboxesAsync(cNamespaceName pNamespaceName, fMailboxCacheDataSets pDataSets, cTrace.cContext pParentContext)
        {
            var lContext = pParentContext.NewMethod(nameof(cIMAPClient), nameof(ZMailboxesAsync), pNamespaceName, pDataSets);

            if (pNamespaceName == null)
            {
                throw new ArgumentNullException(nameof(pNamespaceName));
            }

            string lListMailbox          = pNamespaceName.Prefix.Replace('*', '%') + "%";
            cMailboxPathPattern lPattern = new cMailboxPathPattern(pNamespaceName.Prefix, "%", pNamespaceName.Delimiter);

            return(ZZMailboxesAsync(lListMailbox, pNamespaceName.Delimiter, lPattern, pDataSets, lContext));
        }
Exemple #5
0
        internal Task <List <cMailbox> > MailboxesAsync(cNamespaceName pNamespaceName, fMailboxCacheDataSets pDataSets)
        {
            var lContext = mRootContext.NewMethod(nameof(cIMAPClient), nameof(MailboxesAsync));

            return(ZMailboxesAsync(pNamespaceName, pDataSets, lContext));
        }
Exemple #6
0
 internal cNamespace(cIMAPClient pClient, cNamespaceName pNamespaceName)
 {
     Client        = pClient ?? throw new ArgumentNullException(nameof(pClient));
     NamespaceName = pNamespaceName ?? throw new ArgumentNullException(nameof(pNamespaceName));
 }
Exemple #7
0
        internal Task <List <cMailbox> > SubscribedAsync(cNamespaceName pNamespaceName, bool pDescend, fMailboxCacheDataSets pDataSets)
        {
            var lContext = mRootContext.NewMethod(nameof(cIMAPClient), nameof(SubscribedAsync));

            return(ZSubscribedAsync(pNamespaceName, pDescend, pDataSets, lContext));
        }