Represents a thread-safe, synchronized collection that wraps an underlying source collection and provides additional functionality such as item transformation and disposal management.
The SynchronizedCollection<TItem> class is designed to synchronize changes between an underlying source collection and the synchronized collection. It supports wrapping items from the source collection using a transformation function and optionally disposing of items when they are removed from the collection. This collection is particularly useful in scenarios where changes to the source collection need to be reflected in a thread-safe manner, or when additional actions (e.g., cleanup) are required for items in the collection.
Definition
Namespace:Telerik.Windows.Core
Assembly:Telerik.Windows.Scheduling.Core.dll
Type Parameters:
TItem
The type of items contained in the collection.
Syntax:
public class SynchronizedCollection<TItem> : BatchObservableCollection<TItem>, IList<TItem>, ICollection<TItem>, IList, ICollection, IReadOnlyList<TItem>, IReadOnlyCollection<TItem>, IEnumerable<TItem>, IEnumerable, INotifyCollectionChanged, INotifyPropertyChanged, IDisposable
Inheritance: objectCollection<TItem>ObservableCollection<TItem>BatchObservableCollection<TItem>SynchronizedCollection<TItem>
Implements:
Inherited Members
Methods
public static SynchronizedCollection<TItem> Create(IEnumerable sourceCollection, Func<object, int, TItem> wrapFunction, Action<TItem> previewCollectionChangedAction = null, bool shouldDisposeItems = true)
SynchronizedCollection<TItem>
public static SynchronizedCollection<TItem> Create(IEnumerable sourceCollection, Func<object, TItem> wrapFunction, bool shouldDisposeItems = true)
SynchronizedCollection<TItem>
public static SynchronizedCollection<TItem> Create<TSourceItem>(IEnumerable<TSourceItem> sourceCollection, Func<TSourceItem, int, TItem> wrapFunction, bool shouldDisposeItems = true)
SynchronizedCollection<TItem>
public static SynchronizedCollection<TItem> Create<TSourceItem>(IEnumerable<TSourceItem> sourceCollection, Func<TSourceItem, TItem> wrapFunction, bool shouldDisposeItems = true)
SynchronizedCollection<TItem>
public void Dispose()
Implements: