public override bool Equals(object obj)
{
MvcData other = obj as MvcData;
if (other == null)
{
return false;
}
// NOTE: RegionName and RegionAreaName are not included in equality check (these merely carry some additional info).
if ((ControllerName != other.ControllerName) ||
(ControllerAreaName != other.ControllerAreaName) ||
(ActionName != other.ActionName) ||
(ViewName != other.ViewName) ||
(AreaName != other.AreaName))
{
return false;
}
if (RouteValues == null)
{
return other.RouteValues == null;
}
return RouteValues.SequenceEqual(other.RouteValues);
}