Beispiel #1
0
 public List<Item> GetItemsBy(ItemMatchDelegate match)
 {
     List<Item> rtnList = new List<Item>();
     foreach (Item item in this._items) {
         if (match(item)) rtnList.Add(item);
     }
     return rtnList;
 }
Beispiel #2
0
 public Item GetItemBy(ItemMatchDelegate match)
 {
     Item rtn = null;
     foreach (Item item in this._items) {
         if (match(item)) {
             rtn = item;
             break;
         }
     }
     return rtn;
 }