Class ProviderInfoDictionary<TKey>
- Namespace
- CMS.DataEngine
- Assembly
- CMS.DataEngine.dll
BaseInfo dictionary.
public class ProviderInfoDictionary<TKey> : ProviderDictionary<TKey, BaseInfo>, IProviderDictionary<TKey, BaseInfo>, IProviderDictionary
Type Parameters
TKey
- Inheritance
-
objectProviderDictionary<TKey, BaseInfo>ProviderInfoDictionary<TKey>
- Implements
-
IProviderDictionary<TKey, BaseInfo>
- Inherited Members
- Extension Methods
Remarks
Uses System.StringComparer.InvariantCultureIgnoreCase as default comparer for string types.
Constructors
ProviderInfoDictionary(string, string, IEqualityComparer<TKey>, bool, bool)
Constructor.
public ProviderInfoDictionary(string objectType, string columnNames, IEqualityComparer<TKey> comparer = null, bool allowNulls = false, bool useWeakReferences = false)
Parameters
objectTypestringObject type
columnNamesstringColumn names included in the object key (list of columns separated by semicolon)
comparerIEqualityComparer<TKey>Equality comparer for the items
allowNullsboolIndicates whether null value will be considered as valid and will be cached.
useWeakReferencesboolIndicates whether cache item can be removed from cache in case of insufficient memory.
Methods
Add(TKey, BaseInfo, bool)
Adds the specified object.
public override void Add(TKey key, BaseInfo value, bool logTask)
Parameters
keyTKeyKey to add
valueBaseInfoValue
logTaskboolIf true, web farm task is logged
ConvertKey(object)
Converts the key to a specific type
protected override TKey ConvertKey(object key)
Parameters
keyobjectKey to convert
Returns
- TKey
Exceptions
- InvalidOperationException
Thrown when unsupported type is used.
TryGetInternal(TKey, out BaseInfo)
Returns true if the internal dictionary contains specified record.
protected override bool TryGetInternal(TKey key, out BaseInfo value)
Parameters
keyTKeyKey to check
valueBaseInfoReturns the object value if the object is present
Returns
- bool