• Share
    • Twitter
    • LinkedIn
    • Facebook
    • Email
  • Feedback
  • Improve this Doc

Class SharedDictionary<TKey, TValue>

An implementation designed to be shared across threads.

Inheritance
System.Object
SharedDictionary<TKey, TValue>
Implements
IDisposable
Namespace: DotNetNuke.Collections.Internal
Assembly: DotNetNuke.dll
Syntax
public class SharedDictionary<TKey, TValue> : IDictionary<TKey, TValue>
Type Parameters
Name Description
TKey

The type of the key.

TValue

The type of the value.

Constructors

| Improve this Doc View Source

SharedDictionary()

Initializes a new instance of the SharedDictionary<TKey, TValue> class.

Declaration
public SharedDictionary()
| Improve this Doc View Source

SharedDictionary(ILockStrategy)

Initializes a new instance of the SharedDictionary<TKey, TValue> class.

Declaration
public SharedDictionary(ILockStrategy lockStrategy)
Parameters
Type Name Description
ILockStrategy lockStrategy

The locking strategy to use.

| Improve this Doc View Source

SharedDictionary(LockingStrategy)

Initializes a new instance of the SharedDictionary<TKey, TValue> class.

Declaration
public SharedDictionary(LockingStrategy strategy)
Parameters
Type Name Description
LockingStrategy strategy

The locking strategy to use.

Properties

| Improve this Doc View Source

Count

An implementation designed to be shared across threads.

Declaration
public int Count { get; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

IsReadOnly

An implementation designed to be shared across threads.

Declaration
public bool IsReadOnly { get; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

Item[TKey]

An implementation designed to be shared across threads.

Declaration
public TValue this[TKey key] { get; set; }
Parameters
Type Name Description
TKey key
Property Value
Type Description
TValue
| Improve this Doc View Source

Keys

An implementation designed to be shared across threads.

Declaration
public ICollection<TKey> Keys { get; }
Property Value
Type Description
ICollection<TKey>
| Improve this Doc View Source

Values

An implementation designed to be shared across threads.

Declaration
public ICollection<TValue> Values { get; }
Property Value
Type Description
ICollection<TValue>

Methods

| Improve this Doc View Source

Add(TKey, TValue)

An implementation designed to be shared across threads.

Declaration
public void Add(TKey key, TValue value)
Parameters
Type Name Description
TKey key
TValue value
| Improve this Doc View Source

Add(KeyValuePair<TKey, TValue>)

An implementation designed to be shared across threads.

Declaration
public void Add(KeyValuePair<TKey, TValue> item)
Parameters
Type Name Description
KeyValuePair<TKey, TValue> item
| Improve this Doc View Source

Clear()

An implementation designed to be shared across threads.

Declaration
public void Clear()
| Improve this Doc View Source

Contains(KeyValuePair<TKey, TValue>)

An implementation designed to be shared across threads.

Declaration
public bool Contains(KeyValuePair<TKey, TValue> item)
Parameters
Type Name Description
KeyValuePair<TKey, TValue> item
Returns
Type Description
System.Boolean
| Improve this Doc View Source

ContainsKey(TKey)

An implementation designed to be shared across threads.

Declaration
public bool ContainsKey(TKey key)
Parameters
Type Name Description
TKey key
Returns
Type Description
System.Boolean
| Improve this Doc View Source

CopyTo(KeyValuePair<TKey, TValue>[], Int32)

An implementation designed to be shared across threads.

Declaration
public void CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex)
Parameters
Type Name Description
KeyValuePair<TKey, TValue>[] array
System.Int32 arrayIndex
| Improve this Doc View Source

Dispose()

An implementation designed to be shared across threads.

Declaration
public void Dispose()
| Improve this Doc View Source

Dispose(Boolean)

Disposes this instance resources.

Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type Name Description
System.Boolean disposing

A value indicating whether this instance is currently disposing.

| Improve this Doc View Source

Finalize()

Finalizes an instance of the SharedDictionary<TKey, TValue> class.

Declaration
protected void Finalize()
| Improve this Doc View Source

GetEnumerator()

An implementation designed to be shared across threads.

Declaration
public IEnumerator GetEnumerator()
Returns
Type Description
IEnumerator
| Improve this Doc View Source

GetReadLock()

Gets a read lock.

Declaration
public ISharedCollectionLock GetReadLock()
Returns
Type Description
ISharedCollectionLock

An ISharedCollectionLock instance.

| Improve this Doc View Source

GetReadLock(Int32)

Gets a read lock for a specified amount of time.

Declaration
public ISharedCollectionLock GetReadLock(int millisecondTimeout)
Parameters
Type Name Description
System.Int32 millisecondTimeout

For how many milliseconds to lock for.

Returns
Type Description
ISharedCollectionLock

An ISharedCollectionLock instance.

| Improve this Doc View Source

GetReadLock(TimeSpan)

Gets a read lock for a specified amount of time.

Declaration
public ISharedCollectionLock GetReadLock(TimeSpan timeOut)
Parameters
Type Name Description
TimeSpan timeOut

The amount of time to lock for.

Returns
Type Description
ISharedCollectionLock

An ISharedCollectionLock instance.

| Improve this Doc View Source

GetWriteLock()

Gets a write lock.

Declaration
public ISharedCollectionLock GetWriteLock()
Returns
Type Description
ISharedCollectionLock

An ISharedCollectionLock instance.

| Improve this Doc View Source

GetWriteLock(Int32)

Gets a write lock for the specified amount of time.

Declaration
public ISharedCollectionLock GetWriteLock(int millisecondTimeout)
Parameters
Type Name Description
System.Int32 millisecondTimeout

The amount of milliseconds to lock for.

Returns
Type Description
ISharedCollectionLock

An ISharedCollectionLock instance.

| Improve this Doc View Source

GetWriteLock(TimeSpan)

Gets a write lock for the specified amount of time.

Declaration
public ISharedCollectionLock GetWriteLock(TimeSpan timeOut)
Parameters
Type Name Description
TimeSpan timeOut

The amount of time to lock for.

Returns
Type Description
ISharedCollectionLock

An ISharedCollectionLock instance.

| Improve this Doc View Source

IEnumerable_GetEnumerator()

Returns an enumerator to iterate through the collection.

Declaration
public IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable_GetEnumerator()
Returns
Type Description
IEnumerator<KeyValuePair<TKey, TValue>>

An enumerator that can be used to iterate through the collection.

| Improve this Doc View Source

Remove(TKey)

An implementation designed to be shared across threads.

Declaration
public bool Remove(TKey key)
Parameters
Type Name Description
TKey key
Returns
Type Description
System.Boolean
| Improve this Doc View Source

Remove(KeyValuePair<TKey, TValue>)

An implementation designed to be shared across threads.

Declaration
public bool Remove(KeyValuePair<TKey, TValue> item)
Parameters
Type Name Description
KeyValuePair<TKey, TValue> item
Returns
Type Description
System.Boolean
| Improve this Doc View Source

TryGetValue(TKey, out TValue)

An implementation designed to be shared across threads.

Declaration
public bool TryGetValue(TKey key, out TValue value)
Parameters
Type Name Description
TKey key
TValue value
Returns
Type Description
System.Boolean

Implements

IDisposable

Extension Methods

JsonExtensionsWeb.ToJson(Object)
  • View Source
Back to top by the community, for the community... #DNNCMS