From 924229899cf57ad76b66eeaa23b54c7cc2760146 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8C=BF=E4=BA=BA=E6=98=93?= Date: Fri, 7 Mar 2025 17:27:14 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=81=8D=E5=8E=86=E5=92=8C?= =?UTF-8?q?=E6=97=A5=E5=BF=97=E8=AE=B0=E5=BD=95=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 在 `HashTest` 类中,添加了一个 `foreach` 循环,遍历 `l` 中的所有项,并使用 `XTrace.WriteLine` 输出每个项的键,以增强日志记录功能。 --- XUnitTest/HashTest.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/XUnitTest/HashTest.cs b/XUnitTest/HashTest.cs index 88cb531..b0db7e1 100644 --- a/XUnitTest/HashTest.cs +++ b/XUnitTest/HashTest.cs @@ -106,6 +106,12 @@ public class HashTest Assert.NotNull(hash); var l = hash as RedisHash; + + foreach(var item in l.GetAll()) + { + XTrace.WriteLine(item.Key); + } + l["0"] = "0"; } }