using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
namespace Flow.Launcher.Plugin
{
///
/// Synchronous Dialog Jump Model
///
/// If the Querying method requires high IO transmission
/// or performing CPU intense jobs (performing better with cancellation), please try the IAsyncDialogJump interface
///
///
public interface IDialogJump : IAsyncDialogJump
{
///
/// Querying for Dialog Jump window
///
/// This method will be called within a Task.Run,
/// so please avoid synchrously wait for long.
///
///
/// Query to search
///
List QueryDialogJump(Query query);
Task> IAsyncDialogJump.QueryDialogJumpAsync(Query query, CancellationToken token) => Task.Run(() => QueryDialogJump(query), token);
}
}