mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-12-13 19:19:23 +08:00
35 lines
753 B
C#
35 lines
753 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;
|
|
}
|
|
}
|
|
}
|