KGy SOFT

KGySoft.Collections Namespace

KGy SOFT Core Libraries Help
Classes

  ClassDescription
Public classCode exampleCacheTKey, TValue
Represents a generic cache. If an item loader is specified, then cache expansion is transparent: the user needs only to read the indexer to retrieve items. When a non-existing key is accessed, then the item is loaded automatically by the loader function that was passed to the constructor. If the cache is full (elements Count reaches the Capacity) and a new element has to be stored, then the oldest or least recent used element (depends on the value of Behavior) is removed from the cache.
See the Remarks section for details and an example.
Public classCircularListT
Public classCircularSortedListTKey, TValue
Public classLockFreeCacheOptions
Public classLockingCacheOptions
Public classLockingCollectionT
Provides a simple wrapper for an ICollectionT where all members are thread-safe. This only means that the inner state of the wrapped collection remains always consistent and not that all of the multi-threading concerns can be ignored.
See the Remarks section for details and some examples.
Public classLockingDictionaryTKey, TValue
Provides a simple wrapper for an IDictionaryTKey, TValue where all members are thread-safe. This only means that the inner state of the wrapped dictionary remains always consistent and not that all of the multi-threading concerns can be ignored.
See the Remarks section for details and some examples.
Public classLockingListT
Provides a simple wrapper for an IListT where all members are thread-safe. This only means that the inner state of the wrapped list remains always consistent and not that all of the multi-threading concerns can be ignored.
See the Remarks section for details and some examples.
Public classStringKeyedDictionaryTValue
Represents a string keyed dictionary that can be queried also by StringSegment and ReadOnlySpanT (in .NET Core 3.0/.NET Standard 2.1 and above) instances.
See the Remarks section for details.
Public classThreadSafeCacheFactory
Public classThreadSafeCacheOptionsBase
Public classThreadSafeDictionaryTKey, TValue
Structures

  StructureDescription
Public structureArray2DT
Public structureArray3DT
Public structureArraySectionT
Represents a one dimensional array or a section of an array. This type is very similar to ArraySegmentT/Memory<T> types but can be used on every platform in the same way and it is faster than Memory<T> in most cases. Depending on the used platform it supports ArrayPoolT allocation.
See the Remarks section for details.
Public structureArraySectionEnumeratorT
Public structureCircularListTEnumerator
Public structureCircularSortedListTKey, TValueEnumerator
Public structureStringKeyedDictionaryTValueEnumerator
Interfaces

  InterfaceDescription
Public interfaceICache
Public interfaceICacheStatistics
Public interfaceIStringKeyedDictionaryTValue
Public interfaceIStringKeyedReadOnlyDictionaryTValue
Public interfaceISupportsRangeCollectionT
Represents a collection that supports the AddRange method.
Public interfaceISupportsRangeListT
Represents a list that supports range operations.
Public interfaceIThreadSafeCacheAccessorTKey, TValue
Represents a thread-safe accessor for a cache, which provides a read-only indexer to access values. An instance can be created by the Create methods of the ThreadSafeCacheFactory class, or if you have a CacheTKey, TValue instance, you can retrieve a thread-safe accessor for it by the GetThreadSafeAccessor method.
Enumerations

  EnumerationDescription
Public enumerationCacheBehavior
Public enumerationHashingStrategy
Represents a hashing strategy for some hash-based dictionaries and caches.