public void Clear()
        {
            var clone = new List <T>(_collection);

            _collection.Clear();
            CollectionCleared?.Invoke(this, new GenericCollectionEventArgs <T>(clone));
        }
Esempio n. 2
0
        /// <summary>
        /// Clear the howle collection
        /// </summary>
        public void Clear()
        {
            var args = new ClearCollectionEventArgs();

            ClearCollection?.Invoke(this, args);

            if (!args.Cancel)
            {
                items.Clear();
                newItems.Clear();
                removedItems.Clear();

                var collectionClearedArgs = new CollectionClearedEventArgs();

                CollectionCleared?.Invoke(this, collectionClearedArgs);
            }
        }