mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-06 11:16:51 +02:00
Merge branch 'master' into dotnet45
This commit is contained in:
@@ -38,4 +38,17 @@ namespace Wox.Plugin
|
||||
|
||||
string GetTranslatedPluginDescription();
|
||||
}
|
||||
|
||||
public interface IMultipleActionKeywords
|
||||
{
|
||||
event ActionKeywordsChangedEventHandler ActionKeywordsChanged;
|
||||
}
|
||||
|
||||
public class ActionKeywordsChangedEventArgs : EventArgs
|
||||
{
|
||||
public string OldActionKeyword { get; set; }
|
||||
public string NewActionKeyword { get; set; }
|
||||
}
|
||||
|
||||
public delegate void ActionKeywordsChangedEventHandler(IMultipleActionKeywords sender, ActionKeywordsChangedEventArgs e);
|
||||
}
|
||||
|
||||
@@ -15,5 +15,24 @@
|
||||
{
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,7 +47,10 @@ namespace Wox.Plugin
|
||||
Result r = obj as Result;
|
||||
if (r != null)
|
||||
{
|
||||
return string.Equals(r.Title, Title) && string.Equals(r.SubTitle, SubTitle);
|
||||
var equality = string.Equals(r.Title, Title) &&
|
||||
string.Equals(r.SubTitle, SubTitle) &&
|
||||
r.Score == Score;
|
||||
return equality;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -57,7 +60,10 @@ namespace Wox.Plugin
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return (Title?.GetHashCode() ?? 0) ^ (SubTitle?.GetHashCode() ?? 0);
|
||||
var hashcode = (Title?.GetHashCode() ?? 0) ^
|
||||
(SubTitle?.GetHashCode() ?? 0) ^
|
||||
(Score.GetHashCode());
|
||||
return hashcode;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
|
||||
Reference in New Issue
Block a user