Class Storage<K, T>
Dictionary wrapper for better workflow
Inheritance
System.Object
System.Collections.Concurrent.ConcurrentDictionary<K, T>
Storage<K, T>
Implements
System.Collections.Generic.IDictionary<K, T>
System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<K, T>>
System.Collections.Generic.IReadOnlyDictionary<K, T>
System.Collections.Generic.IReadOnlyCollection<System.Collections.Generic.KeyValuePair<K, T>>
System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<K, T>>
System.Collections.IDictionary
System.Collections.ICollection
System.Collections.IEnumerable
Inherited Members
System.Collections.Concurrent.ConcurrentDictionary<K, T>.System.Collections.IDictionary.get_Item(System.Object)
System.Collections.Concurrent.ConcurrentDictionary<K, T>.System.Collections.IDictionary.set_Item(System.Object, System.Object)
System.Collections.Concurrent.ConcurrentDictionary<K, T>.AddOrUpdate(K, System.Func<K, T>, System.Func<K, T, T>)
System.Collections.Concurrent.ConcurrentDictionary<K, T>.AddOrUpdate(K, T, System.Func<K, T, T>)
System.Collections.Concurrent.ConcurrentDictionary<K, T>.AddOrUpdate<TArg>(K, System.Func<K, TArg, T>, System.Func<K, T, TArg, T>, TArg)
System.Collections.Concurrent.ConcurrentDictionary<K, T>.Clear()
System.Collections.Concurrent.ConcurrentDictionary<K, T>.ContainsKey(K)
System.Collections.Concurrent.ConcurrentDictionary<K, T>.GetEnumerator()
System.Collections.Concurrent.ConcurrentDictionary<K, T>.GetOrAdd(K, System.Func<K, T>)
System.Collections.Concurrent.ConcurrentDictionary<K, T>.GetOrAdd(K, T)
System.Collections.Concurrent.ConcurrentDictionary<K, T>.GetOrAdd<TArg>(K, System.Func<K, TArg, T>, TArg)
System.Collections.Concurrent.ConcurrentDictionary<K, T>.System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<K, T>>.Add(System.Collections.Generic.KeyValuePair<K, T>)
System.Collections.Concurrent.ConcurrentDictionary<K, T>.System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<K, T>>.Contains(System.Collections.Generic.KeyValuePair<K, T>)
System.Collections.Concurrent.ConcurrentDictionary<K, T>.System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<K, T>>.CopyTo(System.Collections.Generic.KeyValuePair<K, T>[], System.Int32)
System.Collections.Concurrent.ConcurrentDictionary<K, T>.System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<K, T>>.Remove(System.Collections.Generic.KeyValuePair<K, T>)
System.Collections.Concurrent.ConcurrentDictionary<K, T>.System.Collections.Generic.IDictionary<K, T>.Add(K, T)
System.Collections.Concurrent.ConcurrentDictionary<K, T>.System.Collections.Generic.IDictionary<K, T>.Remove(K)
System.Collections.Concurrent.ConcurrentDictionary<K, T>.System.Collections.ICollection.CopyTo(System.Array, System.Int32)
System.Collections.Concurrent.ConcurrentDictionary<K, T>.System.Collections.IDictionary.Add(System.Object, System.Object)
System.Collections.Concurrent.ConcurrentDictionary<K, T>.System.Collections.IDictionary.Contains(System.Object)
System.Collections.Concurrent.ConcurrentDictionary<K, T>.System.Collections.IDictionary.GetEnumerator()
System.Collections.Concurrent.ConcurrentDictionary<K, T>.System.Collections.IDictionary.Remove(System.Object)
System.Collections.Concurrent.ConcurrentDictionary<K, T>.System.Collections.IEnumerable.GetEnumerator()
System.Collections.Concurrent.ConcurrentDictionary<K, T>.ToArray()
System.Collections.Concurrent.ConcurrentDictionary<K, T>.TryAdd(K, T)
System.Collections.Concurrent.ConcurrentDictionary<K, T>.TryGetValue(K, T)
System.Collections.Concurrent.ConcurrentDictionary<K, T>.TryRemove(System.Collections.Generic.KeyValuePair<K, T>)
System.Collections.Concurrent.ConcurrentDictionary<K, T>.TryRemove(K, T)
System.Collections.Concurrent.ConcurrentDictionary<K, T>.TryUpdate(K, T, T)
System.Collections.Concurrent.ConcurrentDictionary<K, T>.Comparer
System.Collections.Concurrent.ConcurrentDictionary<K, T>.Count
System.Collections.Concurrent.ConcurrentDictionary<K, T>.IsEmpty
System.Collections.Concurrent.ConcurrentDictionary<K, T>.Item[K]
System.Collections.Concurrent.ConcurrentDictionary<K, T>.Keys
System.Collections.Concurrent.ConcurrentDictionary<K, T>.System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<K, T>>.IsReadOnly
System.Collections.Concurrent.ConcurrentDictionary<K, T>.System.Collections.Generic.IReadOnlyDictionary<K, T>.Keys
System.Collections.Concurrent.ConcurrentDictionary<K, T>.System.Collections.Generic.IReadOnlyDictionary<K, T>.Values
System.Collections.Concurrent.ConcurrentDictionary<K, T>.System.Collections.ICollection.IsSynchronized
System.Collections.Concurrent.ConcurrentDictionary<K, T>.System.Collections.ICollection.SyncRoot
System.Collections.Concurrent.ConcurrentDictionary<K, T>.System.Collections.IDictionary.IsFixedSize
System.Collections.Concurrent.ConcurrentDictionary<K, T>.System.Collections.IDictionary.IsReadOnly
System.Collections.Concurrent.ConcurrentDictionary<K, T>.System.Collections.IDictionary.Item[System.Object]
System.Collections.Concurrent.ConcurrentDictionary<K, T>.System.Collections.IDictionary.Keys
System.Collections.Concurrent.ConcurrentDictionary<K, T>.System.Collections.IDictionary.Values
System.Collections.Concurrent.ConcurrentDictionary<K, T>.Values
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Oasys.Common.Tools
Assembly: Oasys.Common.dll
Syntax
public class Storage<K, T> : ConcurrentDictionary<K, T>, IDictionary<K, T>, ICollection<KeyValuePair<K, T>>, IReadOnlyDictionary<K, T>, IReadOnlyCollection<KeyValuePair<K, T>>, IEnumerable<KeyValuePair<K, T>>, IDictionary, ICollection, IEnumerable
Type Parameters
Name | Description |
---|---|
K | |
T |
Constructors
Storage()
Declaration
public Storage()
Storage(Dictionary<K, T>)
Declaration
public Storage(Dictionary<K, T> data)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.Dictionary<K, T> | data |
Properties
Item[K]
Declaration
public T this[K key] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
K | key |
Property Value
Type | Description |
---|---|
T |
Methods
Contains(K)
Declaration
public bool Contains(K key)
Parameters
Type | Name | Description |
---|---|---|
K | key |
Returns
Type | Description |
---|---|
System.Boolean |
Find(Storage<K, T>.FindCallback)
Declaration
public T[] Find(Storage<K, T>.FindCallback callback)
Parameters
Type | Name | Description |
---|---|---|
Storage.FindCallback<> | callback |
Returns
Type | Description |
---|---|
T[] |
FindOne(Storage<K, T>.FindCallback)
Declaration
public T FindOne(Storage<K, T>.FindCallback callback)
Parameters
Type | Name | Description |
---|---|---|
Storage.FindCallback<> | callback |
Returns
Type | Description |
---|---|
T |
ForEach(Storage<K, T>.IterationItemCallback)
Declaration
public void ForEach(Storage<K, T>.IterationItemCallback callback)
Parameters
Type | Name | Description |
---|---|---|
Storage.IterationItemCallback<> | callback |
ForEach(Storage<K, T>.IterationKeyValueCallback)
Declaration
public void ForEach(Storage<K, T>.IterationKeyValueCallback callback)
Parameters
Type | Name | Description |
---|---|---|
Storage.IterationKeyValueCallback<> | callback |
Get(K)
Declaration
public T Get(K key)
Parameters
Type | Name | Description |
---|---|---|
K | key |
Returns
Type | Description |
---|---|
T |
GetKeys()
Declaration
public List<K> GetKeys()
Returns
Type | Description |
---|---|
System.Collections.Generic.List<K> |
GetValues()
Declaration
public List<T> GetValues()
Returns
Type | Description |
---|---|
System.Collections.Generic.List<T> |
Remove(K)
Declaration
public void Remove(K key)
Parameters
Type | Name | Description |
---|---|---|
K | key |
Remove(Storage<K, T>.FindCallback)
Declaration
public int Remove(Storage<K, T>.FindCallback callback)
Parameters
Type | Name | Description |
---|---|---|
Storage.FindCallback<> | callback |
Returns
Type | Description |
---|---|
System.Int32 |
Set(K, T)
Declaration
public void Set(K key, T value)
Parameters
Type | Name | Description |
---|---|---|
K | key | |
T | value |
Implements
System.Collections.Generic.IDictionary<TKey, TValue>
System.Collections.Generic.ICollection<T>
System.Collections.Generic.IReadOnlyDictionary<TKey, TValue>
System.Collections.Generic.IReadOnlyCollection<T>
System.Collections.Generic.IEnumerable<T>
System.Collections.IDictionary
System.Collections.ICollection
System.Collections.IEnumerable