/// <summary>
        ///   Adds the server.
        /// </summary>
        /// <param name = "endPoint">The end point.</param>
        public void AddServer(MongoServerEndPoint endPoint)
        {
            if (endPoint == null)
            {
                throw new ArgumentNullException("endPoint");
            }

            _servers.Add(endPoint);
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="MongoConnectionException"/> class.
 /// </summary>
 /// <param name="message">The message.</param>
 /// <param name="connection">The connection.</param>
 /// <param name="innerException">The inner exception.</param>
 internal MongoConnectionException(string message, Connection connection, Exception innerException)
     : base(message, innerException)
 {
     if (connection == null)
     {
         throw new ArgumentNullException("connection");
     }
     ConnectionString = connection.ConnectionString;
     EndPoint         = connection.EndPoint;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="MongoConnectionException"/> class.
 /// </summary>
 /// <param name="message">The message.</param>
 /// <param name="connectionString">The connection string.</param>
 /// <param name="endPoint">The end point.</param>
 /// <param name="innerException">The inner exception.</param>
 public MongoConnectionException(string message, string connectionString, MongoServerEndPoint endPoint, Exception innerException)
     : base(message, innerException)
 {
     EndPoint         = endPoint;
     ConnectionString = connectionString;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="MongoConnectionException"/> class.
 /// </summary>
 /// <param name="message">The message.</param>
 /// <param name="connectionString">The connection string.</param>
 /// <param name="endPoint">The end point.</param>
 public MongoConnectionException(string message, string connectionString, MongoServerEndPoint endPoint)
     : this(message, connectionString, endPoint, null)
 {
 }