public void AddRange(IEnumerable <T> collection) { if (collection == null) { throw new ArgumentException("collection"); } var items = collection.ToArray(); if (items.Length == 0) { return; } foreach (var item in items) { ValidateItem(item); } var args = new CollectionItemBatchEventArgs <T>(items); OnItemsAdding(args); ((List <T>)Items).AddRange(items); OnItemsAdded(args); OnChanged(); }
protected void OnItemsAdded(CollectionItemBatchEventArgs <T> args) { Fire(ItemsAdded, args); }