增加遍历和日志记录功能

在 `HashTest` 类中,添加了一个 `foreach` 循环,遍历 `l` 中的所有项,并使用 `XTrace.WriteLine` 输出每个项的键,以增强日志记录功能。
This commit is contained in:
猿人易 2025-03-07 17:27:14 +08:00
parent eb3ca711d3
commit 924229899c
1 changed files with 6 additions and 0 deletions

View File

@ -106,6 +106,12 @@ public class HashTest
Assert.NotNull(hash); Assert.NotNull(hash);
var l = hash as RedisHash<String, String>; var l = hash as RedisHash<String, String>;
foreach(var item in l.GetAll())
{
XTrace.WriteLine(item.Key);
}
l["0"] = "0"; l["0"] = "0";
} }
} }