Index: src/Common/SharpMap/Editors/TrackerSymbolHelper.cs =================================================================== diff -u -r8f6ae890fed8e8eae3a32f9c0498a10f82e0ddf9 -r5fc71a385897af92ccb092f2f969b5709afab85a --- src/Common/SharpMap/Editors/TrackerSymbolHelper.cs (.../TrackerSymbolHelper.cs) (revision 8f6ae890fed8e8eae3a32f9c0498a10f82e0ddf9) +++ src/Common/SharpMap/Editors/TrackerSymbolHelper.cs (.../TrackerSymbolHelper.cs) (revision 5fc71a385897af92ccb092f2f969b5709afab85a) @@ -89,40 +89,49 @@ this.width = width; this.height = height; penString = pen.Color.ToString(); - brushString = brush is SolidBrush ? ((SolidBrush)brush).Color.ToString() : brush.ToString(); + brushString = brush is SolidBrush ? ((SolidBrush) brush).Color.ToString() : brush.ToString(); } - private bool Equals(TrackerSymbolHelperArgumentKey other) - { - return totalWidth == other.totalWidth && - totaHeight == other.totaHeight && - width == other.width && - height == other.height && - string.Equals(penString, other.penString) && - string.Equals(brushString, other.brushString); - } - public override bool Equals(object obj) { - if (ReferenceEquals(null, obj)) return false; - if (ReferenceEquals(this, obj)) return true; - if (obj.GetType() != this.GetType()) return false; - return Equals((TrackerSymbolHelperArgumentKey)obj); + if (ReferenceEquals(null, obj)) + { + return false; + } + if (ReferenceEquals(this, obj)) + { + return true; + } + if (obj.GetType() != GetType()) + { + return false; + } + return Equals((TrackerSymbolHelperArgumentKey) obj); } public override int GetHashCode() { unchecked { var hashCode = totalWidth; - hashCode = (hashCode * 397) ^ totaHeight; - hashCode = (hashCode * 397) ^ width; - hashCode = (hashCode * 397) ^ height; - hashCode = (hashCode * 397) ^ (penString != null ? penString.GetHashCode() : 0); - hashCode = (hashCode * 397) ^ (brushString != null ? brushString.GetHashCode() : 0); + hashCode = (hashCode*397) ^ totaHeight; + hashCode = (hashCode*397) ^ width; + hashCode = (hashCode*397) ^ height; + hashCode = (hashCode*397) ^ (penString != null ? penString.GetHashCode() : 0); + hashCode = (hashCode*397) ^ (brushString != null ? brushString.GetHashCode() : 0); return hashCode; } } + + private bool Equals(TrackerSymbolHelperArgumentKey other) + { + return totalWidth == other.totalWidth && + totaHeight == other.totaHeight && + width == other.width && + height == other.height && + string.Equals(penString, other.penString) && + string.Equals(brushString, other.brushString); + } } } -} +} \ No newline at end of file