4
4
5
5
namespace Flow . Launcher . Plugin
6
6
{
7
+ /// <summary>
8
+ /// Plugin metadata
9
+ /// </summary>
7
10
public class PluginMetadata : BaseModel
8
11
{
9
12
private string _pluginDirectory ;
13
+
14
+ /// <summary>
15
+ /// Plugin ID.
16
+ /// </summary>
10
17
public string ID { get ; set ; }
18
+
19
+ /// <summary>
20
+ /// Plugin name.
21
+ /// </summary>
11
22
public string Name { get ; set ; }
23
+
24
+ /// <summary>
25
+ /// Plugin author.
26
+ /// </summary>
12
27
public string Author { get ; set ; }
28
+
29
+ /// <summary>
30
+ /// Plugin version.
31
+ /// </summary>
13
32
public string Version { get ; set ; }
33
+
34
+ /// <summary>
35
+ /// Plugin language.
36
+ /// See <see cref="AllowedLanguage"/>
37
+ /// </summary>
14
38
public string Language { get ; set ; }
39
+
40
+ /// <summary>
41
+ /// Plugin description.
42
+ /// </summary>
15
43
public string Description { get ; set ; }
44
+
45
+ /// <summary>
46
+ /// Plugin website.
47
+ /// </summary>
16
48
public string Website { get ; set ; }
49
+
50
+ /// <summary>
51
+ /// Whether plugin is disabled.
52
+ /// </summary>
17
53
public bool Disabled { get ; set ; }
18
- public string ExecuteFilePath { get ; private set ; }
54
+
55
+ /// <summary>
56
+ /// Plugin execute file path.
57
+ /// </summary>
58
+ public string ExecuteFilePath { get ; private set ; }
59
+
60
+ /// <summary>
61
+ /// Plugin execute file name.
62
+ /// </summary>
19
63
public string ExecuteFileName { get ; set ; }
20
64
65
+ /// <summary>
66
+ /// Plugin assembly name.
67
+ /// Only available for .Net plugins.
68
+ /// </summary>
21
69
[ JsonIgnore ]
22
70
public string AssemblyName { get ; internal set ; }
23
71
72
+ /// <summary>
73
+ /// Plugin source directory.
74
+ /// </summary>
24
75
public string PluginDirectory
25
76
{
26
77
get => _pluginDirectory ;
@@ -32,36 +83,69 @@ internal set
32
83
}
33
84
}
34
85
86
+ /// <summary>
87
+ /// The first action keyword of plugin.
88
+ /// </summary>
35
89
public string ActionKeyword { get ; set ; }
36
90
91
+ /// <summary>
92
+ /// All action keywords of plugin.
93
+ /// </summary>
37
94
public List < string > ActionKeywords { get ; set ; }
38
95
96
+ /// <summary>
97
+ /// Plugin icon path.
98
+ /// </summary>
39
99
public string IcoPath { get ; set ; }
40
-
41
- public override string ToString ( )
42
- {
43
- return Name ;
44
- }
45
100
101
+ /// <summary>
102
+ /// Plugin priority.
103
+ /// </summary>
46
104
[ JsonIgnore ]
47
105
public int Priority { get ; set ; }
48
106
49
107
/// <summary>
50
- /// Init time include both plugin load time and init time
108
+ /// Init time include both plugin load time and init time.
51
109
/// </summary>
52
110
[ JsonIgnore ]
53
111
public long InitTime { get ; set ; }
54
112
113
+ /// <summary>
114
+ /// Average query time.
115
+ /// </summary>
55
116
[ JsonIgnore ]
56
117
public long AvgQueryTime { get ; set ; }
57
118
119
+ /// <summary>
120
+ /// Query count.
121
+ /// </summary>
58
122
[ JsonIgnore ]
59
123
public int QueryCount { get ; set ; }
60
124
125
+ /// <summary>
126
+ /// The path to the plugin settings directory.
127
+ /// It is used to store plugin settings files and data files.
128
+ /// When plugin is deleted, FL will ask users whether to keep its settings.
129
+ /// If users do not want to keep, this directory will be deleted.
130
+ /// </summary>
61
131
[ JsonIgnore ]
62
132
public string PluginSettingsDirectoryPath { get ; internal set ; }
63
133
134
+ /// <summary>
135
+ /// The path to the plugin cache directory.
136
+ /// It is used to store cache files.
137
+ /// When plugin is deleted, this directory will be deleted as well.
138
+ /// </summary>
64
139
[ JsonIgnore ]
65
140
public string PluginCacheDirectoryPath { get ; internal set ; }
141
+
142
+ /// <summary>
143
+ /// Convert <see cref="PluginMetadata"/> to string.
144
+ /// </summary>
145
+ /// <returns></returns>
146
+ public override string ToString ( )
147
+ {
148
+ return Name ;
149
+ }
66
150
}
67
151
}
0 commit comments