mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Update Document and remove unused parameter
This commit is contained in:
parent
71ca3bbf38
commit
8a26471c4f
2 changed files with 61 additions and 4 deletions
|
|
@ -89,28 +89,85 @@ namespace Flow.Launcher.Plugin
|
||||||
/// </summary>
|
/// </summary>
|
||||||
event FlowLauncherGlobalKeyboardEventHandler GlobalKeyboardEvent;
|
event FlowLauncherGlobalKeyboardEventHandler GlobalKeyboardEvent;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Fuzzy Search the string with query
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="query">Query String</param>
|
||||||
|
/// <param name="stringToCompare">The string to Search for Query</param>
|
||||||
|
/// <returns>Match results</returns>
|
||||||
MatchResult FuzzySearch(string query, string stringToCompare);
|
MatchResult FuzzySearch(string query, string stringToCompare);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Http Get to the spefic URL
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="url">URL to call Http Get</param>
|
||||||
|
/// <param name="token">Cancellation Token</param>
|
||||||
|
/// <returns>Task to get string result</returns>
|
||||||
Task<string> HttpGetStringAsync(string url, CancellationToken token = default);
|
Task<string> HttpGetStringAsync(string url, CancellationToken token = default);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Http Get to the spefic URL
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="url">URL to call Http Get</param>
|
||||||
|
/// <param name="token">Cancellation Token</param>
|
||||||
|
/// <returns>Task to get stream result</returns>
|
||||||
Task<Stream> HttpGetStreamAsync(string url, CancellationToken token = default);
|
Task<Stream> HttpGetStreamAsync(string url, CancellationToken token = default);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Download the specific url to a cretain file path
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="url">URL to download file</param>
|
||||||
|
/// <param name="token">place to store file</param>
|
||||||
|
/// <returns>Task showing the progress</returns>
|
||||||
Task HttpDownloadAsync([NotNull] string url, [NotNull] string filePath);
|
Task HttpDownloadAsync([NotNull] string url, [NotNull] string filePath);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Add ActionKeyword for specific plugin
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pluginId">ID for plugin that needs to add action keyword</param>
|
||||||
|
/// <param name="newActionKeyword">The actionkeyword that is supposed to be added</param>
|
||||||
void AddActionKeyword(string pluginId, string newActionKeyword);
|
void AddActionKeyword(string pluginId, string newActionKeyword);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Remove ActionKeyword for specific plugin
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pluginId">ID for plugin that needs to remove action keyword</param>
|
||||||
|
/// <param name="newActionKeyword">The actionkeyword that is supposed to be removed</param>
|
||||||
void RemoveActionKeyword(string pluginId, string oldActionKeyword);
|
void RemoveActionKeyword(string pluginId, string oldActionKeyword);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Log Debug message
|
||||||
|
/// Message will only be logged in Debug mode
|
||||||
|
/// </summary>
|
||||||
void LogDebug(string className, string message, [CallerMemberName] string methodName = "");
|
void LogDebug(string className, string message, [CallerMemberName] string methodName = "");
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Log Message
|
||||||
|
/// </summary>
|
||||||
void LogInfo(string className, string message, [CallerMemberName] string methodName = "");
|
void LogInfo(string className, string message, [CallerMemberName] string methodName = "");
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Log Warning
|
||||||
|
/// </summary>
|
||||||
void LogWarn(string className, string message, [CallerMemberName] string methodName = "");
|
void LogWarn(string className, string message, [CallerMemberName] string methodName = "");
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Log an Exception
|
||||||
|
/// </summary>
|
||||||
void LogException(string className, string message, Exception e, [CallerMemberName] string methodName = "");
|
void LogException(string className, string message, Exception e, [CallerMemberName] string methodName = "");
|
||||||
|
|
||||||
T LoadJsonStorage<T>(PluginMetadata metadata) where T : new();
|
/// <summary>
|
||||||
|
/// Load JsonStorage for current plugin
|
||||||
|
/// </summary>
|
||||||
|
/// <typeparam name="T">Type for deserialization</typeparam>
|
||||||
|
/// <returns></returns>
|
||||||
|
T LoadJsonStorage<T>() where T : new();
|
||||||
|
|
||||||
void SaveJsonStorage<T>(PluginMetadata metadata, T setting) where T : new();
|
/// <summary>
|
||||||
|
/// Save JsonStorage for current plugin
|
||||||
|
/// </summary>
|
||||||
|
/// <typeparam name="T">Type for Serialization</typeparam>
|
||||||
|
/// <returns></returns>
|
||||||
|
void SaveJsonStorage<T>(T setting) where T : new();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -131,9 +131,9 @@ namespace Flow.Launcher
|
||||||
|
|
||||||
public void LogException(string className, string message, Exception e, [CallerMemberName] string methodName = "") => Log.Exception(className, message, e, methodName);
|
public void LogException(string className, string message, Exception e, [CallerMemberName] string methodName = "") => Log.Exception(className, message, e, methodName);
|
||||||
|
|
||||||
public T LoadJsonStorage<T>(PluginMetadata metadata) where T : new() => new PluginJsonStorage<T>().Load();
|
public T LoadJsonStorage<T>() where T : new() => new PluginJsonStorage<T>().Load();
|
||||||
|
|
||||||
public void SaveJsonStorage<T>(PluginMetadata metadata, T setting) where T : new() => new PluginJsonStorage<T>(setting).Save();
|
public void SaveJsonStorage<T>(T setting) where T : new() => new PluginJsonStorage<T>(setting).Save();
|
||||||
|
|
||||||
public event FlowLauncherGlobalKeyboardEventHandler GlobalKeyboardEvent;
|
public event FlowLauncherGlobalKeyboardEventHandler GlobalKeyboardEvent;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue