2015-10-31 07:17:34 +08:00
|
|
|
|
namespace Wox.Plugin
|
2013-12-21 01:20:17 +08:00
|
|
|
|
{
|
|
|
|
|
public class PluginPair
|
|
|
|
|
{
|
2015-11-02 01:25:44 +08:00
|
|
|
|
public IPlugin Plugin { get; internal set; }
|
|
|
|
|
public PluginMetadata Metadata { get; internal set; }
|
2015-01-26 17:46:55 +08:00
|
|
|
|
|
2016-05-22 12:30:38 +08:00
|
|
|
|
|
2015-02-05 00:03:35 +08:00
|
|
|
|
|
2015-01-26 17:46:55 +08:00
|
|
|
|
public override string ToString()
|
|
|
|
|
{
|
|
|
|
|
return Metadata.Name;
|
|
|
|
|
}
|
2015-11-09 11:20:02 +08:00
|
|
|
|
|
|
|
|
|
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;
|
|
|
|
|
}
|
2013-12-21 01:20:17 +08:00
|
|
|
|
}
|
|
|
|
|
}
|