AttrExtensions
Extensions for the list of attributes.
using AngleSharp.Dom;
namespace AngleSharp.Extensions
{
internal static class AttrExtensions
{
public static bool AreEqual(this INamedNodeMap sourceAttributes, INamedNodeMap targetAttributes)
{
if (sourceAttributes.Length == targetAttributes.Length) {
foreach (IAttr sourceAttribute in sourceAttributes) {
bool flag = false;
foreach (IAttr targetAttribute in targetAttributes) {
flag = (sourceAttribute.GetHashCode() == targetAttribute.GetHashCode());
if (flag)
break;
}
if (!flag)
return false;
}
return true;
}
return false;
}
}
}