2013-12-20 11:38:10 +00:00
|
|
|
|
using System;
|
2015-11-04 22:49:40 +00:00
|
|
|
|
using System.Collections.Generic;
|
2016-01-06 06:45:08 +00:00
|
|
|
|
using System.IO;
|
2020-12-30 05:40:42 +00:00
|
|
|
|
using System.Text.Json.Serialization;
|
2020-01-14 19:10:54 +00:00
|
|
|
|
|
2020-04-21 09:12:17 +00:00
|
|
|
|
namespace Flow.Launcher.Plugin
|
2013-12-20 11:38:10 +00:00
|
|
|
|
{
|
2016-05-23 21:08:13 +00:00
|
|
|
|
public class PluginMetadata : BaseModel
|
2013-12-20 11:38:10 +00:00
|
|
|
|
{
|
2016-05-03 20:18:26 +00:00
|
|
|
|
private string _pluginDirectory;
|
2014-03-01 07:42:33 +00:00
|
|
|
|
public string ID { get; set; }
|
2013-12-20 11:38:10 +00:00
|
|
|
|
public string Name { get; set; }
|
|
|
|
|
|
public string Author { get; set; }
|
|
|
|
|
|
public string Version { get; set; }
|
|
|
|
|
|
public string Language { get; set; }
|
|
|
|
|
|
public string Description { get; set; }
|
2014-06-01 15:23:48 +00:00
|
|
|
|
public string Website { get; set; }
|
2016-05-22 04:30:38 +00:00
|
|
|
|
public bool Disabled { get; set; }
|
2016-05-03 20:18:26 +00:00
|
|
|
|
public string ExecuteFilePath { get; private set;}
|
2014-03-01 07:42:33 +00:00
|
|
|
|
|
2013-12-23 15:53:38 +00:00
|
|
|
|
public string ExecuteFileName { get; set; }
|
2015-02-05 14:20:42 +00:00
|
|
|
|
|
2016-05-03 20:18:26 +00:00
|
|
|
|
public string PluginDirectory
|
|
|
|
|
|
{
|
|
|
|
|
|
get { return _pluginDirectory; }
|
2020-03-03 22:25:59 +00:00
|
|
|
|
internal set
|
2016-05-03 20:18:26 +00:00
|
|
|
|
{
|
|
|
|
|
|
_pluginDirectory = value;
|
|
|
|
|
|
ExecuteFilePath = Path.Combine(value, ExecuteFileName);
|
|
|
|
|
|
IcoPath = Path.Combine(value, IcoPath);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2014-08-17 14:35:46 +00:00
|
|
|
|
|
2013-12-20 17:20:17 +00:00
|
|
|
|
public string ActionKeyword { get; set; }
|
2014-03-28 14:42:28 +00:00
|
|
|
|
|
2015-11-06 02:29:32 +00:00
|
|
|
|
public List<string> ActionKeywords { get; set; }
|
2015-11-04 22:49:40 +00:00
|
|
|
|
|
2022-02-15 11:15:04 +00:00
|
|
|
|
public List<Dictionary<string, string>> Listeners { get; set;}
|
|
|
|
|
|
|
2016-05-03 20:18:26 +00:00
|
|
|
|
public string IcoPath { get; set;}
|
2022-02-15 11:15:04 +00:00
|
|
|
|
|
2015-01-26 09:46:55 +00:00
|
|
|
|
public override string ToString()
|
|
|
|
|
|
{
|
|
|
|
|
|
return Name;
|
|
|
|
|
|
}
|
2021-01-06 09:51:55 +00:00
|
|
|
|
|
2021-01-05 08:11:38 +00:00
|
|
|
|
[JsonIgnore]
|
|
|
|
|
|
public int Priority { get; set; }
|
|
|
|
|
|
|
2020-02-21 21:12:58 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Init time include both plugin load time and init time
|
|
|
|
|
|
/// </summary>
|
2016-05-22 04:30:38 +00:00
|
|
|
|
[JsonIgnore]
|
|
|
|
|
|
public long InitTime { get; set; }
|
|
|
|
|
|
[JsonIgnore]
|
|
|
|
|
|
public long AvgQueryTime { get; set; }
|
|
|
|
|
|
[JsonIgnore]
|
|
|
|
|
|
public int QueryCount { get; set; }
|
2013-12-20 11:38:10 +00:00
|
|
|
|
}
|
|
|
|
|
|
}
|