CachedSynchronizedList
Ecng.Collections
Represents a thread-safe list with a cached array of its elements for improved performance.
继承自: SynchronizedList<T>
构造函数
CachedSynchronizedList
public CachedSynchronizedList()
cachedSynchronizedList = CachedSynchronizedList()
Initializes a new instance of the CachedSynchronizedList class.
CachedSynchronizedList
public CachedSynchronizedList(int capacity)
cachedSynchronizedList = CachedSynchronizedList(capacity)
Initializes a new instance of the CachedSynchronizedList class with the specified initial capacity.
- capacity
- The initial number of elements that the list can contain.
属性
Cache
public T[] Cache { get; }
value = cachedSynchronizedList.Cache
Gets a cached array of the elements in the list.
方法
OnChanged
protected override void OnChanged()
cachedSynchronizedList.OnChanged()
Called when the list is modified to reset the cached array.