IP2Region.Net
2.0.2
.NET 6.0
This package targets .NET 6.0. The package is compatible with this framework or higher.
.NET Standard 2.0
This package targets .NET Standard 2.0. The package is compatible with this framework or higher.
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.
paket add IP2Region.Net --version 2.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#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.
// Install IP2Region.Net as a Cake Addin #addin nuget:?package=IP2Region.Net&version=2.0.2 // Install IP2Region.Net as a Cake Tool #tool nuget:?package=IP2Region.Net&version=2.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
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
Product | Versions 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. |
.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
- System.Buffers (>= 4.5.1)
- System.Memory (>= 4.5.5)
-
.NETStandard 2.1
- No dependencies.
-
net6.0
- No dependencies.
-
net7.0
- No dependencies.
NuGet packages (8)
Showing the top 5 NuGet packages that depend on IP2Region.Net:
Package | Downloads |
---|---|
DH.Services
DH框架服务库 |
|
ZhonTai.Admin
中台Admin权限管理接口库 |
|
Abc.Utils
Abc.Utils |
|
IGeekFan.FreeKit.Infrastructure
基础包功能模块 |
|
LINGYUN.Abp.IP2Region
Package Description |
GitHub repositories (6)
Showing the top 5 popular GitHub repositories that depend on IP2Region.Net:
Repository | Stars |
---|---|
izhaorui/Zr.Admin.NET
🎉ZR.Admin.NET是一款前后端分离的、跨平台基于RBAC的通用权限管理后台。ORM采用SqlSugar。前端采用Vue、AntDesign,支持多租户、缓存、任务调度、支持统一异常处理、接口限流、支持一键生成前后端代码,支持动态国际化翻译(Vue3),等诸多黑科技,代码简洁易懂、易扩展让开发更简单、更通用。
|
|
colinin/abp-next-admin
这是基于vue-vben-admin 模板适用于abp Vnext的前端管理项目
|
|
xianhc/apevolo-api
.Net 8 、SqlSugar ORM、Vue 2.X、RBAC、前后端分离的开箱则用的企业级中后台权限管理系统
|
|
dymproject/purest-admin
基于 .NET 8 + vue3 实现的极简RBAC权限管理系统后端 后端基于精简后的abp框架,前端基于vue-pure-admin,前端极强的表格框架vxe-table,旨在打造一款最合适二次开发的极简.Net框架
|
|
Redns/North
一个易于搭建的图床服务
|
Please refer to CHANGELOG.md for details