/// <summary>
        /// Return the HashCode of this object.
        /// </summary>
        /// <returns>The HashCode of this object.</returns>
        public override Int32 GetHashCode()
        {
            unchecked
            {
                return(AuthorizationStatus.GetHashCode() * 23 ^
                       GeoCoordinates.GetHashCode() * 19 ^

                       (ChargingStationName != null
                           ? ChargingStationName.GetHashCode() * 17
                           : 0) ^

                       (Address != null
                           ? Address.GetHashCode() * 13
                           : 0) ^

                       (SessionId.HasValue
                           ? SessionId.Value.GetHashCode() * 11
                           : 0) ^

                       (StatusCode != null
                           ? StatusCode.GetHashCode() * 7
                           : 0) ^

                       (TermsOfUse != null
                           ? TermsOfUse.GetHashCode() * 5
                           : 0) ^

                       (AdditionalInfo != null
                           ? AdditionalInfo.GetHashCode() * 3
                           : 0));
            }
        }
Пример #2
0
        /// <summary>
        /// Get the hashcode of this object.
        /// </summary>
        public override Int32 GetHashCode()
        {
            unchecked
            {
                return(GeoCoordinates.GetHashCode() * 5 ^

                       (Distance?.GetHashCode() ?? 0) * 3 ^

                       (Description.IsNullOrEmpty()
                            ? Description.GetHashCode()
                            : 0));
            }
        }