コード例 #1
0
ファイル: MultiLineGraph.cs プロジェクト: modernist/CrawlWave
 /// <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
ファイル: MultiLineGraph.cs プロジェクト: modernist/CrawlWave
 /// <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
ファイル: MultiLineGraph.cs プロジェクト: modernist/CrawlWave
 /// <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);
 }