Click or drag to resize

SafeObservableCollection<T> Class

An observable collection specifically designed to contain objects that implement INotifyPropertyChanged.

As objects are added and removed from the collection, property changed handlers are automatically added and removed from the objects. As well as raising the standard collection changed event, it also raises the property changed event for any object in the collection that is changed. The collection effectively aggregates property changed handling for all of its items.

Inheritance Hierarchy
System.Collections.ObjectModel.ObservableCollection<T>
  Orthogonal.Common.Basic.SafeObservableCollection<T>

Namespace: Orthogonal.Common.Basic
Assembly: Orthogonal.Common.Basic (in Orthogonal.Common.Basic.dll) Version: 2025-03-15 14:42 GMT+11
Syntax
C#
public class SafeObservableCollection<T> : ObservableCollection, 
	IDisposable
where T : INotifyPropertyChanged

Type Parameters

T
A class type that implements INotifyPropertyChanged.

The SafeObservableCollection<T> type exposes the following members.

Constructors
 NameDescription
Public methodSafeObservableCollection<T>()Initializes a new instance of the SafeObservableCollection<T> class
Public methodSafeObservableCollection<T>(IEnumerable<T>)Initializes a new instance of the SafeObservableCollection<T> class
Public methodSafeObservableCollection<T>(List<T>)Initializes a new instance of the SafeObservableCollection<T> class
Top
Methods
 NameDescription
Public methodAddRange 
Public methodDisposeReleases all resources used by the SafeObservableCollection<T>
Top
Events
 NameDescription
Public eventItemPropertyChanged This event is raised when any of the items in the collection raise the PropertyChanged event. Events from collection items are aggregated and passed to listeners through this event. It allows callers to listen for change events from all collection items via this single collection-level event.
Top
See Also