Click or drag to resize
SafeDictionaryTKey, TValue Class
Thread safe dictionary template.
Inheritance Hierarchy

Namespace: CMS.Base
Assembly: CMS.Base (in CMS.Base.dll) Version: 8.2.23
Syntax
C#
[SerializableAttribute]
public class SafeDictionary<TKey, TValue> : Hashtable, 
	ICloneThreadItem, IXmlSerializable, IGeneralIndexable<TKey, TValue>, IGeneralIndexable

Type Parameters

TKey
Key type
TValue
Value type

The SafeDictionaryTKey, TValue type exposes the following members.

Constructors
Methods
  NameDescription
Public methodAdd
Adds the value to the dictionary
(Overrides HashtableAdd(Object, Object).)
Public methodAddMultiple
Adds multiple items with same value to the dictionary
Public methodClear
Removes all elements from the System.Collections.Hashtable.
(Overrides HashtableClear.)
Public methodCloneForNewThread
Clones the object for new thread
Public methodContains
Returns true if the dictionary contains the given key
(Overrides HashtableContains(Object).)
Public methodContainsKey
Returns true if the dictionary contains the given key
(Overrides HashtableContainsKey(Object).)
Public methodContainsValue
Returns true if the dictionary contains the given value
(Overrides HashtableContainsValue(Object).)
Public methodCopyTo
Copies the System.Collections.Hashtable elements to a one-dimensional System.Array instance at the specified index.
(Overrides HashtableCopyTo(Array, Int32).)
Protected methodGetInternalValue
Gets the value from the internal dictionary
Public methodGetObjectData
Object serialization.
(Overrides HashtableGetObjectData(SerializationInfo, StreamingContext).)
Public methodGetRealCount
Gets the real count of the objects in the dictionary
Public methodRemove
Removes the element with the specified key from the System.Collections.Hashtable.
(Overrides HashtableRemove(Object).)
Protected methodSetInternalValue
Sets the value in the internal dictionary
Public methodTryGetValue
Tries to get the value, returns true if the retrieval was successful.
Top
Extension Methods
  NameDescription
Public Extension MethodAsIndexableTKey, TValue
Implicit conversion to indexable type with a specific values
(Defined by DataExtensions.)
Public Extension MethodAsValue
Converts object to a query value which can be used as a query parameter
(Defined by QueryExtensions.)
Public Extension MethodGetAPIString
Gets the string by the specified resource key
(Defined by CoreExtensions.)
Public Extension MethodGetString
Gets the string by the specified resource key
(Defined by CoreExtensions.)
Public Extension MethodToBoolean
Returns the boolean representation of an object or default value if not.
(Defined by CoreExtensions.)
Public Extension MethodToDateTime
Returns the DateTime representation of an object or default value if not.
(Defined by CoreExtensions.)
Public Extension MethodToDouble
Returns the double representation of an object or default value if not.
(Defined by CoreExtensions.)
Public Extension MethodToGuid
Returns the Guid representation of an object or default value if not.
(Defined by CoreExtensions.)
Public Extension MethodToInteger
Returns the integer representation of an object or default value if not.
(Defined by CoreExtensions.)
Public Extension MethodToString
Returns the string representation of an object or default value if not.
(Defined by CoreExtensions.)
Top
Fields
  NameDescription
Protected fieldmDefaultValue
Default value.
Protected fieldmNullValue
Null value.
Protected fieldmUseWeakReferences
If true, the weak references are used for the items so the memory can be cleared upon request
Top
Properties
  NameDescription
Public propertyAllowNulls
If true, the dictionary allows null values as valid.
Public propertyCopyToNewThread
If true, the dictionary is copied (not cloned) to a new thread
Public propertyDefaultValue
Default value.
Public propertyIsEmpty
Returns true if the dictionary is empty
Public propertyIsSynchronized
Returns true if dictionary is synchronized.
(Overrides HashtableIsSynchronized.)
Public propertyItem
Items indexer. Gets or sets the value in the dictionary.
Public propertyKeys
Gets an Collection containing the keys in the System.Collections.Hashtable.
(Overrides HashtableKeys.)
Public propertyNullValue
Null value.
Public propertyTypedKeys
Gets a typed collection of keys in this dictionary
Public propertyTypedValues
Gets a typed collection of values in this dictionary
Public propertyUseWeakReferences
If true, the weak references are used for the items so the memory can be cleared upon request
Public propertyValues
Gets an Collection containing the values in the System.Collections.Hashtable.
(Overrides HashtableValues.)
Top
See Also