Table of Contents

Method BlockReentrancy

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

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

IDisposable

Remarks

typical usage is to wrap e.g. a OnCollectionChanged call with a using() scope:

using (BlockReentrancy())
{
    CollectionChanged(this, new NotifyCollectionChangedEventArgs(
    action, item, index));
}