Exemplo n.º 1
0
        private static (string id, MailboxFlags) CalculateFlagsFromFileName(string fileName)
        {
            fileName = Path.GetFileName(fileName);
            // ReSharper disable once AssignNullToNotNullAttribute
            Match match = s_maildirPattern.Match(fileName);

            if (!match.Success)
            {
                return(fileName, MailboxFlags.None);
            }

            return(match.Groups[1].Value, ImapHelper.GetFlagsFromMailDir(match.Groups[2].Value));
        }