2025-03-29 14:03:30 +00:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using System.Threading;
|
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Flow.Launcher.Plugin
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Synchronous Query Model for Flow Launcher When Query Text is Empty
|
|
|
|
|
|
/// <para>
|
|
|
|
|
|
/// If the Querying method requires high IO transmission
|
2025-05-04 03:40:45 +00:00
|
|
|
|
/// or performing CPU intense jobs (performing better with cancellation), please try the IAsyncHomeQuery interface
|
2025-03-29 14:03:30 +00:00
|
|
|
|
/// </para>
|
|
|
|
|
|
/// </summary>
|
2025-05-03 00:58:40 +00:00
|
|
|
|
public interface IHomeQuery : IAsyncHomeQuery
|
2025-03-29 14:03:30 +00:00
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Querying When Query Text is Empty
|
|
|
|
|
|
/// <para>
|
|
|
|
|
|
/// This method will be called within a Task.Run,
|
2025-05-04 03:40:57 +00:00
|
|
|
|
/// so please avoid synchronously wait for long.
|
2025-03-29 14:03:30 +00:00
|
|
|
|
/// </para>
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <returns></returns>
|
2025-05-03 00:58:40 +00:00
|
|
|
|
List<Result> HomeQuery();
|
2025-03-29 14:03:30 +00:00
|
|
|
|
|
2025-05-03 00:58:40 +00:00
|
|
|
|
Task<List<Result>> IAsyncHomeQuery.HomeQueryAsync(CancellationToken token) => Task.Run(HomeQuery);
|
2025-03-29 14:03:30 +00:00
|
|
|
|
}
|
|
|
|
|
|
}
|