IP2Region.Net 2.0.2

dotnet add package IP2Region.Net --version 2.0.2
                    
NuGet\Install-Package IP2Region.Net -Version 2.0.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="IP2Region.Net" Version="2.0.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="IP2Region.Net" Version="2.0.2" />
                    
Directory.Packages.props
<PackageReference Include="IP2Region.Net" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add IP2Region.Net --version 2.0.2
                    
#r "nuget: IP2Region.Net, 2.0.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package IP2Region.Net@2.0.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=IP2Region.Net&version=2.0.2
                    
Install as a Cake Addin
#tool nuget:?package=IP2Region.Net&version=2.0.2
                    
Install as a Cake Tool

IP2Region.Net

.NET client library for IP2Region

Installation

Install the package with NuGet

Install-Package IP2Region.Net

Usage

using IP2Region.Net.Abstractions;
using IP2Region.Net.XDB;

ISearcher searcher = new Searcher(CachePolicy , "your xdb file path");

Cache Policy Description

Cache Policy Description Thread Safe
CachePolicy.Content Cache the entire xdb data. Yes
CachePolicy.VectorIndex Cache vecotorIndex to speed up queries and reduce system io pressure by reducing one fixed IO operation. Yes
CachePolicy.File Completely file-based queries Yes

XDB File Description

Generate using maker, or download pre-generated xdb files

ASP.NET Core Usage

services.AddSingleton<ISearcher>(new Searcher(CachePolicy , "your xdb file path"));

Performance


BenchmarkDotNet=v0.13.2, OS=macOS 13.4.1 (c) (22F770820d) [Darwin 22.5.0]
Apple M1, 1 CPU, 8 logical and 8 physical cores
.NET SDK=7.0.306
  [Host]     : .NET 6.0.20 (6.0.2023.32017), Arm64 RyuJIT AdvSIMD
  DefaultJob : .NET 6.0.20 (6.0.2023.32017), Arm64 RyuJIT AdvSIMD


Method Mean Error StdDev
CachePolicy_Content 155.7 ns 0.46 ns 0.39 ns
CachePolicy_File 2,186.8 ns 34.27 ns 32.06 ns
CachePolicy_VectorIndex 1,570.3 ns 27.53 ns 22.99 ns

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

Apache License 2.0

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 is compatible. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETStandard 2.0

  • .NETStandard 2.1

    • No dependencies.
  • net6.0

    • No dependencies.
  • net7.0

    • No dependencies.

NuGet packages (12)

Showing the top 5 NuGet packages that depend on IP2Region.Net:

Package Downloads
DH.Services

DH框架服务库

Abc.Utils

Abc.Utils 至少NET8.0,Furion 最低NET8.0

Lycoris.Common

常用扩展功能及部分工具类

Anley.DomainDrivenDesign.Contract

Package Description

LINGYUN.Abp.IP2Region

Package Description

GitHub repositories (7)

Showing the top 7 popular GitHub repositories that depend on IP2Region.Net:

Repository Stars
izhaorui/Zr.Admin.NET
🎉ZR.Admin.NET是一款前后端分离的、跨平台基于RBAC的通用权限管理后台。ORM采用SqlSugar。前端采用Vue、AntDesign,支持多租户、缓存、任务调度、支持统一异常处理、接口限流、支持一键生成前后端代码,支持动态国际化翻译(Vue3),等诸多黑科技,代码简洁易懂、易扩展让开发更简单、更通用。
xianhc/ape-volo-admin
.Net 8 、SqlSugar ORM、Vue 2.X、RBAC。前后端分离的开箱则用的企业级的权限开发框架(中后台管理系统)
colinin/abp-next-admin
这是基于vue-vben-admin 模板适用于abp vNext的前端管理项目
dymproject/purest-admin
基于 .NET 8 + vue3 实现的极简RBAC权限管理系统后端 后端基于精简后的abp框架,前端基于vue-pure-admin,前端极强的表格框架vxe-table,旨在打造一款最合适二次开发的极简.Net框架
Redns/North
一个易于搭建的图床服务
DotNet-MoYu/SimpleAdmin
💥一个小而美的通用业务型后台管理系统。采用前后端分离的设计模式,基于RBAC+多机构的权限管理模式,实现接口级别的数据权限控制。集成国密加解密插件,注释详细,文档齐全,让你的开发少走弯路。
aehyok/.NET8.0
net8.0 efcore mysql redis rabbitmq 微服务
Version Downloads Last Updated
2.0.2 88,608 10/2/2023
2.0.1 2,521 7/30/2023
2.0.0 1,491 7/26/2023
1.0.10 18,438 9/7/2022
1.0.6 486 9/7/2022
1.0.5 515 9/7/2022
1.0.4 565 9/7/2022
1.0.3 501 9/7/2022
1.0.2 453 9/6/2022
1.0.1 456 9/6/2022
1.0.0 504 9/6/2022

Please refer to CHANGELOG.md for details