Flow.Launcher/Plugins/Flow.Launcher.Plugin.Explorer/Search/Everything/EverythingSearchManager.cs
Hongtao Zhang 6fdff2971c
Merge Explorer & Everything Plugins (Step 1)
1. Shared Interface for Windows Index and Everything Index
2. Settings Merge (Part 1)
3. Include Everything dll
2022-06-25 12:38:50 -05:00

27 lines
No EOL
893 B
C#

using Flow.Launcher.Plugin.Explorer.Search.WindowsIndex;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
namespace Flow.Launcher.Plugin.Explorer.Search.Everything
{
public class EverythingSearchManager : IIndexProvider
{
private Settings Settings { get; }
public EverythingSearchManager(Settings settings)
{
Settings = settings;
}
public ValueTask<IEnumerable<SearchResult>> SearchAsync(Query query, CancellationToken token)
{
return ValueTask.FromResult(EverythingApi.SearchAsync(query.Search, token, Settings.SortOption));
}
public ValueTask<IEnumerable<SearchResult>> ContentSearchAsync(Query query, CancellationToken token)
{
return new ValueTask<IEnumerable<SearchResult>>(new List<SearchResult>());
}
}
}