using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; namespace Flow.Launcher.Plugin { /// /// Synchronous Query Model for Flow Launcher When Query Text is Empty /// /// If the Querying method requires high IO transmission /// or performing CPU intense jobs (performing better with cancellation), please try the IAsyncHomeQuery interface /// /// public interface IHomeQuery : IAsyncHomeQuery { /// /// Querying When Query Text is Empty /// /// This method will be called within a Task.Run, /// so please avoid synchronously wait for long. /// /// /// List HomeQuery(); Task> IAsyncHomeQuery.HomeQueryAsync(CancellationToken token) => Task.Run(HomeQuery); } }