Method BlockReentrancy
BlockReentrancy()
Disallow reentrant attempts to change this collection. E.g. an event handler of the CollectionChanged event is not allowed to make changes to this collection.
protected IDisposable BlockReentrancy()
Returns
Remarks
typical usage is to wrap e.g. a OnCollectionChanged call with a using() scope:
using (BlockReentrancy())
{
CollectionChanged(this, new NotifyCollectionChangedEventArgs(
action, item, index));
}