mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-12-21 23:37:54 +08:00
40 lines
930 B
C#
40 lines
930 B
C#
// Copyright (c) Microsoft Corporation
|
|
// The Microsoft Corporation licenses this file to you under the MIT license.
|
|
// See the LICENSE file in the project root for more information.
|
|
|
|
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;
|
|
}
|
|
}
|
|
}
|