From 53665b5dbeb387962b40de9f1dd19838936d14c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BE=E5=B0=8F=E5=83=A7?= Date: Thu, 15 Aug 2024 10:51:27 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=98=8A=20=E4=BF=AE=E5=A4=8D=20=E6=97=A5?= =?UTF-8?q?=E5=BF=97=E4=B8=8A=E4=B8=8B=E6=96=87=E5=AD=97=E5=85=B8=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=20`ContainsKey`=20=E6=9C=89=E7=BA=BF=E7=A8=8B?= =?UTF-8?q?=E5=AE=89=E5=85=A8=E9=97=AE=E9=A2=98=E5=AF=BC=E8=87=B4=E5=87=BA?= =?UTF-8?q?=E7=8E=B0=E9=87=8D=E5=A4=8D=20`Key`=20=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Furion.Pure/Logging/Extensions/LogContextExtensions.cs | 2 +- framework/Furion/Logging/Extensions/LogContextExtensions.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/framework/Furion.Pure/Logging/Extensions/LogContextExtensions.cs b/framework/Furion.Pure/Logging/Extensions/LogContextExtensions.cs index 06bb8ef364a..d794975bdfc 100644 --- a/framework/Furion.Pure/Logging/Extensions/LogContextExtensions.cs +++ b/framework/Furion.Pure/Logging/Extensions/LogContextExtensions.cs @@ -46,7 +46,7 @@ public static LogContext Set(this LogContext logContext, object key, object valu logContext.Properties ??= new Dictionary(); - if (logContext.Properties.ContainsKey(key)) logContext.Properties.Remove(key); + logContext.Properties.Remove(key); logContext.Properties.Add(key, value); return logContext; } diff --git a/framework/Furion/Logging/Extensions/LogContextExtensions.cs b/framework/Furion/Logging/Extensions/LogContextExtensions.cs index 06bb8ef364a..d794975bdfc 100644 --- a/framework/Furion/Logging/Extensions/LogContextExtensions.cs +++ b/framework/Furion/Logging/Extensions/LogContextExtensions.cs @@ -46,7 +46,7 @@ public static LogContext Set(this LogContext logContext, object key, object valu logContext.Properties ??= new Dictionary(); - if (logContext.Properties.ContainsKey(key)) logContext.Properties.Remove(key); + logContext.Properties.Remove(key); logContext.Properties.Add(key, value); return logContext; }