Flow.Launcher/Flow.Launcher.Plugin/Interfaces/IResultUpdated.cs

46 lines
1.2 KiB
C#
Raw Permalink Normal View History

2021-07-07 17:47:20 +00:00
using System;
using System.Collections.Generic;
using System.Threading;
namespace Flow.Launcher.Plugin
{
2025-02-24 07:37:13 +00:00
/// <summary>
/// Interface for plugins that want to manually update their results
/// </summary>
2021-07-07 17:47:20 +00:00
public interface IResultUpdated : IFeatures
{
2025-02-24 07:37:13 +00:00
/// <summary>
/// Event that is triggered when the results are updated
/// </summary>
2021-07-07 17:47:20 +00:00
event ResultUpdatedEventHandler ResultsUpdated;
}
2025-02-24 07:37:13 +00:00
/// <summary>
/// Delegate for the ResultsUpdated event
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
2021-07-07 17:47:20 +00:00
public delegate void ResultUpdatedEventHandler(IResultUpdated sender, ResultUpdatedEventArgs e);
2025-02-24 07:37:13 +00:00
/// <summary>
/// Event arguments for the ResultsUpdated event
/// </summary>
2021-07-07 17:47:20 +00:00
public class ResultUpdatedEventArgs : EventArgs
{
2025-02-24 07:37:13 +00:00
/// <summary>
/// List of results that should be displayed
/// </summary>
2021-07-07 17:47:20 +00:00
public List<Result> Results;
2025-02-24 07:37:13 +00:00
/// <summary>
/// Query that triggered the update
/// </summary>
2021-07-07 17:47:20 +00:00
public Query Query;
2025-02-24 07:37:13 +00:00
/// <summary>
/// Token that can be used to cancel the update
/// </summary>
2021-07-07 17:47:20 +00:00
public CancellationToken Token { get; init; }
}
2025-02-24 07:37:13 +00:00
}