PowerToys/Wox.Plugin/PluginPair.cs
bao-qian 8aee2858ea Fix setting for multiple action keywords
1. completed rewrite the action keyword setting logic.
2. Fix setting for multiple action keywords in #352
3. Fix setting for Web Search plugin
2015-11-09 03:20:02 +00:00

39 lines
886 B
C#

namespace Wox.Plugin
{
public class PluginPair
{
public IPlugin Plugin { get; internal set; }
public PluginMetadata Metadata { get; internal set; }
internal long InitTime { get; set; }
internal long AvgQueryTime { get; set; }
internal int QueryCount { get; set; }
public override string ToString()
{
return Metadata.Name;
}
public override bool Equals(object obj)
{
PluginPair r = obj as PluginPair;
if (r != null)
{
return string.Equals(r.Metadata.ID, Metadata.ID);
}
else
{
return false;
}
}
public override int GetHashCode()
{
var hashcode = Metadata.ID?.GetHashCode() ?? 0;
return hashcode;
}
}
}