public override string ToString()
{
if (_isFrozen)
{
return _frozenStringRepresentation;
}
var sb = new StringBuilder();
sb.AppendFormat("ConnectionMode={0};", _connectionMode);
sb.AppendFormat("ConnectTimeout={0};", _connectTimeout);
sb.AppendFormat("Credentials={{{0}}};", _credentialsStore);
sb.AppendFormat("DefaultCredentials={0};", _defaultCredentials);
sb.AppendFormat("GuidRepresentation={0};", _guidRepresentation);
sb.AppendFormat("IPv6={0};", _ipv6);
sb.AppendFormat("MaxConnectionIdleTime={0};", _maxConnectionIdleTime);
sb.AppendFormat("MaxConnectionLifeTime={0};", _maxConnectionLifeTime);
sb.AppendFormat("MaxConnectionPoolSize={0};", _maxConnectionPoolSize);
sb.AppendFormat("MinConnectionPoolSize={0};", _minConnectionPoolSize);
sb.AppendFormat("ReadPreference={0};", _readPreference);
sb.AppendFormat("ReplicaSetName={0};", _replicaSetName);
sb.AppendFormat("SecondaryAcceptableLatency={0};", _secondaryAcceptableLatency);
sb.AppendFormat("Servers={0};", string.Join(",", _servers.Select(s => s.ToString()).ToArray()));
sb.AppendFormat("SocketTimeout={0};", _socketTimeout);
sb.AppendFormat("Ssl={0};", _useSsl);
sb.AppendFormat("SslVerifyCertificate={0};", _verifySslCertificate);
sb.AppendFormat("WaitQueueSize={0};", _waitQueueSize);
sb.AppendFormat("WaitQueueTimeout={0}", _waitQueueTimeout);
sb.AppendFormat("WriteConcern={0};", _writeConcern);
return sb.ToString();
}
}