示例#1
0
 /// <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);
 }
示例#2
0
 /// <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);
 }
示例#3
0
 /// <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);
 }
示例#4
0
 /// <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);
 }
示例#5
0
 /// <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;
 }
示例#6
0
 /// <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);
 }