diff options
Diffstat (limited to 'mcs/class/System.XML/System.Xml/XmlNameEntry.cs')
-rw-r--r-- | mcs/class/System.XML/System.Xml/XmlNameEntry.cs | 27 |
1 files changed, 3 insertions, 24 deletions
diff --git a/mcs/class/System.XML/System.Xml/XmlNameEntry.cs b/mcs/class/System.XML/System.Xml/XmlNameEntry.cs index 3654804496a..a4715c226a1 100644 --- a/mcs/class/System.XML/System.Xml/XmlNameEntry.cs +++ b/mcs/class/System.XML/System.Xml/XmlNameEntry.cs @@ -37,34 +37,13 @@ namespace System.Xml { public XmlNameEntry (string prefix, string local, string ns) { - Update (prefix, local, ns); - } - - public void Update (string prefix, string local, string ns) - { Prefix = prefix; LocalName = local; NS = ns; - Hash = local.GetHashCode () + (prefix.Length > 0 ? prefix.GetHashCode () : 0); } - public string Prefix; - public string LocalName; - public string NS; - public int Hash; - - public override bool Equals (object other) - { - XmlNameEntry e = other as XmlNameEntry; - return e != null && e.Hash == Hash && - Object.ReferenceEquals (e.LocalName, LocalName) && - Object.ReferenceEquals (e.NS, NS) && - Object.ReferenceEquals (e.Prefix, Prefix); - } - - public override int GetHashCode () - { - return Hash; - } + public readonly string Prefix; + public readonly string LocalName; + public readonly string NS; } } |