public void Push(MruItem item) { if (item == null) { throw new ArgumentNullException("item"); } if (string.IsNullOrEmpty(item.FileName)) { throw new ArgumentException("Incomplete MRU list item data.", "item"); } Push(item, false); }
public void Push(MruItem item, bool suppressChangedEvent) { if (item == null) { throw new ArgumentNullException("item"); } if (string.IsNullOrEmpty(item.FileName)) { throw new ArgumentException("Incomplete MRU list item data.", "item"); } items.Enqueue(item); if (items.Count > maxItems) { items.Dequeue(); } if (!suppressChangedEvent) { OnChanged(); } }