一款简单易用的基础网络通讯组件库。

CollectionsExtension 类

CollectionsExtension

Definition

命名空间: TouchSocket.Core
程序集: TouchSocket.Core (在 TouchSocket.Core.dll 中) 版本:3.0.0+ccaf96084d09f972257496d1dd63b8ba3c1e44f0
C#
public static class CollectionsExtension
Inheritance
Object    CollectionsExtension

方法

AddOrUpdateTKey, TValue(ConcurrentDictionaryTKey, TValue, TKey, TValue) 向 ConcurrentDictionary 中添加键值对,如果键已存在,则更新其值。
AddOrUpdateTKey, TValue(DictionaryTKey, TValue, TKey, TValue) 向字典中添加或更新指定键的值。
ClearT 清空并发队列并执行指定操作。
ForEachT 循环遍历每个元素,执行Action动作
ForEachAsyncT 循环遍历每个元素,执行异步动作
GetValueTKey, TValue 获取字典中与指定键关联的值。
RemoveWhenTKey, TValue 移除满足条件的项目。

参见