public override bool Equals(System.Object comparator)
{
if (!(comparator is LdapCompareAttrNames))
{
return false;
}
LdapCompareAttrNames comp = (LdapCompareAttrNames) comparator;
// Test to see if the attribute to compare are the same length
if ((comp.sortByNames.Length != this.sortByNames.Length) || (comp.sortAscending.Length != this.sortAscending.Length))
{
return false;
}
// Test to see if the attribute names and sorting orders are the same.
for (int i = 0; i < this.sortByNames.Length; i++)
{
if (comp.sortAscending[i] != this.sortAscending[i])
return false;
if (!comp.sortByNames[i].ToUpper().Equals(this.sortByNames[i].ToUpper()))
return false;
}
return true;
}