Skip to content

Commit 9cd3011

Browse files
committed
Add documents for plugin metadata
1 parent 1aaba46 commit 9cd3011

File tree

1 file changed

+91
-7
lines changed

1 file changed

+91
-7
lines changed

Flow.Launcher.Plugin/PluginMetadata.cs

Lines changed: 91 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,74 @@
44

55
namespace Flow.Launcher.Plugin
66
{
7+
/// <summary>
8+
/// Plugin metadata
9+
/// </summary>
710
public class PluginMetadata : BaseModel
811
{
912
private string _pluginDirectory;
13+
14+
/// <summary>
15+
/// Plugin ID.
16+
/// </summary>
1017
public string ID { get; set; }
18+
19+
/// <summary>
20+
/// Plugin name.
21+
/// </summary>
1122
public string Name { get; set; }
23+
24+
/// <summary>
25+
/// Plugin author.
26+
/// </summary>
1227
public string Author { get; set; }
28+
29+
/// <summary>
30+
/// Plugin version.
31+
/// </summary>
1332
public string Version { get; set; }
33+
34+
/// <summary>
35+
/// Plugin language.
36+
/// See <see cref="AllowedLanguage"/>
37+
/// </summary>
1438
public string Language { get; set; }
39+
40+
/// <summary>
41+
/// Plugin description.
42+
/// </summary>
1543
public string Description { get; set; }
44+
45+
/// <summary>
46+
/// Plugin website.
47+
/// </summary>
1648
public string Website { get; set; }
49+
50+
/// <summary>
51+
/// Whether plugin is disabled.
52+
/// </summary>
1753
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>
1963
public string ExecuteFileName { get; set; }
2064

65+
/// <summary>
66+
/// Plugin assembly name.
67+
/// Only available for .Net plugins.
68+
/// </summary>
2169
[JsonIgnore]
2270
public string AssemblyName { get; internal set; }
2371

72+
/// <summary>
73+
/// Plugin source directory.
74+
/// </summary>
2475
public string PluginDirectory
2576
{
2677
get => _pluginDirectory;
@@ -32,36 +83,69 @@ internal set
3283
}
3384
}
3485

86+
/// <summary>
87+
/// The first action keyword of plugin.
88+
/// </summary>
3589
public string ActionKeyword { get; set; }
3690

91+
/// <summary>
92+
/// All action keywords of plugin.
93+
/// </summary>
3794
public List<string> ActionKeywords { get; set; }
3895

96+
/// <summary>
97+
/// Plugin icon path.
98+
/// </summary>
3999
public string IcoPath { get; set;}
40-
41-
public override string ToString()
42-
{
43-
return Name;
44-
}
45100

101+
/// <summary>
102+
/// Plugin priority.
103+
/// </summary>
46104
[JsonIgnore]
47105
public int Priority { get; set; }
48106

49107
/// <summary>
50-
/// Init time include both plugin load time and init time
108+
/// Init time include both plugin load time and init time.
51109
/// </summary>
52110
[JsonIgnore]
53111
public long InitTime { get; set; }
54112

113+
/// <summary>
114+
/// Average query time.
115+
/// </summary>
55116
[JsonIgnore]
56117
public long AvgQueryTime { get; set; }
57118

119+
/// <summary>
120+
/// Query count.
121+
/// </summary>
58122
[JsonIgnore]
59123
public int QueryCount { get; set; }
60124

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>
61131
[JsonIgnore]
62132
public string PluginSettingsDirectoryPath { get; internal set; }
63133

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>
64139
[JsonIgnore]
65140
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+
}
66150
}
67151
}

0 commit comments

Comments
 (0)