PowerToys/Wox.Plugin/PluginPair.cs

39 lines
886 B
C#
Raw Normal View History

2015-10-31 07:17:34 +08:00
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;
}
}
}