Skip to content

Commit 3aa0808

Browse files
committed
Revert "Removed IMailFolderClient.SearchAsync(), use IMailReader.Query() instead."
This reverts commit 97e9422.
1 parent 2baead5 commit 3aa0808

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

source/MailKitSimplified.Receiver/Abstractions/IMailFolderClient.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
using MailKit;
2+
using MailKit.Search;
23
using System;
4+
using System.Collections.Generic;
35
using System.Threading;
46
using System.Threading.Tasks;
57

@@ -15,6 +17,14 @@ public interface IMailFolderClient : IAsyncDisposable, IDisposable
1517
/// <returns>Connected <see cref="IMailFolder"/>.</returns>
1618
ValueTask<IMailFolder> ConnectAsync(bool enableWrite = false, CancellationToken cancellationToken = default);
1719

20+
/// <summary>
21+
/// Query the server for the unique IDs of messages with properties that match the search filters.
22+
/// </summary>
23+
/// <param name="searchQuery">Mail folder search query.</param>
24+
/// <param name="cancellationToken">Cancellation token.</param>
25+
/// <returns>The first 250 <see cref="UniqueId"/>s.</returns>
26+
Task<IList<UniqueId>> SearchAsync(SearchQuery searchQuery, CancellationToken cancellationToken = default);
27+
1828
/// <summary>
1929
/// Mail folder summary.
2030
/// </summary>

0 commit comments

Comments
 (0)