/// <summary> /// Adds a <see cref="MultiLineGraphItem"/> to the collection. /// </summary> /// <param name="item">The <see cref="MultiLineGraphItem"/> to add to the collection.</param> public void Add(MultiLineGraphItem item) { if (item == null) { throw new ArgumentNullException("item"); } this.List.Add(item); }
/// <summary> /// Removes the specified <see cref="MultiLineGraphItem"/> from the collection. /// </summary> /// <param name="item">The item to remove from the ItemCollection.</param> public void Remove(MultiLineGraphItem item) { if (item == null) { throw new ArgumentNullException("item"); } this.List.Remove(item); }
/// <summary> /// Determines whether the specified item is a member of the collection /// </summary> /// <param name="item">The item to locate in the collection</param> /// <returns>true if the item is a member of the collection, otherwise false</returns> public bool Contains(MultiLineGraphItem item) { if (item == null) { throw new ArgumentNullException("item"); } return(this.IndexOf(item) != -1); }
/// <summary> /// Retrieves the index of the specified item in the collection /// </summary> /// <param name="item">The item to locate in the collection.</param> /// <returns>A zero-based index value that represents the position /// of the specified item in the ItemCollection.</returns> public int IndexOf(MultiLineGraphItem item) { if (item == null) { throw new ArgumentNullException("item"); } for (int i = 0; i < this.Count; i++) { if (this[i] == item) { return(i); } } return(-1); }
/// <summary> /// Retrieves the index of the specified item in the collection /// </summary> /// <param name="item">The item to locate in the collection.</param> /// <returns>A zero-based index value that represents the position /// of the specified item in the ItemCollection.</returns> public int IndexOf(MultiLineGraphItem item) { if (item == null) { throw new ArgumentNullException("item"); } for (int i=0; i<this.Count; i++) { if (this[i] == item) { return i; } } return -1; }
/// <summary> /// Determines whether the specified item is a member of the collection /// </summary> /// <param name="item">The item to locate in the collection</param> /// <returns>true if the item is a member of the collection, otherwise false</returns> public bool Contains(MultiLineGraphItem item) { if (item == null) { throw new ArgumentNullException("item"); } return (this.IndexOf(item) != -1); }