Class AbpDictionaryExtensions
Inheritance
object
AbpDictionaryExtensions
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: System.System.Collections.Generic
Assembly: Volo.Abp.Core.dll
Syntax
public static class AbpDictionaryExtensions
Methods
ConvertToDynamicObject(Dictionary<string, object>)
Declaration
public static dynamic ConvertToDynamicObject(this Dictionary<string, object> dictionary)
Parameters
Type |
Name |
Description |
System.Collections.Generic.Dictionary<TKey, TValue><string, object> |
dictionary |
|
Returns
GetOrAdd<TKey, TValue>(ConcurrentDictionary<TKey, TValue>, TKey, Func<TValue>)
Declaration
public static TValue GetOrAdd<TKey, TValue>(this ConcurrentDictionary<TKey, TValue> dictionary, TKey key, Func<TValue> factory) where TKey : notnull
Parameters
Type |
Name |
Description |
System.Collections.Concurrent.ConcurrentDictionary<TKey, TValue><TKey, TValue> |
dictionary |
|
TKey |
key |
|
System.Func<TResult><TValue> |
factory |
|
Returns
Type Parameters
Name |
Description |
TKey |
|
TValue |
|
GetOrAdd<TKey, TValue>(IDictionary<TKey, TValue>, TKey, Func<TKey, TValue>)
Declaration
public static TValue GetOrAdd<TKey, TValue>(this IDictionary<TKey, TValue> dictionary, TKey key, Func<TKey, TValue> factory)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IDictionary<TKey, TValue><TKey, TValue> |
dictionary |
|
TKey |
key |
|
System.Func<T, TResult><TKey, TValue> |
factory |
|
Returns
Type Parameters
Name |
Description |
TKey |
|
TValue |
|
GetOrAdd<TKey, TValue>(IDictionary<TKey, TValue>, TKey, Func<TValue>)
Declaration
public static TValue GetOrAdd<TKey, TValue>(this IDictionary<TKey, TValue> dictionary, TKey key, Func<TValue> factory)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IDictionary<TKey, TValue><TKey, TValue> |
dictionary |
|
TKey |
key |
|
System.Func<TResult><TValue> |
factory |
|
Returns
Type Parameters
Name |
Description |
TKey |
|
TValue |
|
GetOrDefault<TKey, TValue>(ConcurrentDictionary<TKey, TValue>, TKey)
Declaration
public static TValue? GetOrDefault<TKey, TValue>(this ConcurrentDictionary<TKey, TValue> dictionary, TKey key) where TKey : notnull
Parameters
Type |
Name |
Description |
System.Collections.Concurrent.ConcurrentDictionary<TKey, TValue><TKey, TValue> |
dictionary |
|
TKey |
key |
|
Returns
Type Parameters
Name |
Description |
TKey |
|
TValue |
|
GetOrDefault<TKey, TValue>(Dictionary<TKey, TValue>, TKey)
Declaration
public static TValue? GetOrDefault<TKey, TValue>(this Dictionary<TKey, TValue> dictionary, TKey key) where TKey : notnull
Parameters
Type |
Name |
Description |
System.Collections.Generic.Dictionary<TKey, TValue><TKey, TValue> |
dictionary |
|
TKey |
key |
|
Returns
Type Parameters
Name |
Description |
TKey |
|
TValue |
|
GetOrDefault<TKey, TValue>(IDictionary<TKey, TValue>, TKey)
Declaration
public static TValue? GetOrDefault<TKey, TValue>(this IDictionary<TKey, TValue> dictionary, TKey key)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IDictionary<TKey, TValue><TKey, TValue> |
dictionary |
|
TKey |
key |
|
Returns
Type Parameters
Name |
Description |
TKey |
|
TValue |
|
GetOrDefault<TKey, TValue>(IReadOnlyDictionary<TKey, TValue>, TKey)
Declaration
public static TValue? GetOrDefault<TKey, TValue>(this IReadOnlyDictionary<TKey, TValue> dictionary, TKey key)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IReadOnlyDictionary<TKey, TValue><TKey, TValue> |
dictionary |
|
TKey |
key |
|
Returns
Type Parameters
Name |
Description |
TKey |
|
TValue |
|