/// <summary> /// Adds the connection to the list /// </summary> /// <param name="connection">The connection to add</param> /// <returns></returns> public bool Add(HttpConnection connection) { if (connection == null) throw new ArgumentNullException("connection", "A null connection cannot be added to the list."); if (this.Contains(connection.Id)) throw new Exception(string.Format("A connection already exists in the list with an id of {0}", connection.Id.ToString())); base.InnerList.Add(connection); return true; }
/// <summary> /// Initializes a new instance of the HttpConnectionEventArgs class /// </summary> /// <param name="connection">The connection responsible for the event</param> public HttpConnectionEventArgs(HttpConnection connection) : base() { _connection = connection; }
/// <summary> /// Removes the connection from the list /// </summary> /// <param name="connection">The connection to remove</param> /// <returns></returns> public bool Remove(HttpConnection connection) { if (connection == null) throw new ArgumentNullException("connection", "A null connection cannot be removed from the list."); if (this.Contains(connection.Id)) base.InnerList.Remove(connection); return true; }