docs: add XML comments for Metadata query APIs and document models#6
Open
mrbbbaixue wants to merge 1 commit intocsharp-linqfrom
Open
docs: add XML comments for Metadata query APIs and document models#6mrbbbaixue wants to merge 1 commit intocsharp-linqfrom
mrbbbaixue wants to merge 1 commit intocsharp-linqfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
metadata.Mods()/metadata.Catalog()等表达式而不用反复阅读实现细节。Metadata中叶子节点文本值语义,避免调用方误用并为序列化/反序列化场景提供可用的树形结构和业务实体快照。Description
Ra3.BattleNet.Metadata/MetadataModels.cs(MetadataNode、BusinessEntity)以说明字段与语义。Ra3.BattleNet.Metadata/MetadataQueryModels.cs(MetadataCatalog、ModEntry、ApplicationEntry、PackageEntry、MarkdownEntry、ImageEntry)。Ra3.BattleNet.Metadata/MetadataQueryExtensions.cs,提供Catalog()、Mods()、Applications()、Markdowns()、Images()等便捷 API 及映射辅助方法(ToMod/ToApplication/ReadPackages)。Ra3.BattleNet.Metadata/Metadata.cs中保存并导出叶子节点值(新增_value字段与Value属性),并增加ToNodeTree()、GetBusinessEntities()、CollectEntityProperties()、BuildNode()、GetAllNodes()等辅助方法以导出树形MetadataNode与归一化的BusinessEntity列表。Program.cs增加示例输出,打印业务实体概览以及metadata.Mods()示例;在USAGE_EXAMPLE.md新增“场景0”示例;并在测试项目Ra3.BattleNet.Metadata.Tests/MetadataTests.cs中新增覆盖ToNodeTree、GetBusinessEntities、Mods、Catalog的单元测试。Testing
ToNodeTree_ShouldKeepLeafValue、GetBusinessEntities_ShouldReturnTypedEntities、Mods_ShouldExposeVersionAndPackages、Catalog_ShouldProvideConvenientLookup),但尝试运行dotnet test失败,因执行环境缺少dotnetCLI(bash: command not found: dotnet)。Codex Task