public StreetAddressNode(string name, string addressline, LocationNode parent) { this.Parent = parent; this.Key = addressline; this.Name = name; this.Formatted = Helpers.FormatAddress(Name, Address, CityName, StateNode?.Abbreviation ?? StateNode?.Key, Key, CountryName); unchecked { _hashcode = (typeof(StreetAddressNode).GetHashCode() * 397) ^ Cmp.GetHashCode(Formatted); } }
public bool Equals(LocationNode other) { if (other == null) { return(false); } if (this._hashcode != other._hashcode) { return(false); } return(Cmp.Equals(this.Formatted, other.Formatted)); }