Esempio n. 1
0
        public static NetworkInfo GetDefaultNetworkInfo()
        {
            NetworkInfo networkInfo = GetDefaultIPv4NetworkInfo();

            if (networkInfo != null)
            {
                return(networkInfo);
            }

            return(GetDefaultIPv6NetworkInfo());
        }
Esempio n. 2
0
        public bool Equals(NetworkInfo obj)
        {
            if (obj is null)
            {
                return(false);
            }

            if (ReferenceEquals(this, obj))
            {
                return(true);
            }

            if (_nic.NetworkInterfaceType != _nic.NetworkInterfaceType)
            {
                return(false);
            }

            if (!_localIP.Equals(obj._localIP))
            {
                return(false);
            }

            return(true);
        }