Esempio n. 1
0
        public override int GetHashCode()
        {
            int hashcode = 0;

            unchecked {
                hashcode = (hashcode * 397) ^ (Ipv4 == null ? 0 : (Ipv4.GetHashCode()));
                hashcode = (hashcode * 397) ^ (Port == null ? 0 : (Port.GetHashCode()));
                hashcode = (hashcode * 397) ^ (Service_name == null ? 0 : (Service_name.GetHashCode()));
                hashcode = (hashcode * 397) ^ (Ipv6 == null ? 0 : (Ipv6.GetHashCode()));
            }
            return(hashcode);
        }
        public override string ToString()
        {
            var sb   = new StringBuilder("Endpoint(");
            int tmp1 = 0;

            if (__isset.ipv4)
            {
                if (0 < tmp1++)
                {
                    sb.Append(", ");
                }
                sb.Append("Ipv4: ");
                Ipv4.ToString(sb);
            }
            if (__isset.port)
            {
                if (0 < tmp1++)
                {
                    sb.Append(", ");
                }
                sb.Append("Port: ");
                Port.ToString(sb);
            }
            if ((Service_name != null) && __isset.service_name)
            {
                if (0 < tmp1++)
                {
                    sb.Append(", ");
                }
                sb.Append("Service_name: ");
                Service_name.ToString(sb);
            }
            if ((Ipv6 != null) && __isset.ipv6)
            {
                if (0 < tmp1++)
                {
                    sb.Append(", ");
                }
                sb.Append("Ipv6: ");
                Ipv6.ToString(sb);
            }
            sb.Append(')');
            return(sb.ToString());
        }
        public override int GetHashCode()
        {
            int hashcode = 157;

            unchecked {
                if (__isset.ipv4)
                {
                    hashcode = (hashcode * 397) + Ipv4.GetHashCode();
                }
                if (__isset.port)
                {
                    hashcode = (hashcode * 397) + Port.GetHashCode();
                }
                if ((Service_name != null) && __isset.service_name)
                {
                    hashcode = (hashcode * 397) + Service_name.GetHashCode();
                }
                if ((Ipv6 != null) && __isset.ipv6)
                {
                    hashcode = (hashcode * 397) + Ipv6.GetHashCode();
                }
            }
            return(hashcode);
        }