Browse Source

Replace flawed GetHashCode implementation in XmlNamespace

pull/728/merge
Siegfried Pammer 9 years ago
parent
commit
4b4b915e7b
  1. 10
      ILSpy.BamlDecompiler/Ricciolo.StylesExplorer.MarkupReflection/XmlNamespace.cs

10
ILSpy.BamlDecompiler/Ricciolo.StylesExplorer.MarkupReflection/XmlNamespace.cs

@ -27,7 +27,15 @@ namespace Ricciolo.StylesExplorer.MarkupReflection @@ -27,7 +27,15 @@ namespace Ricciolo.StylesExplorer.MarkupReflection
public override int GetHashCode()
{
return Prefix.GetHashCode() + Namespace.GetHashCode() >> 20;
int hashCode = 0;
unchecked
{
if (Namespace != null)
hashCode += 1000000007 * Namespace.GetHashCode();
if (Prefix != null)
hashCode += 1000000009 * Prefix.GetHashCode();
}
return hashCode;
}
}
}
Loading…
Cancel
Save