KGy SOFT

ICache Interface

KGy SOFT Core Libraries Help

Namespace:  KGySoft.Collections
Assembly:  KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 5.0.0-rc.1
Syntax

public interface ICache : IDictionary, ICollection, 
	IEnumerable

The ICache type exposes the following members.

Properties

  NameDescription
Public propertyBehavior
Gets or sets the cache behavior when cache is full and an element has to be removed. The cache is full, when Count reaches the Capacity.
Public propertyCapacity
Gets or sets the capacity of the cache. If new value is smaller than elements count (value of the Count property), then old or least used elements (depending on Behavior) will be removed from the ICache.
Public propertyCount
Gets the number of elements contained in the ICollection.
(Inherited from ICollection.)
Public propertyEnsureCapacity
Gets or sets whether adding the first item to the cache or resetting Capacity on a non-empty cache should allocate memory for all cache entries.
Public propertyIsFixedSize
Gets a value indicating whether the IDictionary object has a fixed size.
(Inherited from IDictionary.)
Public propertyIsReadOnly
Gets a value indicating whether the IDictionary object is read-only.
(Inherited from IDictionary.)
Public propertyIsSynchronized
Gets a value indicating whether access to the ICollection is synchronized (thread safe).
(Inherited from ICollection.)
Public propertyItem
Gets or sets the element with the specified key.
(Inherited from IDictionary.)
Public propertyKeys
Gets an ICollection object containing the keys of the IDictionary object.
(Inherited from IDictionary.)
Public propertySyncRoot
Gets an object that can be used to synchronize access to the ICollection.
(Inherited from ICollection.)
Public propertyValues
Gets an ICollection object containing the values in the IDictionary object.
(Inherited from IDictionary.)
Top
Methods

  NameDescription
Public methodAdd
Adds an element with the provided key and value to the IDictionary object.
(Inherited from IDictionary.)
Public methodClear
Removes all elements from the IDictionary object.
(Inherited from IDictionary.)
Public methodContains
Determines whether the IDictionary object contains an element with the specified key.
(Inherited from IDictionary.)
Public methodCopyTo
Copies the elements of the ICollection to an Array, starting at a particular Array index.
(Inherited from ICollection.)
Public methodGetEnumerator
Returns an IDictionaryEnumerator object for the IDictionary object.
(Inherited from IDictionary.)
Public methodGetStatistics
Gets statistics of the cache.
Public methodGetValueUncached
Reloads the value into the cache even if it was already loaded using the item loader that was passed to the constructor.
Public methodRefreshValue
Refreshes the value in the cache even if it was already loaded.
Public methodRemove
Removes the element with the specified key from the IDictionary object.
(Inherited from IDictionary.)
Public methodReset
Clears the cache and resets statistics.
Public methodTouch
Renews the value with the specified key in the evaluation order.
Top
Extension Methods

  NameDescription
Public Extension MethodIndexOf(FuncObject, Boolean)Overloaded.
Searches for an element in the source enumeration where the specified predicate returns .
(Defined by EnumerableExtensions.)
Public Extension MethodIndexOf(Object)Overloaded.
Searches for an element in the source enumeration.
(Defined by EnumerableExtensions.)
Public Extension MethodIsNullOrEmpty
Determines whether the specified source is  or empty (has no elements).
(Defined by EnumerableExtensions.)
Public Extension MethodTryAdd
Tries to add the specified item to the collection.
(Defined by EnumerableExtensions.)
Public Extension MethodTryAddRange
Tries to add the specified collection to the target collection.
(Defined by EnumerableExtensions.)
Public Extension MethodTryClear
Tries to remove all elements from the collection.
(Defined by EnumerableExtensions.)
Public Extension MethodTryGetElementAt
Tries to get an item at the specified index in the collection.
(Defined by EnumerableExtensions.)
Public Extension MethodTryInsert
Tries to insert the specified item at the specified index to the collection.
(Defined by EnumerableExtensions.)
Public Extension MethodTryInsertRange
Tries to insert the specified collection into the target collection.
(Defined by EnumerableExtensions.)
Public Extension MethodTryRemove
Tries to remove the specified item from to the collection.
(Defined by EnumerableExtensions.)
Public Extension MethodTryRemoveAt
Tries to remove an item at the specified index from the collection.
(Defined by EnumerableExtensions.)
Public Extension MethodTryRemoveRange
Tries to remove count amount of items from the specified collection at the specified index.
(Defined by EnumerableExtensions.)
Public Extension MethodTryReplaceRange
Tries to remove count amount of items from the target at the specified index, and to insert the specified collection at the same position. The number of elements in collection can be different from the amount of removed items.
(Defined by EnumerableExtensions.)
Public Extension MethodTrySetElementAt
Tries to set the specified item at the specified index in the collection.
(Defined by EnumerableExtensions.)
Top
See Also

Reference