mirror of
https://github.com/Readarr/Readarr
synced 2025-12-25 17:54:14 +01:00
Command Equality ignores properties defined in Command
This commit is contained in:
parent
4b5d03ac94
commit
742a21252c
2 changed files with 6 additions and 2 deletions
|
|
@ -26,6 +26,11 @@ public bool Equals(Command x, Command y)
|
|||
continue;
|
||||
}
|
||||
|
||||
if (xProperty.DeclaringType == typeof (Command))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
var yProperty = yProperties.Single(p => p.Name == xProperty.Name);
|
||||
|
||||
var xValue = xProperty.GetValue(x, null);
|
||||
|
|
|
|||
|
|
@ -58,8 +58,7 @@ public IEnumerable<Command> RunningCommands()
|
|||
|
||||
public Command FindExisting(Command command)
|
||||
{
|
||||
return RunningCommands().Where(c => c.GetType() == command.GetType())
|
||||
.SingleOrDefault(t => CommandEqualityComparer.Instance.Equals(t, command));
|
||||
return RunningCommands().SingleOrDefault(t => CommandEqualityComparer.Instance.Equals(t, command));
|
||||
}
|
||||
|
||||
public void Store(Command command)
|
||||
|
|
|
|||
Loading…
Reference in a new issue