File tree Expand file tree Collapse file tree 2 files changed +18
-2
lines changed
Flow.Launcher.Core/Plugin Expand file tree Collapse file tree 2 files changed +18
-2
lines changed Original file line number Diff line number Diff line change 1
1
using System ;
2
2
using System . Collections . Generic ;
3
+ using System . IO ;
3
4
using System . Linq ;
4
5
using System . Reflection ;
5
6
using System . Threading . Tasks ;
@@ -73,6 +74,11 @@ public static IEnumerable<PluginPair> DotNetPlugins(List<PluginMetadata> source)
73
74
typeof ( IAsyncPlugin ) ) ;
74
75
75
76
plugin = Activator . CreateInstance ( type ) as IAsyncPlugin ;
77
+
78
+ var assemblyName = assembly . GetName ( ) . Name ;
79
+ metadata . AssemblyName = assemblyName ;
80
+ metadata . PluginSettingsDirectoryPath = Path . Combine ( DataLocation . PluginSettingsDirectory , assemblyName ) ;
81
+ metadata . PluginCacheDirectoryPath = Path . Combine ( DataLocation . PluginCacheDirectory , assemblyName ) ;
76
82
}
77
83
#if DEBUG
78
84
catch ( Exception e )
Original file line number Diff line number Diff line change @@ -16,12 +16,14 @@ public class PluginMetadata : BaseModel
16
16
public string Website { get ; set ; }
17
17
public bool Disabled { get ; set ; }
18
18
public string ExecuteFilePath { get ; private set ; }
19
-
20
19
public string ExecuteFileName { get ; set ; }
21
20
21
+ [ JsonIgnore ]
22
+ public string AssemblyName { get ; internal set ; }
23
+
22
24
public string PluginDirectory
23
25
{
24
- get { return _pluginDirectory ; }
26
+ get => _pluginDirectory ;
25
27
internal set
26
28
{
27
29
_pluginDirectory = value ;
@@ -49,9 +51,17 @@ public override string ToString()
49
51
/// </summary>
50
52
[ JsonIgnore ]
51
53
public long InitTime { get ; set ; }
54
+
52
55
[ JsonIgnore ]
53
56
public long AvgQueryTime { get ; set ; }
57
+
54
58
[ JsonIgnore ]
55
59
public int QueryCount { get ; set ; }
60
+
61
+ [ JsonIgnore ]
62
+ public string PluginSettingsDirectoryPath { get ; internal set ; }
63
+
64
+ [ JsonIgnore ]
65
+ public string PluginCacheDirectoryPath { get ; internal set ; }
56
66
}
57
67
}
You can’t perform that action at this time.
0 commit comments