Table of Contents

Interface INotifyCollection<TItem>

Namespace
Ecng.Collections
Assembly
Ecng.Collections.dll

Represents a collection that notifies about its changes.

public interface INotifyCollection<TItem> : ICollection<TItem>, IEnumerable<TItem>, IEnumerable

Type Parameters

TItem

The type of elements in the collection.

Inherited Members
Extension Methods

Events

Added

Occurs after an item has been added.

event Action<TItem> Added

Event Type

Action<TItem>

Adding

Occurs before adding an item, allowing cancellation.

event Func<TItem, bool> Adding

Event Type

Func<TItem, bool>

Changed

Occurs when a change happens in the collection.

event Action Changed

Event Type

Action

Cleared

Occurs after the collection has been cleared.

event Action Cleared

Event Type

Action

Clearing

Occurs before clearing the collection, allowing cancellation.

event Func<bool> Clearing

Event Type

Func<bool>

Inserted

Occurs after an item has been inserted at a specific index.

event Action<int, TItem> Inserted

Event Type

Action<int, TItem>

Inserting

Occurs before inserting an item at a specified index, allowing cancellation.

event Func<int, TItem, bool> Inserting

Event Type

Func<int, TItem, bool>

Removed

Occurs after an item has been removed.

event Action<TItem> Removed

Event Type

Action<TItem>

Removing

Occurs before removing an item, allowing cancellation.

event Func<TItem, bool> Removing

Event Type

Func<TItem, bool>

RemovingAt

Occurs before removing an item at a specific index, allowing cancellation.

event Func<int, bool> RemovingAt

Event Type

Func<int, bool>