From b94123fee361c011f1bc087745dcb680807bf362 Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Sun, 19 Oct 2025 15:19:00 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E9=87=8D=E6=9E=84=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../IP2Region.Net/Extensions/ServiceCollectionExtensions.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/binding/csharp/IP2Region.Net/Extensions/ServiceCollectionExtensions.cs b/binding/csharp/IP2Region.Net/Extensions/ServiceCollectionExtensions.cs index 3ef335e..7a2f0f4 100644 --- a/binding/csharp/IP2Region.Net/Extensions/ServiceCollectionExtensions.cs +++ b/binding/csharp/IP2Region.Net/Extensions/ServiceCollectionExtensions.cs @@ -19,9 +19,9 @@ public static class IP2RegionExtensions return new Searcher(cachePolicy, path); }); #if NET8_0_OR_GREATER - services.AddKeyedSingleton("IP2Region.Net", (provider, _) => + services.AddKeyedSingleton("IP2Region.Net", (provider, _) => { - return new Searcher(cachePolicy, path); + return provider.GetRequiredService(); }); #endif