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
  Lextm.SharpSnmpLib.SecurityCacheTKey, TValue

Namespace: Lextm.SharpSnmpLib.Security
Assembly: SharpSnmpLib (in SharpSnmpLib.dll) Version: 12.5.7-2+Branch.master.Sha.2a75ece2c9d55c4f731f356d1512c8a5d19fa096.2a75ece2c9d55c4f731f356d1512c8a5d19fa096
Syntax
public class Cache<TKey, TValue>

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
See Also