Method BlockReentrancy
BlockReentrancy()
Disallow reentrant attempts to change this collection. E.g. a event handler of the CollectionChanged event is not allowed to make changes to this collection.
Declaration
protected IDisposable BlockReentrancy()
Returns
Type | Description |
---|---|
IDisposable | A |
Remarks
typical usage is to wrap e.g. a OnCollectionChanged call with a using() scope:
using (BlockReentrancy())
{
CollectionChanged(this, new NotifyCollectionChangedEventArgs(action, item, index));
}
Applies to
Platforms and versions
Target | Versions |
---|---|
.NET Standard 2.0 | 100.3 - 100.13 |
.NET Framework | 100.0 - 100.8 |
.NET 5 | 100.11 |
.NET Core 3.1 | 100.7 - 100.8 |
Xamarin.Android | 100.0 - 100.13 |
Xamarin.iOS | 100.0 - 100.8 |
UWP | 100.0 - 100.15 |