Show / Hide Table of Contents

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.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
Dictionary<string, object> dictionary
Returns
Type Description
dynamic

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
ConcurrentDictionary<TKey, TValue> dictionary
TKey key
Func<TValue> factory
Returns
Type Description
TValue
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
IDictionary<TKey, TValue> dictionary
TKey key
Func<TKey, TValue> factory
Returns
Type Description
TValue
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
IDictionary<TKey, TValue> dictionary
TKey key
Func<TValue> factory
Returns
Type Description
TValue
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
ConcurrentDictionary<TKey, TValue> dictionary
TKey key
Returns
Type Description
TValue
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
Dictionary<TKey, TValue> dictionary
TKey key
Returns
Type Description
TValue
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
IDictionary<TKey, TValue> dictionary
TKey key
Returns
Type Description
TValue
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
IReadOnlyDictionary<TKey, TValue> dictionary
TKey key
Returns
Type Description
TValue
Type Parameters
Name Description
TKey
TValue
In this article
Back to top Powered by ABP.IO Platform