mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Add assembly name & plugin settings path & plugin cache path in meta data for csharp plugins
This commit is contained in:
parent
89bca3b6a9
commit
5919418980
2 changed files with 18 additions and 2 deletions
|
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Threading.Tasks;
|
||||
|
|
@ -73,6 +74,11 @@ namespace Flow.Launcher.Core.Plugin
|
|||
typeof(IAsyncPlugin));
|
||||
|
||||
plugin = Activator.CreateInstance(type) as IAsyncPlugin;
|
||||
|
||||
var assemblyName = assembly.GetName().Name;
|
||||
metadata.AssemblyName = assemblyName;
|
||||
metadata.PluginSettingsDirectoryPath = Path.Combine(DataLocation.PluginSettingsDirectory, assemblyName);
|
||||
metadata.PluginCacheDirectoryPath = Path.Combine(DataLocation.PluginCacheDirectory, assemblyName);
|
||||
}
|
||||
#if DEBUG
|
||||
catch (Exception e)
|
||||
|
|
|
|||
|
|
@ -16,12 +16,14 @@ namespace Flow.Launcher.Plugin
|
|||
public string Website { get; set; }
|
||||
public bool Disabled { get; set; }
|
||||
public string ExecuteFilePath { get; private set;}
|
||||
|
||||
public string ExecuteFileName { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
public string AssemblyName { get; internal set; }
|
||||
|
||||
public string PluginDirectory
|
||||
{
|
||||
get { return _pluginDirectory; }
|
||||
get => _pluginDirectory;
|
||||
internal set
|
||||
{
|
||||
_pluginDirectory = value;
|
||||
|
|
@ -49,9 +51,17 @@ namespace Flow.Launcher.Plugin
|
|||
/// </summary>
|
||||
[JsonIgnore]
|
||||
public long InitTime { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
public long AvgQueryTime { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
public int QueryCount { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
public string PluginSettingsDirectoryPath { get; internal set; }
|
||||
|
||||
[JsonIgnore]
|
||||
public string PluginCacheDirectoryPath { get; internal set; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue