FabinatorParser 1.0.1
dotnet add package FabinatorParser --version 1.0.1
NuGet\Install-Package FabinatorParser -Version 1.0.1
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="FabinatorParser" Version="1.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="FabinatorParser" Version="1.0.1" />
<PackageReference Include="FabinatorParser" />
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 FabinatorParser --version 1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: FabinatorParser, 1.0.1"
#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 FabinatorParser@1.0.1
#: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=FabinatorParser&version=1.0.1
#tool nuget:?package=FabinatorParser&version=1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
FabinatorParser
FabinatorParser 是一个面向 .NET 10 的 Fabinator 地图文件解析库,支持解析 DAT、FAB、FBF 和 NMP 文件,并将结果转换为节点、站台、轨道和轨道段等地图领域模型。
安装
dotnet add package FabinatorParser --version 1.0.1
支持的格式
| 扩展名 | 说明 |
|---|---|
.nmp |
节点、站台及连接关系配置 |
.fbf |
地图图形、坐标、轨道及轨道段数据 |
.dat |
Fabinator DAT 数据 |
.fab |
Fabinator FAB 数据 |
基本用法
using FabinatorParser.Implement;
using FabinatorParser.Models;
var factory = new FabinatorParserFactory();
lock (MapInfo.Instance.Lock)
{
try
{
// FBF 解析依赖 NMP 创建的节点和站台连接关系。
factory.CreateParser("demo2.nmp").Parser();
factory.CreateParser("demo2.fbf").Parser();
MapInfo.Instance.TrackSegmentSort();
var nodes = MapInfo.Instance.Nodes;
var tracks = MapInfo.Instance.Tracks;
var svg = MapInfo.Instance.ToSvg();
}
finally
{
MapInfo.Instance.Reset();
}
}
解析 NMP 与 FBF 组合地图时,必须先解析 NMP,再解析 FBF。MapInfo.Instance 是共享的解析聚合根;并发调用时应使用其 Lock 串行执行,并在任务完成后调用 Reset() 清理状态。
许可证
本项目使用 MIT License。
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- INIParser (>= 1.0.4)
- Newtonsoft.Json (>= 13.0.4)
- Serilog (>= 4.3.0)
- Serilog.Sinks.Async (>= 2.1.0)
- Serilog.Sinks.Console (>= 6.1.1)
- Serilog.Sinks.File (>= 7.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.1 | 34 | 8/31/2026 |
V1.0.1:首个 NuGet 发布版本。