GetHashCode() public method

public GetHashCode ( ) : int
return int
示例#1
0
        public override int GetHashCode()
        {
            int hashCode = 0;

            if (_callbackInstance != null)
            {
                hashCode ^= _callbackInstance.GetHashCode();
            }

            Fx.Assert(_remoteAddress != null, "remoteAddress should not be null.");
            hashCode ^= _remoteAddress.GetHashCode();


            Fx.Assert(_binding != null, "binding should not be null.");
            hashCode ^= _binding.GetHashCode();

            return(hashCode);
        }
示例#2
0
        public override int GetHashCode()
        {
            int hashCode = 0;

            if (_callbackInstance != null)
            {
                hashCode ^= _callbackInstance.GetHashCode();
            }

            Fx.Assert(_endpointConfigurationName != null, "endpointConfigurationName should not be null.");
            hashCode ^= _endpointConfigurationName.GetHashCode();

            if (_remoteAddress != null)
            {
                hashCode ^= _remoteAddress.GetHashCode();
            }

            return(hashCode);
        }