Flow.Launcher/Flow.Launcher.Plugin/PluginMetadata.cs

60 lines
1.6 KiB
C#
Raw Normal View History

2013-12-20 11:38:10 +00:00
using System;
using System.Collections.Generic;
2016-01-06 06:45:08 +00:00
using System.IO;
using Newtonsoft.Json;
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
{
[JsonObject(MemberSerialization.OptOut)]
public class PluginMetadata : BaseModel
2013-12-20 11:38:10 +00:00
{
private string _pluginDirectory;
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; }
public string Website { get; set; }
public bool Disabled { get; set; }
public string ExecuteFilePath { get; private set;}
2013-12-23 15:53:38 +00:00
public string ExecuteFileName { get; set; }
2015-02-05 14:20:42 +00:00
public string PluginDirectory
{
get { return _pluginDirectory; }
2020-03-03 22:25:59 +00:00
internal set
{
_pluginDirectory = value;
ExecuteFilePath = Path.Combine(value, ExecuteFileName);
IcoPath = Path.Combine(value, IcoPath);
}
}
2014-08-17 14:35:46 +00:00
public string ActionKeyword { get; set; }
public List<string> ActionKeywords { get; set; }
public string IcoPath { get; set;}
2021-01-05 08:11:38 +00:00
public override string ToString()
{
return Name;
}
2021-01-05 08:11:38 +00:00
[JsonIgnore]
public int Priority { get; set; }
/// <summary>
/// Init time include both plugin load time and init time
/// </summary>
[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
}
}