/// <summary>sends LIST command</summary>
        /// <remarks>
        /// valid in authenticated state
        /// This method sends LIST command with an empty mailbox name.
        /// </remarks>
        public ImapCommandResult ListRoot(string referenceName, out ImapMailboxList root)
        {
            RejectNonAuthenticatedState();

              if (referenceName == null)
            throw new ArgumentNullException("referenceName");

              root = null;

              using (var t = new ListTransaction(connection)) {
            t.RequestArguments["reference name"] = new ImapQuotedString(referenceName);
            t.RequestArguments["mailbox name"] = new ImapQuotedString(string.Empty);

            if (ProcessTransaction(t).Succeeded) {
              hierarchyDelimiters[referenceName] = t.Result.Value[0].HierarchyDelimiter;

              root = t.Result.Value[0];
            }

            return t.Result;
              }
        }
        private ImapCommandResult ListInternal(string referenceName,
                                           ImapString mailboxName,
                                           out ImapMailbox[] mailboxes)
        {
            if (referenceName == null)
            throw new ArgumentNullException("referenceName");

              using (var t = new ListTransaction(connection)) {
            return ListLsubInternal(t, referenceName, mailboxName, out mailboxes);
              }
        }