Exemple #1
0
        public virtual void AddRange(string[] keys, T[] items)
        {
            if (keys.Length != items.Length)
            {
                throw new Exception(" ");
            }

            int startIndex = _items.Count;

            _keys.AddRange(keys);
            _items.AddRange(items);

            if (ItemAddRange != null)
            {
                ItemAddRange(this, new KeyedCollectionAddRangeEventArgs(items, keys, startIndex));
            }
            if (CollectionChanged != null)
            {
                CollectionChanged(this, new EventArgs());
            }
        }