CP-28284: Implement IEquatable in PlanAction

Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
This commit is contained in:
Mihaela Stoica 2018-06-19 11:53:44 +01:00 committed by Konstantina Chremmou
parent 59b9b695db
commit da9e5a5cab

View File

@ -39,7 +39,7 @@ using XenAPI;
namespace XenAdmin.Wizards.PatchingWizard.PlanActions namespace XenAdmin.Wizards.PatchingWizard.PlanActions
{ {
public abstract class PlanAction public abstract class PlanAction : IEquatable<PlanAction>
{ {
protected static readonly ILog log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); protected static readonly ILog log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
@ -199,6 +199,14 @@ namespace XenAdmin.Wizards.PatchingWizard.PlanActions
} }
} }
public bool Equals(PlanAction other)
{
if (other == null)
return false;
return string.Equals(Title, other.Title, StringComparison.OrdinalIgnoreCase);
}
public override string ToString() public override string ToString()
{ {
return this.Title; return this.Title;