File tree Expand file tree Collapse file tree
src/components/BootstrapBlazor.IP2Region/Extensions Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- // Copyright (c) Argo Zhang (argo@163.com ). All rights reserved.
1+ // Copyright (c) BootstrapBlazor & Argo Zhang (argo@live.ca ). All rights reserved.
22// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
33// Website: https://www.blazor.zone or https://argozhang.github.io/
44
@@ -18,9 +18,9 @@ public static class BootstrapBlazoIP2RegionExtensions
1818 /// <param name="services"></param>
1919 public static IServiceCollection AddBootstrapBlazorIP2RegionService ( this IServiceCollection services )
2020 {
21- services . TryAddSingleton < IIpLocatorProvider , IP2RegionService > ( ) ;
21+ services . AddSingleton < IIpLocatorProvider , IP2RegionService > ( ) ;
2222#if NET8_0_OR_GREATER
23- services . TryAddKeyedSingleton < IIpLocatorProvider , IP2RegionService > ( "BootstrapBlazor.IP2Region" ) ;
23+ services . AddKeyedSingleton < IIpLocatorProvider , IP2RegionService > ( "BootstrapBlazor.IP2Region" ) ;
2424#endif
2525
2626 services . AddOptionsMonitor < IP2RegionOptions > ( ) ;
You can’t perform that action at this time.
0 commit comments