Click or drag to resize

CacheTKey, TValue Class

Collection for improving performance. Using hashing of key/value pairs. Oldest elements will be removed from the Cache when the capacity of the cache is reached. This class is not thread safe.
Inheritance Hierarchy
SystemObject
  GSF.Net.Snmp.SecurityCacheTKey, TValue

Namespace: GSF.Net.Snmp.Security
Assembly: GSF.Net (in GSF.Net.dll) Version: 2.4.181-beta
Syntax
public class Cache<TKey, TValue>
View Source

Type Parameters

TKey
The type of the keys in the dictionary.
TValue
The type of the values in the dictionary.

The CacheTKey, TValue type exposes the following members.

Constructors
 NameDescription
Public methodCacheTKey, TValue Caching class for improving performance. Oldest elements are removed as the cache is filled up
Top
Properties
 NameDescription
Public propertyCount Gets the number of key/value pairs contained in the Cache.
Public propertyItem Gets the value associated with the specified key.
Top
Methods
 NameDescription
Public methodAdd Adds the specified key and value to the dictionary. If the cache has reached its capacity oldest element will be removed automatically
Public methodContainsKey Determines whether the Cache contains the specified key.
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Public methodTryGetValue Gets the value associated with the specified key.
Top
Extension Methods
 NameDescription
Public Extension MethodGetEnumValueOrDefault Gets the enumeration constant for value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions)
Public Extension MethodGetEnumValueOrDefaultT Gets the enumeration constant for this value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions)
Top
See Also