private void CheckHostAndPort() { if (_host == null || _host.Length == 0) { throw new InvalidOperationException(SR.UnspecifiedHost); } if (_port <= 0 || _port > MaxPortValue) { throw new InvalidOperationException(SR.InvalidPort); } }