add english readme for c# maker
This commit is contained in:
parent
962335954a
commit
e87f580510
|
|
@ -70,7 +70,7 @@ For API introductions, usage documentation, and test programs, please refer to t
|
|||
| [Golang](maker/golang/README.md) | golang xdb generation program | :white_check_mark: | :white_check_mark: |
|
||||
| [Java](maker/java/README.md) | java xdb generation program | :white_check_mark: | :white_check_mark: |
|
||||
| [Python](maker/python/README.md) | python xdb generation program | :white_check_mark: | :x: |
|
||||
| [Csharp](maker/csharp) | csharp xdb generation program | :white_check_mark: | :x: |
|
||||
| [Csharp](maker/csharp/README.md) | csharp xdb generation program | :white_check_mark: | :x: |
|
||||
| [Rust](maker/rust/README.md) | rust xdb generation program | :white_check_mark: | :white_check_mark: |
|
||||
| [C++](maker/cpp) | C++ xdb generation program | :white_check_mark: | :white_check_mark: |
|
||||
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ API 介绍,使用文档和测试程序请参考如下 `maker` 生成程序下
|
|||
| [Golang](maker/golang/README_zh.md) | golang xdb 生成程序 | :white_check_mark: | :white_check_mark: |
|
||||
| [Java](maker/java/README_zh.md) | java xdb 生成程序 | :white_check_mark: | :white_check_mark: |
|
||||
| [Python](maker/python/README_zh.md) | python xdb 生成程序 | :white_check_mark: | :x: |
|
||||
| [Csharp](maker/csharp) | csharp xdb 生成程序 | :white_check_mark: | :x: |
|
||||
| [Csharp](maker/csharp/README_zh.md) | csharp xdb 生成程序 | :white_check_mark: | :x: |
|
||||
| [Rust](maker/rust/README_zh.md) | rust xdb 生成程序 | :white_check_mark: | :white_check_mark: |
|
||||
| [C++](maker/cpp) | C++ xdb 生成程序 | :white_check_mark: | :white_check_mark: |
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,42 @@
|
|||
:globe_with_meridians: [中文简体](README_zh.md) | [English](README.md)
|
||||
|
||||
# ip2region xdb csharp generation implementation
|
||||
|
||||
# Compilation and Installation
|
||||
|
||||
Compilation environment: [dotnet6.0](https://dotnet.microsoft.com/zh-cn/download/dotnet/6.0)
|
||||
|
||||
```bash
|
||||
# cd to maker/csharp/IP2RegionMaker directory
|
||||
dotnet publish -o ./bin
|
||||
```
|
||||
|
||||
Then you will get a packaged file named IP2RegionMaker.dll in the bin directory of the current folder.
|
||||
|
||||
# `xdb` Data Generation
|
||||
|
||||
Generate the xdb binary file via `dotnet IP2RegionMaker.dll`:
|
||||
|
||||
```bash
|
||||
➜ csharp git:(master) ✗ dotnet IP2RegionMaker.dll
|
||||
ip2region xdb maker
|
||||
dotnet IP2RegionMaker.dll [command options]
|
||||
--src string source ip text file path
|
||||
--dst string destination binary xdb file path
|
||||
```
|
||||
|
||||
For example, using the default data/ipv4_source.txt source data to generate an ip2region_v4.xdb binary file in the current directory:
|
||||
|
||||
```bash
|
||||
➜ csharp git:(master) ✗ dotnet ./IP2RegionMaker/bin/IP2RegionMaker.dll --src=../../data/ipv4_source.txt --dst=./ip2region_v4.xdb
|
||||
# You will see a lot of output; eventually, you will see the following output indicating the run was successful
|
||||
...
|
||||
...
|
||||
...
|
||||
write done, dataBlocks: 13804, indexBlocks: (683591, 720221), indexPtr: (982904, 11065984)
|
||||
Done, elapsed:2.1966620833333335m
|
||||
```
|
||||
|
||||
# Data Query / bench Test
|
||||
|
||||
All [bindings](../../binding/) come with query and bench test programs as well as usage documentation. You can use the searcher of your familiar language for query testing or bench testing to confirm the correctness and integrity of the data.
|
||||
|
|
@ -1,3 +1,5 @@
|
|||
:globe_with_meridians: [中文简体](README_zh.md) | [English](README.md)
|
||||
|
||||
# ip2region xdb csharp 生成实现
|
||||
|
||||
## 编译安装
|
||||
|
|
@ -11,7 +13,7 @@ dotnet publish -o ./bin
|
|||
|
||||
# 数据生成
|
||||
|
||||
通过 `dotnet IP2RegionMaker.dll` 来生成 ip2region.xdb 二进制文件:
|
||||
通过 `dotnet IP2RegionMaker.dll` 来生成 xdb 二进制文件:
|
||||
```bash
|
||||
➜ csharp git:(master) ✗ dotnet IP2RegionMaker.dll
|
||||
ip2region xdb maker
|
||||
|
|
@ -20,9 +22,9 @@ dotnet IP2RegionMaker.dll [command options]
|
|||
--dst string destination binary xdb file path
|
||||
```
|
||||
|
||||
例如,通过默认的 data/ip.merge.txt 原数据,在当前目录生成一个 ip2region.xdb 二进制文件:
|
||||
例如,通过默认的 data/ipv4_source.txt 原数据,在当前目录生成一个 ip2region_v4.xdb 二进制文件:
|
||||
```bash
|
||||
➜ csharp git:(master) ✗ dotnet ./IP2RegionMaker/bin/IP2RegionMaker.dll --src=../../data/ip.merge.txt --dst=./ip2region.xdb
|
||||
➜ csharp git:(master) ✗ dotnet ./IP2RegionMaker/bin/IP2RegionMaker.dll --src=../../data/ipv4_source.txt --dst=./ip2region_v4.xdb
|
||||
# 会看到一堆输出,最终会看到如下输出表示运行成功
|
||||
...
|
||||
...
|
||||
|
|
@ -33,4 +35,4 @@ Done, elapsed:2.1966620833333335m
|
|||
|
||||
# 数据 查询/bench 测试
|
||||
|
||||
已经完成开发的 [binding](../../binding/) 都有查询和 bench 测试程序以及使用文档,你可以使用你熟悉的语言的 searcher 进行查询测试或者bench测试,来确认数据的正确性和完整性。
|
||||
已经完成开发的 [binding](../../binding/) 都有查询和 bench 测试程序以及使用文档,你可以使用你熟悉的语言的 searcher 进行查询测试或者bench测试,来确认数据的正确性和完整性。
|
||||
Loading…
Reference in New Issue