Click or drag to resize

WeakDictionaryTKey, TValue Class

Represents a dictionary that holds weak references to its keys, allowing keys to be garbage collected when no longer referenced elsewhere.
Inheritance Hierarchy
SystemObject
  Altaxo.CollectionsWeakDictionaryTKey, TValue

Namespace: Altaxo.Collections
Assembly: AltaxoCore (in AltaxoCore.dll) Version: 4.8.3448.0 (4.8.3448.0)
Syntax
C#
public class WeakDictionary<TKey, TValue>

Type Parameters

TKey
Type of the key.
TValue
Type of the value.

The WeakDictionaryTKey, TValue type exposes the following members.

Constructors
 NameDescription
Public methodWeakDictionaryTKey, TValue Initializes a new instance of the WeakDictionaryTKey, TValue class.
Top
Properties
 NameDescription
Public propertyItem Gets the value associated with the specified key.
Top
Methods
 NameDescription
Public methodAdd Adds a key-value pair to the dictionary.
Public methodClear Removes all entries from the dictionary.
Protected methodClearGcedEntries Removes entries whose keys have been garbage collected.
Public methodContains Determines whether the dictionary 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)
Protected methodShouldEntryBeRemoved Determines whether an entry should be removed based on whether its key is alive.
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Public methodTryGetValue Tries to get the value associated with the specified key.
Top
See Also