Apq.Cfg.Yaml.YamlFileCfgSource.SetYamlByColonKey(YamlDotNet.RepresentationModel.YamlMappingNode,string,string).md 1.4 KB

Apq.Cfg.Yaml.YamlFileCfgSource

YamlFileCfgSource.SetYamlByColonKey(YamlMappingNode, string, string) Method

根据冒号分隔的键路径设置 YAML 映射节点中的值

private static void SetYamlByColonKey(YamlDotNet.RepresentationModel.YamlMappingNode root, string key, string? value);

Parameters

root YamlDotNet.RepresentationModel.YamlMappingNode

YAML 映射根节点

key System.String

冒号分隔的键路径(如 "Database:Connection:Timeout")

value System.String

要设置的值,为 null 时设置为空字符串