示例#1
0
 /// <summary>
 /// Adds the elements of another ItemsCollection to the end of this ItemsCollection.
 /// </summary>
 /// <param name="items">
 /// The ItemsCollection whose elements are to be added to the end of this ItemsCollection.
 /// </param>
 public virtual void AddRange(ItemsCollection items)
 {
     foreach (Item item in items)
     {
         this.List.Add(item);
     }
 }
示例#2
0
 public Item()
 {
     Name     = string.Empty;
     Quantity = 0;
     SubItems = new ItemsCollection();
     Parent   = null;
     Region   = null;
     Color    = Color.Empty;
 }
示例#3
0
 /// <summary>
 /// Initializes a new instance of the ItemsCollection class, containing elements
 /// copied from another instance of ItemsCollection
 /// </summary>
 /// <param name="items">
 /// The ItemsCollection whose elements are to be added to the new ItemsCollection.
 /// </param>
 public ItemsCollection(ItemsCollection items)
 {
     this.AddRange(items);
 }
示例#4
0
 public Enumerator(ItemsCollection collection)
 {
     this.wrapped = ((System.Collections.CollectionBase)collection).GetEnumerator();
 }