src/NetStandard/Collections/Synchronization/src/SynchronizableCollectionBase{`1}.cs
/// <summary>
/// Notifies all handlers of CollectionChanged and CollectionModified and all subscribed observers.
/// Early returns if no handlers for CollectionChanged, CollectionModified attached and no observers have been subscribed.
/// </summary>
/// <param name="collectionModification"></param>
Notifies all handlers of CollectionChanged and CollectionModified and all subscribed observers.
Early returns if no handlers for CollectionChanged, CollectionModified attached and no observers have been subscribed.
Notifies all handlers of CollectionChanged and CollectionModified and all subscribed observers . Early returns if no handlers for CollectionChanged CollectionModified attached and no observers have been subscribed .
protected virtual void OnCollectionModified(ICollectionModification<TItem, TItem> collectionModification)
        {
            if (collectionChanged is null && CollectionModified is null && !collectionModificationSubject.HasObservers) {
                return;
            }
            var collectionChangedEventArgs = CreateCollectionModifiedEventArgs(collectionModification);
            using var _ = BlockReentrancy();
            collectionChanged?.Invoke(this, collectionChangedEventArgs);
            CollectionModified?.Invoke(this, collectionChangedEventArgs);
            if (collectionModificationSubject.HasObservers) {
                collectionModificationSubject.OnNext(collectionModification);
            }
        }
protected virtual void OnCollectionModified ( ICollectionModification < TItem , TItem > collectionModification ) { if ( collectionChanged is null && CollectionModified is null && ! collectionModificationSubject . HasObservers ) { return ; } var collectionChangedEventArgs = CreateCollectionModifiedEventArgs ( collectionModification ) ; using var _ = BlockReentrancy ( ) ; collectionChanged ? . Invoke ( this , collectionChangedEventArgs ) ; CollectionModified ? . Invoke ( this , collectionChangedEventArgs ) ; if ( collectionModificationSubject . HasObservers ) { collectionModificationSubject . OnNext ( collectionModification ) ; } }
Notifies all handlers of CollectionChanged and CollectionModified and all subscribed observers.
Notifies all handlers of CollectionChanged and CollectionModified and all subscribed observers .
collectionModification
ICollectionModification<TItem, TItem>
None