From e64771f70747bf324f31ac25e31c8c6b1ab0dbc1 Mon Sep 17 00:00:00 2001 From: Kevin Zhang Date: Tue, 6 Jul 2021 11:06:00 +0800 Subject: [PATCH] Move IAsyncReloadable.cs, IReloadable.cs, ISavable.cs to IFeatures --- Flow.Launcher.Plugin/{ => Interfaces}/Feature.cs | 2 ++ Flow.Launcher.Plugin/Interfaces/IAsyncReloadable.cs | 2 +- Flow.Launcher.Plugin/Interfaces/IReloadable.cs | 2 +- Flow.Launcher.Plugin/Interfaces/ISavable.cs | 4 ++-- 4 files changed, 6 insertions(+), 4 deletions(-) rename Flow.Launcher.Plugin/{ => Interfaces}/Feature.cs (91%) diff --git a/Flow.Launcher.Plugin/Feature.cs b/Flow.Launcher.Plugin/Interfaces/Feature.cs similarity index 91% rename from Flow.Launcher.Plugin/Feature.cs rename to Flow.Launcher.Plugin/Interfaces/Feature.cs index 81839d816..d3b07f38b 100644 --- a/Flow.Launcher.Plugin/Feature.cs +++ b/Flow.Launcher.Plugin/Interfaces/Feature.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Collections.Specialized; +using System.Threading; namespace Flow.Launcher.Plugin { @@ -32,5 +33,6 @@ namespace Flow.Launcher.Plugin { public List Results; public Query Query; + public CancellationToken Token { get; init; } } } diff --git a/Flow.Launcher.Plugin/Interfaces/IAsyncReloadable.cs b/Flow.Launcher.Plugin/Interfaces/IAsyncReloadable.cs index fc4ac4715..043de9ac0 100644 --- a/Flow.Launcher.Plugin/Interfaces/IAsyncReloadable.cs +++ b/Flow.Launcher.Plugin/Interfaces/IAsyncReloadable.cs @@ -13,7 +13,7 @@ namespace Flow.Launcher.Plugin /// The command that allows user to manual reload is exposed via Plugin.Sys, and /// it will call the plugins that have implemented this interface. /// - public interface IAsyncReloadable + public interface IAsyncReloadable : IFeatures { Task ReloadDataAsync(); } diff --git a/Flow.Launcher.Plugin/Interfaces/IReloadable.cs b/Flow.Launcher.Plugin/Interfaces/IReloadable.cs index 31611519c..ef421f5b2 100644 --- a/Flow.Launcher.Plugin/Interfaces/IReloadable.cs +++ b/Flow.Launcher.Plugin/Interfaces/IReloadable.cs @@ -15,7 +15,7 @@ /// If requiring reloading data asynchronously, please use the IAsyncReloadable interface /// /// - public interface IReloadable + public interface IReloadable : IFeatures { void ReloadData(); } diff --git a/Flow.Launcher.Plugin/Interfaces/ISavable.cs b/Flow.Launcher.Plugin/Interfaces/ISavable.cs index 6f408dc2e..2d13eaa6e 100644 --- a/Flow.Launcher.Plugin/Interfaces/ISavable.cs +++ b/Flow.Launcher.Plugin/Interfaces/ISavable.cs @@ -5,8 +5,8 @@ /// Otherwise if LoadSettingJsonStorage or SaveSettingJsonStorage has been callded, /// plugin settings will be automatically saved (see Flow.Launcher/PublicAPIInstance.SavePluginSettings) by Flow /// - public interface ISavable + public interface ISavable : IFeatures { void Save(); } -} +} \ No newline at end of file