Crystalbyte.Equinox.Imap.ImapClient.Search C# (CSharp) Méthode

Search() public méthode

The SEARCH command searches the mailbox for messages that match the given searching criteria. Searching criteria consist of one or more search keys.
public Search ( string query, bool isUidSearch = false ) : SearchImapResponse
query string The query command that will be sent to the server.
isUidSearch bool Sets whether the search shall return uids instead of sequence numbers.
Résultat SearchImapResponse
        public SearchImapResponse Search(string query, bool isUidSearch = false)
        {
            var uid = isUidSearch ? "UID " : string.Empty;
            var text = string.Format("{0}SEARCH {1}", uid, query);
            var command = new ImapCommand(text);
            var reader = SendAndReceive(command);
            var response = new SearchImapResponse();
            response.Parse(reader);
            return response;
        }