PowerToys/src/modules/launcher/Wox.Plugin/PluginPair.cs
Clint Rutkas 14247fa75a
Dev/crutkas/fixing warnings (#5161)
* new lines & braces

* Tabs /space auto fix

Co-authored-by: Clint Rutkas <crutkas@microsoft.com>
2020-07-22 13:27:17 -07:00

35 lines
745 B
C#

namespace Wox.Plugin
{
public class PluginPair
{
public IPlugin Plugin { get; internal set; }
public PluginMetadata Metadata { get; internal 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;
}
}
}