黄中银 2 дней назад
Родитель
Сommit
2c138aeffd
76 измененных файлов с 15040 добавлено и 1016 удалено
  1. 213 0
      docs/docfx/api/.manifest
  2. 10 10
      docs/site/public/api-reference/api/Apq.Cfg.Apollo.CfgBuilderExtensions.html
  3. 164 9
      docs/site/public/api-reference/api/Apq.Cfg.CfgBuilder.html
  4. 285 0
      docs/site/public/api-reference/api/Apq.Cfg.CfgBuilderTemplateExtensions.html
  5. 701 0
      docs/site/public/api-reference/api/Apq.Cfg.CfgSourceLevels.html
  6. 9 9
      docs/site/public/api-reference/api/Apq.Cfg.Consul.CfgBuilderExtensions.html
  7. 11 6
      docs/site/public/api-reference/api/Apq.Cfg.Database.CfgBuilderExtensions.html
  8. 8 8
      docs/site/public/api-reference/api/Apq.Cfg.Env.CfgBuilderExtensions.html
  9. 14 14
      docs/site/public/api-reference/api/Apq.Cfg.Etcd.CfgBuilderExtensions.html
  10. 75 0
      docs/site/public/api-reference/api/Apq.Cfg.ICfgRoot.html
  11. 17 9
      docs/site/public/api-reference/api/Apq.Cfg.Ini.CfgBuilderExtensions.html
  12. 19 19
      docs/site/public/api-reference/api/Apq.Cfg.Nacos.CfgBuilderExtensions.html
  13. 11 6
      docs/site/public/api-reference/api/Apq.Cfg.Redis.CfgBuilderExtensions.html
  14. 148 0
      docs/site/public/api-reference/api/Apq.Cfg.ServiceCollectionExtensions.html
  15. 690 0
      docs/site/public/api-reference/api/Apq.Cfg.Snapshot.CfgRootSnapshotExtensions.html
  16. 494 0
      docs/site/public/api-reference/api/Apq.Cfg.Snapshot.ConfigExporter.html
  17. 367 0
      docs/site/public/api-reference/api/Apq.Cfg.Snapshot.ExportContext.html
  18. 367 0
      docs/site/public/api-reference/api/Apq.Cfg.Snapshot.ExportOptions.html
  19. 157 0
      docs/site/public/api-reference/api/Apq.Cfg.Snapshot.SnapshotExporter.html
  20. 308 0
      docs/site/public/api-reference/api/Apq.Cfg.Snapshot.SnapshotExporters.html
  21. 153 0
      docs/site/public/api-reference/api/Apq.Cfg.Snapshot.html
  22. 227 0
      docs/site/public/api-reference/api/Apq.Cfg.Template.IVariableResolver.html
  23. 284 0
      docs/site/public/api-reference/api/Apq.Cfg.Template.TemplateEngine.html
  24. 157 0
      docs/site/public/api-reference/api/Apq.Cfg.Template.UnresolvedVariableBehavior.html
  25. 466 0
      docs/site/public/api-reference/api/Apq.Cfg.Template.VariableResolutionOptions.html
  26. 315 0
      docs/site/public/api-reference/api/Apq.Cfg.Template.VariableResolvers.html
  27. 151 0
      docs/site/public/api-reference/api/Apq.Cfg.Template.html
  28. 547 0
      docs/site/public/api-reference/api/Apq.Cfg.TemplateExtensions.html
  29. 17 9
      docs/site/public/api-reference/api/Apq.Cfg.Toml.CfgBuilderExtensions.html
  30. 507 0
      docs/site/public/api-reference/api/Apq.Cfg.Validation.CfgRootValidationExtensions.html
  31. 976 0
      docs/site/public/api-reference/api/Apq.Cfg.Validation.ConfigValidationBuilder.html
  32. 346 0
      docs/site/public/api-reference/api/Apq.Cfg.Validation.ConfigValidationException.html
  33. 293 0
      docs/site/public/api-reference/api/Apq.Cfg.Validation.ConfigValidator.html
  34. 221 0
      docs/site/public/api-reference/api/Apq.Cfg.Validation.IConfigValidator.html
  35. 253 0
      docs/site/public/api-reference/api/Apq.Cfg.Validation.IValidationRule.html
  36. 366 0
      docs/site/public/api-reference/api/Apq.Cfg.Validation.Rules.CustomRule.html
  37. 395 0
      docs/site/public/api-reference/api/Apq.Cfg.Validation.Rules.DependsOnRule.html
  38. 366 0
      docs/site/public/api-reference/api/Apq.Cfg.Validation.Rules.EnumValuesRule.html
  39. 366 0
      docs/site/public/api-reference/api/Apq.Cfg.Validation.Rules.LengthRule.html
  40. 375 0
      docs/site/public/api-reference/api/Apq.Cfg.Validation.Rules.RangeRule-1.html
  41. 393 0
      docs/site/public/api-reference/api/Apq.Cfg.Validation.Rules.RangeRule.html
  42. 398 0
      docs/site/public/api-reference/api/Apq.Cfg.Validation.Rules.RegexRule.html
  43. 360 0
      docs/site/public/api-reference/api/Apq.Cfg.Validation.Rules.RequiredRule.html
  44. 160 0
      docs/site/public/api-reference/api/Apq.Cfg.Validation.Rules.html
  45. 382 0
      docs/site/public/api-reference/api/Apq.Cfg.Validation.ValidationError.html
  46. 527 0
      docs/site/public/api-reference/api/Apq.Cfg.Validation.ValidationResult.html
  47. 163 0
      docs/site/public/api-reference/api/Apq.Cfg.Validation.html
  48. 28 28
      docs/site/public/api-reference/api/Apq.Cfg.Vault.CfgBuilderExtensions.html
  49. 17 9
      docs/site/public/api-reference/api/Apq.Cfg.Xml.CfgBuilderExtensions.html
  50. 17 9
      docs/site/public/api-reference/api/Apq.Cfg.Yaml.CfgBuilderExtensions.html
  51. 13 13
      docs/site/public/api-reference/api/Apq.Cfg.Zookeeper.CfgBuilderExtensions.html
  52. 15 0
      docs/site/public/api-reference/api/Apq.Cfg.html
  53. 118 0
      docs/site/public/api-reference/api/toc.html
  54. 0 0
      docs/site/public/api-reference/api/toc.json
  55. 1 1
      docs/site/public/api-reference/index.json
  56. 476 0
      docs/site/public/api-reference/manifest.json
  57. 1105 0
      docs/site/public/api-reference/xrefmap.yml
  58. 0 857
      docs/功能建议与优化改进_2026-01-02.md
  59. 1 0
      versions/Apq.Cfg.Apollo/v1.1.2.md
  60. 1 0
      versions/Apq.Cfg.Consul/v1.1.2.md
  61. 1 0
      versions/Apq.Cfg.Crypto.DataProtection/v1.1.2.md
  62. 1 0
      versions/Apq.Cfg.Crypto.Tool/v1.1.2.md
  63. 1 0
      versions/Apq.Cfg.Crypto/v1.1.2.md
  64. 1 0
      versions/Apq.Cfg.Database/v1.1.2.md
  65. 1 0
      versions/Apq.Cfg.Env/v1.1.2.md
  66. 1 0
      versions/Apq.Cfg.Etcd/v1.1.2.md
  67. 1 0
      versions/Apq.Cfg.Ini/v1.1.2.md
  68. 1 0
      versions/Apq.Cfg.Nacos/v1.1.2.md
  69. 1 0
      versions/Apq.Cfg.Redis/v1.1.2.md
  70. 1 0
      versions/Apq.Cfg.SourceGenerator/v1.1.2.md
  71. 1 0
      versions/Apq.Cfg.Toml/v1.1.2.md
  72. 1 0
      versions/Apq.Cfg.Vault/v1.1.2.md
  73. 1 0
      versions/Apq.Cfg.Xml/v1.1.2.md
  74. 1 0
      versions/Apq.Cfg.Yaml/v1.1.2.md
  75. 1 0
      versions/Apq.Cfg.Zookeeper/v1.1.2.md
  76. 1 0
      versions/Apq.Cfg/v1.1.2.md

+ 213 - 0
docs/docfx/api/.manifest

@@ -25,16 +25,22 @@
   "Apq.Cfg.CfgBuilder.AddReadEncodingMappingRegex(System.String,System.Text.Encoding,System.Int32)": "Apq.Cfg.CfgBuilder.yml",
   "Apq.Cfg.CfgBuilder.AddReadEncodingMappingWildcard(System.String,System.Text.Encoding,System.Int32)": "Apq.Cfg.CfgBuilder.yml",
   "Apq.Cfg.CfgBuilder.AddSource(Apq.Cfg.Sources.ICfgSource)": "Apq.Cfg.CfgBuilder.yml",
+  "Apq.Cfg.CfgBuilder.AddValidation(System.Action{Apq.Cfg.Validation.ConfigValidationBuilder})": "Apq.Cfg.CfgBuilder.yml",
+  "Apq.Cfg.CfgBuilder.AddValidator(Apq.Cfg.Validation.IConfigValidator)": "Apq.Cfg.CfgBuilder.yml",
   "Apq.Cfg.CfgBuilder.AddValueMasker(Apq.Cfg.Security.IValueMasker)": "Apq.Cfg.CfgBuilder.yml",
   "Apq.Cfg.CfgBuilder.AddValueTransformer(Apq.Cfg.Security.IValueTransformer)": "Apq.Cfg.CfgBuilder.yml",
   "Apq.Cfg.CfgBuilder.AddWriteEncodingMapping(System.String,System.Text.Encoding,System.Int32)": "Apq.Cfg.CfgBuilder.yml",
   "Apq.Cfg.CfgBuilder.AddWriteEncodingMappingRegex(System.String,System.Text.Encoding,System.Int32)": "Apq.Cfg.CfgBuilder.yml",
   "Apq.Cfg.CfgBuilder.AddWriteEncodingMappingWildcard(System.String,System.Text.Encoding,System.Int32)": "Apq.Cfg.CfgBuilder.yml",
   "Apq.Cfg.CfgBuilder.Build": "Apq.Cfg.CfgBuilder.yml",
+  "Apq.Cfg.CfgBuilder.BuildAndValidate(System.Boolean)": "Apq.Cfg.CfgBuilder.yml",
   "Apq.Cfg.CfgBuilder.ConfigureEncodingMapping(System.Action{Apq.Cfg.EncodingSupport.EncodingMappingConfig})": "Apq.Cfg.CfgBuilder.yml",
   "Apq.Cfg.CfgBuilder.ConfigureValueTransformer(System.Action{Apq.Cfg.Security.ValueTransformerOptions})": "Apq.Cfg.CfgBuilder.yml",
   "Apq.Cfg.CfgBuilder.WithEncodingConfidenceThreshold(System.Single)": "Apq.Cfg.CfgBuilder.yml",
   "Apq.Cfg.CfgBuilder.WithEncodingDetectionLogging(System.Action{Apq.Cfg.EncodingSupport.EncodingDetectionResult})": "Apq.Cfg.CfgBuilder.yml",
+  "Apq.Cfg.CfgBuilderTemplateExtensions": "Apq.Cfg.CfgBuilderTemplateExtensions.yml",
+  "Apq.Cfg.CfgBuilderTemplateExtensions.AddVariableResolver(Apq.Cfg.CfgBuilder,Apq.Cfg.Template.IVariableResolver)": "Apq.Cfg.CfgBuilderTemplateExtensions.yml",
+  "Apq.Cfg.CfgBuilderTemplateExtensions.ConfigureVariableResolution(Apq.Cfg.CfgBuilder,System.Action{Apq.Cfg.Template.VariableResolutionOptions})": "Apq.Cfg.CfgBuilderTemplateExtensions.yml",
   "Apq.Cfg.CfgRootExtensions": "Apq.Cfg.CfgRootExtensions.yml",
   "Apq.Cfg.CfgRootExtensions.GetMasked(Apq.Cfg.ICfgRoot,System.String)": "Apq.Cfg.CfgRootExtensions.yml",
   "Apq.Cfg.CfgRootExtensions.GetMaskedSnapshot(Apq.Cfg.ICfgRoot)": "Apq.Cfg.CfgRootExtensions.yml",
@@ -45,6 +51,22 @@
   "Apq.Cfg.CfgSectionAttribute.#ctor(System.String)": "Apq.Cfg.CfgSectionAttribute.yml",
   "Apq.Cfg.CfgSectionAttribute.GenerateExtension": "Apq.Cfg.CfgSectionAttribute.yml",
   "Apq.Cfg.CfgSectionAttribute.SectionPath": "Apq.Cfg.CfgSectionAttribute.yml",
+  "Apq.Cfg.CfgSourceLevels": "Apq.Cfg.CfgSourceLevels.yml",
+  "Apq.Cfg.CfgSourceLevels.Apollo": "Apq.Cfg.CfgSourceLevels.yml",
+  "Apq.Cfg.CfgSourceLevels.Consul": "Apq.Cfg.CfgSourceLevels.yml",
+  "Apq.Cfg.CfgSourceLevels.Database": "Apq.Cfg.CfgSourceLevels.yml",
+  "Apq.Cfg.CfgSourceLevels.Env": "Apq.Cfg.CfgSourceLevels.yml",
+  "Apq.Cfg.CfgSourceLevels.EnvironmentVariables": "Apq.Cfg.CfgSourceLevels.yml",
+  "Apq.Cfg.CfgSourceLevels.Etcd": "Apq.Cfg.CfgSourceLevels.yml",
+  "Apq.Cfg.CfgSourceLevels.Ini": "Apq.Cfg.CfgSourceLevels.yml",
+  "Apq.Cfg.CfgSourceLevels.Json": "Apq.Cfg.CfgSourceLevels.yml",
+  "Apq.Cfg.CfgSourceLevels.Nacos": "Apq.Cfg.CfgSourceLevels.yml",
+  "Apq.Cfg.CfgSourceLevels.Redis": "Apq.Cfg.CfgSourceLevels.yml",
+  "Apq.Cfg.CfgSourceLevels.Toml": "Apq.Cfg.CfgSourceLevels.yml",
+  "Apq.Cfg.CfgSourceLevels.Vault": "Apq.Cfg.CfgSourceLevels.yml",
+  "Apq.Cfg.CfgSourceLevels.Xml": "Apq.Cfg.CfgSourceLevels.yml",
+  "Apq.Cfg.CfgSourceLevels.Yaml": "Apq.Cfg.CfgSourceLevels.yml",
+  "Apq.Cfg.CfgSourceLevels.Zookeeper": "Apq.Cfg.CfgSourceLevels.yml",
   "Apq.Cfg.Changes": "Apq.Cfg.Changes.yml",
   "Apq.Cfg.Changes.ChangeType": "Apq.Cfg.Changes.ChangeType.yml",
   "Apq.Cfg.Changes.ChangeType.Added": "Apq.Cfg.Changes.ChangeType.yml",
@@ -393,9 +415,52 @@
   "Apq.Cfg.ServiceCollectionExtensions.AddApqCfg(Microsoft.Extensions.DependencyInjection.IServiceCollection,System.Action{Apq.Cfg.CfgBuilder,System.IServiceProvider})": "Apq.Cfg.ServiceCollectionExtensions.yml",
   "Apq.Cfg.ServiceCollectionExtensions.AddApqCfg(Microsoft.Extensions.DependencyInjection.IServiceCollection,System.Action{Apq.Cfg.CfgBuilder})": "Apq.Cfg.ServiceCollectionExtensions.yml",
   "Apq.Cfg.ServiceCollectionExtensions.AddApqCfg(Microsoft.Extensions.DependencyInjection.IServiceCollection,System.Func{System.IServiceProvider,Apq.Cfg.ICfgRoot})": "Apq.Cfg.ServiceCollectionExtensions.yml",
+  "Apq.Cfg.ServiceCollectionExtensions.AddApqCfgWithValidation(Microsoft.Extensions.DependencyInjection.IServiceCollection,System.Action{Apq.Cfg.CfgBuilder},System.Boolean)": "Apq.Cfg.ServiceCollectionExtensions.yml",
   "Apq.Cfg.ServiceCollectionExtensions.AddApqCfg``1(Microsoft.Extensions.DependencyInjection.IServiceCollection,System.Action{Apq.Cfg.CfgBuilder},System.String)": "Apq.Cfg.ServiceCollectionExtensions.yml",
+  "Apq.Cfg.ServiceCollectionExtensions.AddConfigValidator(Microsoft.Extensions.DependencyInjection.IServiceCollection,Apq.Cfg.Validation.IConfigValidator)": "Apq.Cfg.ServiceCollectionExtensions.yml",
+  "Apq.Cfg.ServiceCollectionExtensions.AddConfigValidator(Microsoft.Extensions.DependencyInjection.IServiceCollection,System.Action{Apq.Cfg.Validation.ConfigValidationBuilder})": "Apq.Cfg.ServiceCollectionExtensions.yml",
   "Apq.Cfg.ServiceCollectionExtensions.ConfigureApqCfg``1(Microsoft.Extensions.DependencyInjection.IServiceCollection,System.String)": "Apq.Cfg.ServiceCollectionExtensions.yml",
   "Apq.Cfg.ServiceCollectionExtensions.ConfigureApqCfg``1(Microsoft.Extensions.DependencyInjection.IServiceCollection,System.String,System.Action{``0})": "Apq.Cfg.ServiceCollectionExtensions.yml",
+  "Apq.Cfg.Snapshot": "Apq.Cfg.Snapshot.yml",
+  "Apq.Cfg.Snapshot.CfgRootSnapshotExtensions": "Apq.Cfg.Snapshot.CfgRootSnapshotExtensions.yml",
+  "Apq.Cfg.Snapshot.CfgRootSnapshotExtensions.ExportSnapshot(Apq.Cfg.ICfgRoot,Apq.Cfg.Snapshot.ExportOptions)": "Apq.Cfg.Snapshot.CfgRootSnapshotExtensions.yml",
+  "Apq.Cfg.Snapshot.CfgRootSnapshotExtensions.ExportSnapshot(Apq.Cfg.ICfgRoot,Apq.Cfg.Snapshot.SnapshotExporter,Apq.Cfg.Snapshot.ExportOptions)": "Apq.Cfg.Snapshot.CfgRootSnapshotExtensions.yml",
+  "Apq.Cfg.Snapshot.CfgRootSnapshotExtensions.ExportSnapshot(Apq.Cfg.ICfgRoot,System.Action{Apq.Cfg.Snapshot.ExportOptions})": "Apq.Cfg.Snapshot.CfgRootSnapshotExtensions.yml",
+  "Apq.Cfg.Snapshot.CfgRootSnapshotExtensions.ExportSnapshotAsDictionary(Apq.Cfg.ICfgRoot,System.Boolean)": "Apq.Cfg.Snapshot.CfgRootSnapshotExtensions.yml",
+  "Apq.Cfg.Snapshot.CfgRootSnapshotExtensions.ExportSnapshotAsEnv(Apq.Cfg.ICfgRoot,System.String,System.Boolean)": "Apq.Cfg.Snapshot.CfgRootSnapshotExtensions.yml",
+  "Apq.Cfg.Snapshot.CfgRootSnapshotExtensions.ExportSnapshotAsJson(Apq.Cfg.ICfgRoot,System.Boolean,System.Boolean)": "Apq.Cfg.Snapshot.CfgRootSnapshotExtensions.yml",
+  "Apq.Cfg.Snapshot.CfgRootSnapshotExtensions.ExportSnapshotAsKeyValue(Apq.Cfg.ICfgRoot,System.Boolean)": "Apq.Cfg.Snapshot.CfgRootSnapshotExtensions.yml",
+  "Apq.Cfg.Snapshot.CfgRootSnapshotExtensions.ExportSnapshotAsync(Apq.Cfg.ICfgRoot,Apq.Cfg.Snapshot.SnapshotExporter,System.IO.Stream,Apq.Cfg.Snapshot.ExportOptions,System.Threading.CancellationToken)": "Apq.Cfg.Snapshot.CfgRootSnapshotExtensions.yml",
+  "Apq.Cfg.Snapshot.CfgRootSnapshotExtensions.ExportSnapshotAsync(Apq.Cfg.ICfgRoot,System.IO.Stream,Apq.Cfg.Snapshot.ExportOptions,System.Threading.CancellationToken)": "Apq.Cfg.Snapshot.CfgRootSnapshotExtensions.yml",
+  "Apq.Cfg.Snapshot.CfgRootSnapshotExtensions.ExportSnapshotToFileAsync(Apq.Cfg.ICfgRoot,Apq.Cfg.Snapshot.SnapshotExporter,System.String,Apq.Cfg.Snapshot.ExportOptions,System.Threading.CancellationToken)": "Apq.Cfg.Snapshot.CfgRootSnapshotExtensions.yml",
+  "Apq.Cfg.Snapshot.CfgRootSnapshotExtensions.ExportSnapshotToFileAsync(Apq.Cfg.ICfgRoot,System.String,Apq.Cfg.Snapshot.ExportOptions,System.Threading.CancellationToken)": "Apq.Cfg.Snapshot.CfgRootSnapshotExtensions.yml",
+  "Apq.Cfg.Snapshot.ConfigExporter": "Apq.Cfg.Snapshot.ConfigExporter.yml",
+  "Apq.Cfg.Snapshot.ConfigExporter.Export(Apq.Cfg.ICfgRoot,Apq.Cfg.Snapshot.ExportOptions)": "Apq.Cfg.Snapshot.ConfigExporter.yml",
+  "Apq.Cfg.Snapshot.ConfigExporter.Export(Apq.Cfg.ICfgRoot,Apq.Cfg.Snapshot.SnapshotExporter,Apq.Cfg.Snapshot.ExportOptions)": "Apq.Cfg.Snapshot.ConfigExporter.yml",
+  "Apq.Cfg.Snapshot.ConfigExporter.ExportAsync(Apq.Cfg.ICfgRoot,Apq.Cfg.Snapshot.SnapshotExporter,System.IO.Stream,Apq.Cfg.Snapshot.ExportOptions,System.Threading.CancellationToken)": "Apq.Cfg.Snapshot.ConfigExporter.yml",
+  "Apq.Cfg.Snapshot.ConfigExporter.ExportAsync(Apq.Cfg.ICfgRoot,System.IO.Stream,Apq.Cfg.Snapshot.ExportOptions,System.Threading.CancellationToken)": "Apq.Cfg.Snapshot.ConfigExporter.yml",
+  "Apq.Cfg.Snapshot.ConfigExporter.ExportToDictionary(Apq.Cfg.ICfgRoot,Apq.Cfg.Snapshot.ExportOptions)": "Apq.Cfg.Snapshot.ConfigExporter.yml",
+  "Apq.Cfg.Snapshot.ConfigExporter.ExportToFileAsync(Apq.Cfg.ICfgRoot,Apq.Cfg.Snapshot.SnapshotExporter,System.String,Apq.Cfg.Snapshot.ExportOptions,System.Threading.CancellationToken)": "Apq.Cfg.Snapshot.ConfigExporter.yml",
+  "Apq.Cfg.Snapshot.ConfigExporter.ExportToFileAsync(Apq.Cfg.ICfgRoot,System.String,Apq.Cfg.Snapshot.ExportOptions,System.Threading.CancellationToken)": "Apq.Cfg.Snapshot.ConfigExporter.yml",
+  "Apq.Cfg.Snapshot.ExportContext": "Apq.Cfg.Snapshot.ExportContext.yml",
+  "Apq.Cfg.Snapshot.ExportContext.EnvPrefix": "Apq.Cfg.Snapshot.ExportContext.yml",
+  "Apq.Cfg.Snapshot.ExportContext.ExportedAt": "Apq.Cfg.Snapshot.ExportContext.yml",
+  "Apq.Cfg.Snapshot.ExportContext.IncludeMetadata": "Apq.Cfg.Snapshot.ExportContext.yml",
+  "Apq.Cfg.Snapshot.ExportContext.Indented": "Apq.Cfg.Snapshot.ExportContext.yml",
+  "Apq.Cfg.Snapshot.ExportContext.KeyCount": "Apq.Cfg.Snapshot.ExportContext.yml",
+  "Apq.Cfg.Snapshot.ExportContext.Properties": "Apq.Cfg.Snapshot.ExportContext.yml",
+  "Apq.Cfg.Snapshot.ExportOptions": "Apq.Cfg.Snapshot.ExportOptions.yml",
+  "Apq.Cfg.Snapshot.ExportOptions.EnvPrefix": "Apq.Cfg.Snapshot.ExportOptions.yml",
+  "Apq.Cfg.Snapshot.ExportOptions.ExcludeKeys": "Apq.Cfg.Snapshot.ExportOptions.yml",
+  "Apq.Cfg.Snapshot.ExportOptions.IncludeKeys": "Apq.Cfg.Snapshot.ExportOptions.yml",
+  "Apq.Cfg.Snapshot.ExportOptions.IncludeMetadata": "Apq.Cfg.Snapshot.ExportOptions.yml",
+  "Apq.Cfg.Snapshot.ExportOptions.Indented": "Apq.Cfg.Snapshot.ExportOptions.yml",
+  "Apq.Cfg.Snapshot.ExportOptions.MaskSensitiveValues": "Apq.Cfg.Snapshot.ExportOptions.yml",
+  "Apq.Cfg.Snapshot.SnapshotExporter": "Apq.Cfg.Snapshot.SnapshotExporter.yml",
+  "Apq.Cfg.Snapshot.SnapshotExporters": "Apq.Cfg.Snapshot.SnapshotExporters.yml",
+  "Apq.Cfg.Snapshot.SnapshotExporters.Env(System.Collections.Generic.IReadOnlyDictionary{System.String,System.String},Apq.Cfg.Snapshot.ExportContext)": "Apq.Cfg.Snapshot.SnapshotExporters.yml",
+  "Apq.Cfg.Snapshot.SnapshotExporters.Json(System.Collections.Generic.IReadOnlyDictionary{System.String,System.String},Apq.Cfg.Snapshot.ExportContext)": "Apq.Cfg.Snapshot.SnapshotExporters.yml",
+  "Apq.Cfg.Snapshot.SnapshotExporters.KeyValue(System.Collections.Generic.IReadOnlyDictionary{System.String,System.String},Apq.Cfg.Snapshot.ExportContext)": "Apq.Cfg.Snapshot.SnapshotExporters.yml",
   "Apq.Cfg.SourceGenerator": "Apq.Cfg.SourceGenerator.yml",
   "Apq.Cfg.SourceGenerator.CfgSectionGenerator": "Apq.Cfg.SourceGenerator.CfgSectionGenerator.yml",
   "Apq.Cfg.SourceGenerator.CfgSectionGenerator.Initialize(Microsoft.CodeAnalysis.IncrementalGeneratorInitializationContext)": "Apq.Cfg.SourceGenerator.CfgSectionGenerator.yml",
@@ -426,9 +491,157 @@
   "Apq.Cfg.Sources.ICfgSource.Level": "Apq.Cfg.Sources.ICfgSource.yml",
   "Apq.Cfg.Sources.IWritableCfgSource": "Apq.Cfg.Sources.IWritableCfgSource.yml",
   "Apq.Cfg.Sources.IWritableCfgSource.ApplyChangesAsync(System.Collections.Generic.IReadOnlyDictionary{System.String,System.String},System.Threading.CancellationToken)": "Apq.Cfg.Sources.IWritableCfgSource.yml",
+  "Apq.Cfg.Template": "Apq.Cfg.Template.yml",
+  "Apq.Cfg.Template.IVariableResolver": "Apq.Cfg.Template.IVariableResolver.yml",
+  "Apq.Cfg.Template.IVariableResolver.Prefix": "Apq.Cfg.Template.IVariableResolver.yml",
+  "Apq.Cfg.Template.IVariableResolver.Resolve(System.String,Apq.Cfg.ICfgRoot)": "Apq.Cfg.Template.IVariableResolver.yml",
+  "Apq.Cfg.Template.TemplateEngine": "Apq.Cfg.Template.TemplateEngine.yml",
+  "Apq.Cfg.Template.TemplateEngine.#ctor(Apq.Cfg.Template.VariableResolutionOptions)": "Apq.Cfg.Template.TemplateEngine.yml",
+  "Apq.Cfg.Template.TemplateEngine.ClearCache": "Apq.Cfg.Template.TemplateEngine.yml",
+  "Apq.Cfg.Template.TemplateEngine.Resolve(System.String,Apq.Cfg.ICfgRoot)": "Apq.Cfg.Template.TemplateEngine.yml",
+  "Apq.Cfg.Template.UnresolvedVariableBehavior": "Apq.Cfg.Template.UnresolvedVariableBehavior.yml",
+  "Apq.Cfg.Template.UnresolvedVariableBehavior.Empty": "Apq.Cfg.Template.UnresolvedVariableBehavior.yml",
+  "Apq.Cfg.Template.UnresolvedVariableBehavior.Keep": "Apq.Cfg.Template.UnresolvedVariableBehavior.yml",
+  "Apq.Cfg.Template.UnresolvedVariableBehavior.Throw": "Apq.Cfg.Template.UnresolvedVariableBehavior.yml",
+  "Apq.Cfg.Template.VariableResolutionOptions": "Apq.Cfg.Template.VariableResolutionOptions.yml",
+  "Apq.Cfg.Template.VariableResolutionOptions.CacheResults": "Apq.Cfg.Template.VariableResolutionOptions.yml",
+  "Apq.Cfg.Template.VariableResolutionOptions.Default": "Apq.Cfg.Template.VariableResolutionOptions.yml",
+  "Apq.Cfg.Template.VariableResolutionOptions.InvalidateCacheOnChange": "Apq.Cfg.Template.VariableResolutionOptions.yml",
+  "Apq.Cfg.Template.VariableResolutionOptions.MaxRecursionDepth": "Apq.Cfg.Template.VariableResolutionOptions.yml",
+  "Apq.Cfg.Template.VariableResolutionOptions.PrefixSeparator": "Apq.Cfg.Template.VariableResolutionOptions.yml",
+  "Apq.Cfg.Template.VariableResolutionOptions.Resolvers": "Apq.Cfg.Template.VariableResolutionOptions.yml",
+  "Apq.Cfg.Template.VariableResolutionOptions.UnresolvedBehavior": "Apq.Cfg.Template.VariableResolutionOptions.yml",
+  "Apq.Cfg.Template.VariableResolutionOptions.VariablePrefix": "Apq.Cfg.Template.VariableResolutionOptions.yml",
+  "Apq.Cfg.Template.VariableResolutionOptions.VariableSuffix": "Apq.Cfg.Template.VariableResolutionOptions.yml",
+  "Apq.Cfg.Template.VariableResolvers": "Apq.Cfg.Template.VariableResolvers.yml",
+  "Apq.Cfg.Template.VariableResolvers.All": "Apq.Cfg.Template.VariableResolvers.yml",
+  "Apq.Cfg.Template.VariableResolvers.Config": "Apq.Cfg.Template.VariableResolvers.yml",
+  "Apq.Cfg.Template.VariableResolvers.Environment": "Apq.Cfg.Template.VariableResolvers.yml",
+  "Apq.Cfg.Template.VariableResolvers.System": "Apq.Cfg.Template.VariableResolvers.yml",
+  "Apq.Cfg.TemplateExtensions": "Apq.Cfg.TemplateExtensions.yml",
+  "Apq.Cfg.TemplateExtensions.GetManyResolved(Apq.Cfg.ICfgRoot,System.Collections.Generic.IEnumerable{System.String})": "Apq.Cfg.TemplateExtensions.yml",
+  "Apq.Cfg.TemplateExtensions.GetResolved(Apq.Cfg.ICfgRoot,System.String)": "Apq.Cfg.TemplateExtensions.yml",
+  "Apq.Cfg.TemplateExtensions.GetResolved(Apq.Cfg.ICfgRoot,System.String,Apq.Cfg.Template.VariableResolutionOptions)": "Apq.Cfg.TemplateExtensions.yml",
+  "Apq.Cfg.TemplateExtensions.GetResolved``1(Apq.Cfg.ICfgRoot,System.String)": "Apq.Cfg.TemplateExtensions.yml",
+  "Apq.Cfg.TemplateExtensions.ResolveVariables(Apq.Cfg.ICfgRoot,System.String)": "Apq.Cfg.TemplateExtensions.yml",
+  "Apq.Cfg.TemplateExtensions.ResolveVariables(Apq.Cfg.ICfgRoot,System.String,Apq.Cfg.Template.VariableResolutionOptions)": "Apq.Cfg.TemplateExtensions.yml",
+  "Apq.Cfg.TemplateExtensions.TryGetResolved(Apq.Cfg.ICfgRoot,System.String,System.String@)": "Apq.Cfg.TemplateExtensions.yml",
+  "Apq.Cfg.TemplateExtensions.TryGetResolved``1(Apq.Cfg.ICfgRoot,System.String,``0@)": "Apq.Cfg.TemplateExtensions.yml",
   "Apq.Cfg.Toml": "Apq.Cfg.Toml.yml",
   "Apq.Cfg.Toml.CfgBuilderExtensions": "Apq.Cfg.Toml.CfgBuilderExtensions.yml",
   "Apq.Cfg.Toml.CfgBuilderExtensions.AddToml(Apq.Cfg.CfgBuilder,System.String,System.Int32,System.Boolean,System.Boolean,System.Boolean,System.Boolean)": "Apq.Cfg.Toml.CfgBuilderExtensions.yml",
+  "Apq.Cfg.Validation": "Apq.Cfg.Validation.yml",
+  "Apq.Cfg.Validation.CfgRootValidationExtensions": "Apq.Cfg.Validation.CfgRootValidationExtensions.yml",
+  "Apq.Cfg.Validation.CfgRootValidationExtensions.TryValidate(Apq.Cfg.ICfgRoot,Apq.Cfg.Validation.IConfigValidator,Apq.Cfg.Validation.ValidationResult@)": "Apq.Cfg.Validation.CfgRootValidationExtensions.yml",
+  "Apq.Cfg.Validation.CfgRootValidationExtensions.TryValidate(Apq.Cfg.ICfgRoot,System.Action{Apq.Cfg.Validation.ConfigValidationBuilder},Apq.Cfg.Validation.ValidationResult@)": "Apq.Cfg.Validation.CfgRootValidationExtensions.yml",
+  "Apq.Cfg.Validation.CfgRootValidationExtensions.Validate(Apq.Cfg.ICfgRoot,Apq.Cfg.Validation.IConfigValidator)": "Apq.Cfg.Validation.CfgRootValidationExtensions.yml",
+  "Apq.Cfg.Validation.CfgRootValidationExtensions.Validate(Apq.Cfg.ICfgRoot,System.Action{Apq.Cfg.Validation.ConfigValidationBuilder})": "Apq.Cfg.Validation.CfgRootValidationExtensions.yml",
+  "Apq.Cfg.Validation.CfgRootValidationExtensions.ValidateAndThrow(Apq.Cfg.ICfgRoot,Apq.Cfg.Validation.IConfigValidator)": "Apq.Cfg.Validation.CfgRootValidationExtensions.yml",
+  "Apq.Cfg.Validation.CfgRootValidationExtensions.ValidateAndThrow(Apq.Cfg.ICfgRoot,System.Action{Apq.Cfg.Validation.ConfigValidationBuilder})": "Apq.Cfg.Validation.CfgRootValidationExtensions.yml",
+  "Apq.Cfg.Validation.ConfigValidationBuilder": "Apq.Cfg.Validation.ConfigValidationBuilder.yml",
+  "Apq.Cfg.Validation.ConfigValidationBuilder.AddRule(Apq.Cfg.Validation.IValidationRule)": "Apq.Cfg.Validation.ConfigValidationBuilder.yml",
+  "Apq.Cfg.Validation.ConfigValidationBuilder.AddRules(System.Collections.Generic.IEnumerable{Apq.Cfg.Validation.IValidationRule})": "Apq.Cfg.Validation.ConfigValidationBuilder.yml",
+  "Apq.Cfg.Validation.ConfigValidationBuilder.Build": "Apq.Cfg.Validation.ConfigValidationBuilder.yml",
+  "Apq.Cfg.Validation.ConfigValidationBuilder.Custom(System.String,System.Func{System.String,System.Boolean},System.String,System.String)": "Apq.Cfg.Validation.ConfigValidationBuilder.yml",
+  "Apq.Cfg.Validation.ConfigValidationBuilder.DependsOn(System.String,System.String,System.String)": "Apq.Cfg.Validation.ConfigValidationBuilder.yml",
+  "Apq.Cfg.Validation.ConfigValidationBuilder.Length(System.String,System.Nullable{System.Int32},System.Nullable{System.Int32},System.String)": "Apq.Cfg.Validation.ConfigValidationBuilder.yml",
+  "Apq.Cfg.Validation.ConfigValidationBuilder.MaxLength(System.String,System.Int32,System.String)": "Apq.Cfg.Validation.ConfigValidationBuilder.yml",
+  "Apq.Cfg.Validation.ConfigValidationBuilder.MinLength(System.String,System.Int32,System.String)": "Apq.Cfg.Validation.ConfigValidationBuilder.yml",
+  "Apq.Cfg.Validation.ConfigValidationBuilder.OneOf(System.String,System.Collections.Generic.IEnumerable{System.String},System.Boolean,System.String)": "Apq.Cfg.Validation.ConfigValidationBuilder.yml",
+  "Apq.Cfg.Validation.ConfigValidationBuilder.OneOf(System.String,System.String[])": "Apq.Cfg.Validation.ConfigValidationBuilder.yml",
+  "Apq.Cfg.Validation.ConfigValidationBuilder.Range(System.String,System.DateTime,System.DateTime,System.String)": "Apq.Cfg.Validation.ConfigValidationBuilder.yml",
+  "Apq.Cfg.Validation.ConfigValidationBuilder.Range(System.String,System.Decimal,System.Decimal,System.String)": "Apq.Cfg.Validation.ConfigValidationBuilder.yml",
+  "Apq.Cfg.Validation.ConfigValidationBuilder.Range(System.String,System.Double,System.Double,System.String)": "Apq.Cfg.Validation.ConfigValidationBuilder.yml",
+  "Apq.Cfg.Validation.ConfigValidationBuilder.Range(System.String,System.Int32,System.Int32,System.String)": "Apq.Cfg.Validation.ConfigValidationBuilder.yml",
+  "Apq.Cfg.Validation.ConfigValidationBuilder.Range(System.String,System.Int64,System.Int64,System.String)": "Apq.Cfg.Validation.ConfigValidationBuilder.yml",
+  "Apq.Cfg.Validation.ConfigValidationBuilder.Regex(System.String,System.String,System.String,System.Text.RegularExpressions.RegexOptions)": "Apq.Cfg.Validation.ConfigValidationBuilder.yml",
+  "Apq.Cfg.Validation.ConfigValidationBuilder.Required(System.String,System.String)": "Apq.Cfg.Validation.ConfigValidationBuilder.yml",
+  "Apq.Cfg.Validation.ConfigValidationBuilder.Required(System.String[])": "Apq.Cfg.Validation.ConfigValidationBuilder.yml",
+  "Apq.Cfg.Validation.ConfigValidationException": "Apq.Cfg.Validation.ConfigValidationException.yml",
+  "Apq.Cfg.Validation.ConfigValidationException.#ctor(Apq.Cfg.Validation.ValidationResult)": "Apq.Cfg.Validation.ConfigValidationException.yml",
+  "Apq.Cfg.Validation.ConfigValidationException.#ctor(Apq.Cfg.Validation.ValidationResult,System.String)": "Apq.Cfg.Validation.ConfigValidationException.yml",
+  "Apq.Cfg.Validation.ConfigValidationException.Errors": "Apq.Cfg.Validation.ConfigValidationException.yml",
+  "Apq.Cfg.Validation.ConfigValidationException.ValidationResult": "Apq.Cfg.Validation.ConfigValidationException.yml",
+  "Apq.Cfg.Validation.ConfigValidator": "Apq.Cfg.Validation.ConfigValidator.yml",
+  "Apq.Cfg.Validation.ConfigValidator.#ctor(System.Collections.Generic.IEnumerable{Apq.Cfg.Validation.IValidationRule})": "Apq.Cfg.Validation.ConfigValidator.yml",
+  "Apq.Cfg.Validation.ConfigValidator.Rules": "Apq.Cfg.Validation.ConfigValidator.yml",
+  "Apq.Cfg.Validation.ConfigValidator.Validate(Apq.Cfg.ICfgRoot)": "Apq.Cfg.Validation.ConfigValidator.yml",
+  "Apq.Cfg.Validation.IConfigValidator": "Apq.Cfg.Validation.IConfigValidator.yml",
+  "Apq.Cfg.Validation.IConfigValidator.Rules": "Apq.Cfg.Validation.IConfigValidator.yml",
+  "Apq.Cfg.Validation.IConfigValidator.Validate(Apq.Cfg.ICfgRoot)": "Apq.Cfg.Validation.IConfigValidator.yml",
+  "Apq.Cfg.Validation.IValidationRule": "Apq.Cfg.Validation.IValidationRule.yml",
+  "Apq.Cfg.Validation.IValidationRule.Key": "Apq.Cfg.Validation.IValidationRule.yml",
+  "Apq.Cfg.Validation.IValidationRule.Name": "Apq.Cfg.Validation.IValidationRule.yml",
+  "Apq.Cfg.Validation.IValidationRule.Validate(System.String)": "Apq.Cfg.Validation.IValidationRule.yml",
+  "Apq.Cfg.Validation.Rules": "Apq.Cfg.Validation.Rules.yml",
+  "Apq.Cfg.Validation.Rules.CustomRule": "Apq.Cfg.Validation.Rules.CustomRule.yml",
+  "Apq.Cfg.Validation.Rules.CustomRule.#ctor(System.String,System.Func{System.String,System.Boolean},System.String,System.String)": "Apq.Cfg.Validation.Rules.CustomRule.yml",
+  "Apq.Cfg.Validation.Rules.CustomRule.ErrorMessage": "Apq.Cfg.Validation.Rules.CustomRule.yml",
+  "Apq.Cfg.Validation.Rules.CustomRule.Key": "Apq.Cfg.Validation.Rules.CustomRule.yml",
+  "Apq.Cfg.Validation.Rules.CustomRule.Name": "Apq.Cfg.Validation.Rules.CustomRule.yml",
+  "Apq.Cfg.Validation.Rules.CustomRule.Validate(System.String)": "Apq.Cfg.Validation.Rules.CustomRule.yml",
+  "Apq.Cfg.Validation.Rules.DependsOnRule": "Apq.Cfg.Validation.Rules.DependsOnRule.yml",
+  "Apq.Cfg.Validation.Rules.DependsOnRule.#ctor(System.String,System.String,System.String)": "Apq.Cfg.Validation.Rules.DependsOnRule.yml",
+  "Apq.Cfg.Validation.Rules.DependsOnRule.DependencyKey": "Apq.Cfg.Validation.Rules.DependsOnRule.yml",
+  "Apq.Cfg.Validation.Rules.DependsOnRule.ErrorMessage": "Apq.Cfg.Validation.Rules.DependsOnRule.yml",
+  "Apq.Cfg.Validation.Rules.DependsOnRule.Key": "Apq.Cfg.Validation.Rules.DependsOnRule.yml",
+  "Apq.Cfg.Validation.Rules.DependsOnRule.Name": "Apq.Cfg.Validation.Rules.DependsOnRule.yml",
+  "Apq.Cfg.Validation.Rules.DependsOnRule.Validate(System.String)": "Apq.Cfg.Validation.Rules.DependsOnRule.yml",
+  "Apq.Cfg.Validation.Rules.EnumValuesRule": "Apq.Cfg.Validation.Rules.EnumValuesRule.yml",
+  "Apq.Cfg.Validation.Rules.EnumValuesRule.#ctor(System.String,System.Collections.Generic.IEnumerable{System.String},System.Boolean,System.String)": "Apq.Cfg.Validation.Rules.EnumValuesRule.yml",
+  "Apq.Cfg.Validation.Rules.EnumValuesRule.ErrorMessage": "Apq.Cfg.Validation.Rules.EnumValuesRule.yml",
+  "Apq.Cfg.Validation.Rules.EnumValuesRule.Key": "Apq.Cfg.Validation.Rules.EnumValuesRule.yml",
+  "Apq.Cfg.Validation.Rules.EnumValuesRule.Name": "Apq.Cfg.Validation.Rules.EnumValuesRule.yml",
+  "Apq.Cfg.Validation.Rules.EnumValuesRule.Validate(System.String)": "Apq.Cfg.Validation.Rules.EnumValuesRule.yml",
+  "Apq.Cfg.Validation.Rules.LengthRule": "Apq.Cfg.Validation.Rules.LengthRule.yml",
+  "Apq.Cfg.Validation.Rules.LengthRule.#ctor(System.String,System.Nullable{System.Int32},System.Nullable{System.Int32},System.String)": "Apq.Cfg.Validation.Rules.LengthRule.yml",
+  "Apq.Cfg.Validation.Rules.LengthRule.ErrorMessage": "Apq.Cfg.Validation.Rules.LengthRule.yml",
+  "Apq.Cfg.Validation.Rules.LengthRule.Key": "Apq.Cfg.Validation.Rules.LengthRule.yml",
+  "Apq.Cfg.Validation.Rules.LengthRule.Name": "Apq.Cfg.Validation.Rules.LengthRule.yml",
+  "Apq.Cfg.Validation.Rules.LengthRule.Validate(System.String)": "Apq.Cfg.Validation.Rules.LengthRule.yml",
+  "Apq.Cfg.Validation.Rules.RangeRule": "Apq.Cfg.Validation.Rules.RangeRule.yml",
+  "Apq.Cfg.Validation.Rules.RangeRule.ForDateTime(System.String,System.DateTime,System.DateTime,System.String)": "Apq.Cfg.Validation.Rules.RangeRule.yml",
+  "Apq.Cfg.Validation.Rules.RangeRule.ForDecimal(System.String,System.Decimal,System.Decimal,System.String)": "Apq.Cfg.Validation.Rules.RangeRule.yml",
+  "Apq.Cfg.Validation.Rules.RangeRule.ForDouble(System.String,System.Double,System.Double,System.String)": "Apq.Cfg.Validation.Rules.RangeRule.yml",
+  "Apq.Cfg.Validation.Rules.RangeRule.ForInt(System.String,System.Int32,System.Int32,System.String)": "Apq.Cfg.Validation.Rules.RangeRule.yml",
+  "Apq.Cfg.Validation.Rules.RangeRule.ForLong(System.String,System.Int64,System.Int64,System.String)": "Apq.Cfg.Validation.Rules.RangeRule.yml",
+  "Apq.Cfg.Validation.Rules.RangeRule`1": "Apq.Cfg.Validation.Rules.RangeRule-1.yml",
+  "Apq.Cfg.Validation.Rules.RangeRule`1.#ctor(System.String,`0,`0,System.Func{System.String,System.Nullable{`0}},System.String)": "Apq.Cfg.Validation.Rules.RangeRule-1.yml",
+  "Apq.Cfg.Validation.Rules.RangeRule`1.ErrorMessage": "Apq.Cfg.Validation.Rules.RangeRule-1.yml",
+  "Apq.Cfg.Validation.Rules.RangeRule`1.Key": "Apq.Cfg.Validation.Rules.RangeRule-1.yml",
+  "Apq.Cfg.Validation.Rules.RangeRule`1.Name": "Apq.Cfg.Validation.Rules.RangeRule-1.yml",
+  "Apq.Cfg.Validation.Rules.RangeRule`1.Validate(System.String)": "Apq.Cfg.Validation.Rules.RangeRule-1.yml",
+  "Apq.Cfg.Validation.Rules.RegexRule": "Apq.Cfg.Validation.Rules.RegexRule.yml",
+  "Apq.Cfg.Validation.Rules.RegexRule.#ctor(System.String,System.String,System.String,System.Text.RegularExpressions.RegexOptions)": "Apq.Cfg.Validation.Rules.RegexRule.yml",
+  "Apq.Cfg.Validation.Rules.RegexRule.ErrorMessage": "Apq.Cfg.Validation.Rules.RegexRule.yml",
+  "Apq.Cfg.Validation.Rules.RegexRule.Key": "Apq.Cfg.Validation.Rules.RegexRule.yml",
+  "Apq.Cfg.Validation.Rules.RegexRule.Name": "Apq.Cfg.Validation.Rules.RegexRule.yml",
+  "Apq.Cfg.Validation.Rules.RegexRule.Pattern": "Apq.Cfg.Validation.Rules.RegexRule.yml",
+  "Apq.Cfg.Validation.Rules.RegexRule.Validate(System.String)": "Apq.Cfg.Validation.Rules.RegexRule.yml",
+  "Apq.Cfg.Validation.Rules.RequiredRule": "Apq.Cfg.Validation.Rules.RequiredRule.yml",
+  "Apq.Cfg.Validation.Rules.RequiredRule.#ctor(System.String,System.String)": "Apq.Cfg.Validation.Rules.RequiredRule.yml",
+  "Apq.Cfg.Validation.Rules.RequiredRule.ErrorMessage": "Apq.Cfg.Validation.Rules.RequiredRule.yml",
+  "Apq.Cfg.Validation.Rules.RequiredRule.Key": "Apq.Cfg.Validation.Rules.RequiredRule.yml",
+  "Apq.Cfg.Validation.Rules.RequiredRule.Name": "Apq.Cfg.Validation.Rules.RequiredRule.yml",
+  "Apq.Cfg.Validation.Rules.RequiredRule.Validate(System.String)": "Apq.Cfg.Validation.Rules.RequiredRule.yml",
+  "Apq.Cfg.Validation.ValidationError": "Apq.Cfg.Validation.ValidationError.yml",
+  "Apq.Cfg.Validation.ValidationError.#ctor(System.String,System.String,System.String,System.String)": "Apq.Cfg.Validation.ValidationError.yml",
+  "Apq.Cfg.Validation.ValidationError.ActualValue": "Apq.Cfg.Validation.ValidationError.yml",
+  "Apq.Cfg.Validation.ValidationError.Key": "Apq.Cfg.Validation.ValidationError.yml",
+  "Apq.Cfg.Validation.ValidationError.Message": "Apq.Cfg.Validation.ValidationError.yml",
+  "Apq.Cfg.Validation.ValidationError.RuleName": "Apq.Cfg.Validation.ValidationError.yml",
+  "Apq.Cfg.Validation.ValidationError.ToString": "Apq.Cfg.Validation.ValidationError.yml",
+  "Apq.Cfg.Validation.ValidationResult": "Apq.Cfg.Validation.ValidationResult.yml",
+  "Apq.Cfg.Validation.ValidationResult.#ctor(System.Collections.Generic.IEnumerable{Apq.Cfg.Validation.ValidationError})": "Apq.Cfg.Validation.ValidationResult.yml",
+  "Apq.Cfg.Validation.ValidationResult.ErrorCount": "Apq.Cfg.Validation.ValidationResult.yml",
+  "Apq.Cfg.Validation.ValidationResult.Errors": "Apq.Cfg.Validation.ValidationResult.yml",
+  "Apq.Cfg.Validation.ValidationResult.Failure(Apq.Cfg.Validation.ValidationError[])": "Apq.Cfg.Validation.ValidationResult.yml",
+  "Apq.Cfg.Validation.ValidationResult.Failure(System.Collections.Generic.IEnumerable{Apq.Cfg.Validation.ValidationError})": "Apq.Cfg.Validation.ValidationResult.yml",
+  "Apq.Cfg.Validation.ValidationResult.GetErrorsForKey(System.String)": "Apq.Cfg.Validation.ValidationResult.yml",
+  "Apq.Cfg.Validation.ValidationResult.HasErrorsForKey(System.String)": "Apq.Cfg.Validation.ValidationResult.yml",
+  "Apq.Cfg.Validation.ValidationResult.IsValid": "Apq.Cfg.Validation.ValidationResult.yml",
+  "Apq.Cfg.Validation.ValidationResult.Success": "Apq.Cfg.Validation.ValidationResult.yml",
+  "Apq.Cfg.Validation.ValidationResult.ToString": "Apq.Cfg.Validation.ValidationResult.yml",
   "Apq.Cfg.Vault": "Apq.Cfg.Vault.yml",
   "Apq.Cfg.Vault.CfgBuilderExtensions": "Apq.Cfg.Vault.CfgBuilderExtensions.yml",
   "Apq.Cfg.Vault.CfgBuilderExtensions.AddVault(Apq.Cfg.CfgBuilder,System.Action{Apq.Cfg.Vault.VaultCfgOptions},System.Int32,System.Boolean)": "Apq.Cfg.Vault.CfgBuilderExtensions.yml",

+ 10 - 10
docs/site/public/api-reference/api/Apq.Cfg.Apollo.CfgBuilderExtensions.html

@@ -165,7 +165,7 @@ Class CfgBuilderExtensions
   <div class="markdown level1 conceptual"></div>
 
   <div class="codewrapper">
-    <pre><code class="lang-csharp hljs">public static CfgBuilder AddApollo(this CfgBuilder builder, Action&lt;ApolloCfgOptions&gt; configure, int level, bool isPrimaryWriter = false)</code></pre>
+    <pre><code class="lang-csharp hljs">public static CfgBuilder AddApollo(this CfgBuilder builder, Action&lt;ApolloCfgOptions&gt; configure, int level = 200, bool isPrimaryWriter = false)</code></pre>
   </div>
 
   <h4 class="section">Parameters</h4>
@@ -177,17 +177,17 @@ Class CfgBuilderExtensions
     <dd><p>配置选项</p>
 </dd>
     <dt><code>level</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
-    <dd><p>配置层级,数值越大优先级越高</p>
+    <dd><p>配置层级,数值越大优先级越高,默认为 <a class="xref" href="Apq.Cfg.CfgSourceLevels.html#Apq_Cfg_CfgSourceLevels_Apollo">Apollo</a> (15)</p>
 </dd>
     <dt><code>isPrimaryWriter</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
-    <dd><p>是否为主写入源(Apollo 不支持写入)</p>
+    <dd><p>是否为主写入源(Apollo 不支持写入),默认为false</p>
 </dd>
   </dl>
 
   <h4 class="section">Returns</h4>
   <dl class="parameters">
     <dt><a class="xref" href="Apq.Cfg.CfgBuilder.html">CfgBuilder</a></dt>
-    <dd><p>配置构建器</p>
+    <dd><p>配置构建器实例,支持链式调用</p>
 </dd>
   </dl>
 
@@ -213,7 +213,7 @@ Class CfgBuilderExtensions
   <div class="markdown level1 conceptual"></div>
 
   <div class="codewrapper">
-    <pre><code class="lang-csharp hljs">public static CfgBuilder AddApollo(this CfgBuilder builder, string appId, string metaServer = &quot;http://localhost:8080&quot;, string[]? namespaces = null, int level = 0, bool enableHotReload = true)</code></pre>
+    <pre><code class="lang-csharp hljs">public static CfgBuilder AddApollo(this CfgBuilder builder, string appId, string metaServer = &quot;http://localhost:8080&quot;, string[]? namespaces = null, int level = 200, bool enableHotReload = true)</code></pre>
   </div>
 
   <h4 class="section">Parameters</h4>
@@ -225,23 +225,23 @@ Class CfgBuilderExtensions
     <dd><p>Apollo 应用 ID</p>
 </dd>
     <dt><code>metaServer</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
-    <dd><p>Meta Server 地址</p>
+    <dd><p>Meta Server 地址,默认为 &quot;http://localhost:8080&quot;</p>
 </dd>
     <dt><code>namespaces</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a>[]</dt>
-    <dd><p>命名空间列表</p>
+    <dd><p>命名空间列表,默认为 [&quot;application&quot;]</p>
 </dd>
     <dt><code>level</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
-    <dd><p>配置层级</p>
+    <dd><p>配置层级,数值越大优先级越高,默认为 <a class="xref" href="Apq.Cfg.CfgSourceLevels.html#Apq_Cfg_CfgSourceLevels_Apollo">Apollo</a> (15)</p>
 </dd>
     <dt><code>enableHotReload</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
-    <dd><p>是否启用热重载</p>
+    <dd><p>是否启用热重载,默认为true</p>
 </dd>
   </dl>
 
   <h4 class="section">Returns</h4>
   <dl class="parameters">
     <dt><a class="xref" href="Apq.Cfg.CfgBuilder.html">CfgBuilder</a></dt>
-    <dd><p>配置构建器</p>
+    <dd><p>配置构建器实例,支持链式调用</p>
 </dd>
   </dl>
 

+ 164 - 9
docs/site/public/api-reference/api/Apq.Cfg.CfgBuilder.html

@@ -150,6 +150,12 @@ Class CfgBuilder
   <div>
       <a class="xref" href="Apq.Cfg.Apollo.CfgBuilderExtensions.html#Apq_Cfg_Apollo_CfgBuilderExtensions_AddApollo_Apq_Cfg_CfgBuilder_System_String_System_String_System_String___System_Int32_System_Boolean_">CfgBuilderExtensions.AddApollo(CfgBuilder, string, string, string[]?, int, bool)</a>
   </div>
+  <div>
+      <a class="xref" href="Apq.Cfg.CfgBuilderTemplateExtensions.html#Apq_Cfg_CfgBuilderTemplateExtensions_AddVariableResolver_Apq_Cfg_CfgBuilder_Apq_Cfg_Template_IVariableResolver_">CfgBuilderTemplateExtensions.AddVariableResolver(CfgBuilder, IVariableResolver)</a>
+  </div>
+  <div>
+      <a class="xref" href="Apq.Cfg.CfgBuilderTemplateExtensions.html#Apq_Cfg_CfgBuilderTemplateExtensions_ConfigureVariableResolution_Apq_Cfg_CfgBuilder_System_Action_Apq_Cfg_Template_VariableResolutionOptions__">CfgBuilderTemplateExtensions.ConfigureVariableResolution(CfgBuilder, Action&lt;VariableResolutionOptions&gt;)</a>
+  </div>
   <div>
       <a class="xref" href="Apq.Cfg.Consul.CfgBuilderExtensions.html#Apq_Cfg_Consul_CfgBuilderExtensions_AddConsul_Apq_Cfg_CfgBuilder_System_Action_Apq_Cfg_Consul_ConsulCfgOptions__System_Int32_System_Boolean_">CfgBuilderExtensions.AddConsul(CfgBuilder, Action&lt;ConsulCfgOptions&gt;, int, bool)</a>
   </div>
@@ -259,13 +265,13 @@ Class CfgBuilder
   <div class="markdown level1 conceptual"></div>
 
   <div class="codewrapper">
-    <pre><code class="lang-csharp hljs">public CfgBuilder AddEnvironmentVariables(int level, string? prefix = null)</code></pre>
+    <pre><code class="lang-csharp hljs">public CfgBuilder AddEnvironmentVariables(int level = 400, string? prefix = null)</code></pre>
   </div>
 
   <h4 class="section">Parameters</h4>
   <dl class="parameters">
     <dt><code>level</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
-    <dd><p>配置层级,数值越大优先级越高</p>
+    <dd><p>配置层级,数值越大优先级越高,默认为 <a class="xref" href="Apq.Cfg.CfgSourceLevels.html#Apq_Cfg_CfgSourceLevels_EnvironmentVariables">EnvironmentVariables</a> (20)</p>
 </dd>
     <dt><code>prefix</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
     <dd><p>环境变量前缀,为null时加载所有环境变量</p>
@@ -286,8 +292,8 @@ Class CfgBuilder
 
   <h4 class="section" id="Apq_Cfg_CfgBuilder_AddEnvironmentVariables_System_Int32_System_String__examples">Examples</h4>
   <pre><code class="lang-csharp">var cfg = new CfgBuilder()
-    .AddJson("config.json", level: 0)
-    .AddEnvironmentVariables(level: 1, prefix: "APP_")
+    .AddJson("config.json")
+    .AddEnvironmentVariables(prefix: "APP_")  // 使用默认层级 20
     .Build();</code></pre>
 
 
@@ -307,7 +313,7 @@ Class CfgBuilder
   <div class="markdown level1 conceptual"></div>
 
   <div class="codewrapper">
-    <pre><code class="lang-csharp hljs">public CfgBuilder AddJson(string path, int level, bool writeable, bool optional = true, bool reloadOnChange = true, bool isPrimaryWriter = false, EncodingOptions? encoding = null)</code></pre>
+    <pre><code class="lang-csharp hljs">public CfgBuilder AddJson(string path, int level = 0, bool writeable = false, bool optional = true, bool reloadOnChange = true, bool isPrimaryWriter = false, EncodingOptions? encoding = null)</code></pre>
   </div>
 
   <h4 class="section">Parameters</h4>
@@ -316,10 +322,10 @@ Class CfgBuilder
     <dd><p>JSON文件路径</p>
 </dd>
     <dt><code>level</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
-    <dd><p>配置层级,数值越大优先级越高</p>
+    <dd><p>配置层级,数值越大优先级越高,默认为 <a class="xref" href="Apq.Cfg.CfgSourceLevels.html#Apq_Cfg_CfgSourceLevels_Json">Json</a> (0)</p>
 </dd>
     <dt><code>writeable</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
-    <dd><p>是否可写</p>
+    <dd><p>是否可写,默认为false</p>
 </dd>
     <dt><code>optional</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
     <dd><p>是否为可选文件,默认为true</p>
@@ -349,8 +355,8 @@ Class CfgBuilder
 
   <h4 class="section" id="Apq_Cfg_CfgBuilder_AddJson_System_String_System_Int32_System_Boolean_System_Boolean_System_Boolean_System_Boolean_Apq_Cfg_EncodingSupport_EncodingOptions__examples">Examples</h4>
   <pre><code class="lang-csharp">var cfg = new CfgBuilder()
-    .AddJson("config.json", level: 0, writeable: false)
-    .AddJson("config.local.json", level: 1, writeable: true, isPrimaryWriter: true)
+    .AddJson("config.json")  // 使用默认层级 0
+    .AddJson("config.local.json", level: 5, writeable: true, isPrimaryWriter: true)
     .Build();</code></pre>
 
 
@@ -537,6 +543,93 @@ var cfg = new CfgBuilder()
 
 
 
+  <a id="Apq_Cfg_CfgBuilder_AddValidation_" data-uid="Apq.Cfg.CfgBuilder.AddValidation*"></a>
+
+  <h3 id="Apq_Cfg_CfgBuilder_AddValidation_System_Action_Apq_Cfg_Validation_ConfigValidationBuilder__" data-uid="Apq.Cfg.CfgBuilder.AddValidation(System.Action{Apq.Cfg.Validation.ConfigValidationBuilder})">
+  AddValidation(Action&lt;ConfigValidationBuilder&gt;)
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>添加配置验证规则</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public CfgBuilder AddValidation(Action&lt;ConfigValidationBuilder&gt; configure)</code></pre>
+  </div>
+
+  <h4 class="section">Parameters</h4>
+  <dl class="parameters">
+    <dt><code>configure</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.action-1">Action</a>&lt;<a class="xref" href="Apq.Cfg.Validation.ConfigValidationBuilder.html">ConfigValidationBuilder</a>&gt;</dt>
+    <dd><p>验证规则配置委托</p>
+</dd>
+  </dl>
+
+  <h4 class="section">Returns</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="Apq.Cfg.CfgBuilder.html">CfgBuilder</a></dt>
+    <dd><p>配置构建器实例,支持链式调用</p>
+</dd>
+  </dl>
+
+
+
+
+
+
+  <h4 class="section" id="Apq_Cfg_CfgBuilder_AddValidation_System_Action_Apq_Cfg_Validation_ConfigValidationBuilder___examples">Examples</h4>
+  <pre><code class="lang-csharp">var cfg = new CfgBuilder()
+    .AddJson("config.json", level: 0)
+    .AddValidation(v =&gt; v
+        .Required("Database:ConnectionString")
+        .Range("Database:Port", 1, 65535)
+        .Regex("App:Email", @"^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$"))
+    .Build();</code></pre>
+
+
+
+
+
+
+  <a id="Apq_Cfg_CfgBuilder_AddValidator_" data-uid="Apq.Cfg.CfgBuilder.AddValidator*"></a>
+
+  <h3 id="Apq_Cfg_CfgBuilder_AddValidator_Apq_Cfg_Validation_IConfigValidator_" data-uid="Apq.Cfg.CfgBuilder.AddValidator(Apq.Cfg.Validation.IConfigValidator)">
+  AddValidator(IConfigValidator)
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>添加自定义验证器</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public CfgBuilder AddValidator(IConfigValidator validator)</code></pre>
+  </div>
+
+  <h4 class="section">Parameters</h4>
+  <dl class="parameters">
+    <dt><code>validator</code> <a class="xref" href="Apq.Cfg.Validation.IConfigValidator.html">IConfigValidator</a></dt>
+    <dd><p>验证器实例</p>
+</dd>
+  </dl>
+
+  <h4 class="section">Returns</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="Apq.Cfg.CfgBuilder.html">CfgBuilder</a></dt>
+    <dd><p>配置构建器实例,支持链式调用</p>
+</dd>
+  </dl>
+
+
+
+
+
+
+
+
+
+
+
   <a id="Apq_Cfg_CfgBuilder_AddValueMasker_" data-uid="Apq.Cfg.CfgBuilder.AddValueMasker*"></a>
 
   <h3 id="Apq_Cfg_CfgBuilder_AddValueMasker_Apq_Cfg_Security_IValueMasker_" data-uid="Apq.Cfg.CfgBuilder.AddValueMasker(Apq.Cfg.Security.IValueMasker)">
@@ -791,6 +884,68 @@ var cfg = new CfgBuilder()
 
 
 
+  <a id="Apq_Cfg_CfgBuilder_BuildAndValidate_" data-uid="Apq.Cfg.CfgBuilder.BuildAndValidate*"></a>
+
+  <h3 id="Apq_Cfg_CfgBuilder_BuildAndValidate_System_Boolean_" data-uid="Apq.Cfg.CfgBuilder.BuildAndValidate(System.Boolean)">
+  BuildAndValidate(bool)
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>构建配置根实例并验证</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public (ICfgRoot Config, ValidationResult Result) BuildAndValidate(bool throwOnError = true)</code></pre>
+  </div>
+
+  <h4 class="section">Parameters</h4>
+  <dl class="parameters">
+    <dt><code>throwOnError</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
+    <dd><p>验证失败时是否抛出异常,默认为 true</p>
+</dd>
+  </dl>
+
+  <h4 class="section">Returns</h4>
+  <dl class="parameters">
+    <dt>(<a class="xref" href="Apq.Cfg.ICfgRoot.html">ICfgRoot</a> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.valuetuple-apq.cfg.icfgroot,apq.cfg.validation.validationresult-.config">Config</a>, <a class="xref" href="Apq.Cfg.Validation.ValidationResult.html">ValidationResult</a> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.valuetuple-apq.cfg.icfgroot,apq.cfg.validation.validationresult-.result">Result</a>)</dt>
+    <dd><p>配置根实例和验证结果的元组</p>
+</dd>
+  </dl>
+
+
+
+
+
+
+  <h4 class="section" id="Apq_Cfg_CfgBuilder_BuildAndValidate_System_Boolean__examples">Examples</h4>
+  <pre><code class="lang-csharp">// 构建并验证,失败时抛出异常
+var cfg = new CfgBuilder()
+    .AddJson("config.json", level: 0)
+    .AddValidation(v =&gt; v.Required("Database:ConnectionString"))
+    .BuildAndValidate();
+
+// 构建并验证,不抛出异常
+var (cfg2, result) = new CfgBuilder()
+    .AddJson("config.json", level: 0)
+    .AddValidation(v =&gt; v.Required("Database:ConnectionString"))
+    .BuildAndValidate(throwOnError: false);
+if (!result.IsValid)
+{
+    // 处理验证错误
+}</code></pre>
+
+
+
+  <h4 class="section">Exceptions</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="Apq.Cfg.Validation.ConfigValidationException.html">ConfigValidationException</a></dt>
+    <dd><p>当 throwOnError 为 true 且验证失败时抛出</p>
+</dd>
+  </dl>
+
+
+
   <a id="Apq_Cfg_CfgBuilder_ConfigureEncodingMapping_" data-uid="Apq.Cfg.CfgBuilder.ConfigureEncodingMapping*"></a>
 
   <h3 id="Apq_Cfg_CfgBuilder_ConfigureEncodingMapping_System_Action_Apq_Cfg_EncodingSupport_EncodingMappingConfig__" data-uid="Apq.Cfg.CfgBuilder.ConfigureEncodingMapping(System.Action{Apq.Cfg.EncodingSupport.EncodingMappingConfig})">

+ 285 - 0
docs/site/public/api-reference/api/Apq.Cfg.CfgBuilderTemplateExtensions.html

@@ -0,0 +1,285 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8">
+      <title>Class CfgBuilderTemplateExtensions | Apq.Cfg API </title>
+      <meta name="viewport" content="width=device-width, initial-scale=1.0">
+      <meta name="title" content="Class CfgBuilderTemplateExtensions | Apq.Cfg API ">
+      
+      <meta name="description" content="CfgBuilder 模板扩展方法">
+      <link rel="icon" href="../favicon.svg">
+      <link rel="stylesheet" href="../public/docfx.min.css">
+      <link rel="stylesheet" href="../public/main.css">
+      <meta name="docfx:navrel" content="../toc.html">
+      <meta name="docfx:tocrel" content="toc.html">
+      
+      <meta name="docfx:rel" content="../">
+      
+      
+      
+      <meta name="loc:inThisArticle" content="In this article">
+      <meta name="loc:searchResultsCount" content="{count} results for &quot;{query}&quot;">
+      <meta name="loc:searchNoResults" content="No results for &quot;{query}&quot;">
+      <meta name="loc:tocFilter" content="Filter by title">
+      <meta name="loc:nextArticle" content="Next">
+      <meta name="loc:prevArticle" content="Previous">
+      <meta name="loc:themeLight" content="Light">
+      <meta name="loc:themeDark" content="Dark">
+      <meta name="loc:themeAuto" content="Auto">
+      <meta name="loc:changeTheme" content="Change theme">
+      <meta name="loc:copy" content="Copy">
+      <meta name="loc:downloadPdf" content="Download PDF">
+
+      <script type="module" src="./../public/docfx.min.js"></script>
+
+      <script>
+        const theme = localStorage.getItem('theme') || 'auto'
+        document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
+      </script>
+
+  </head>
+
+  <body class="tex2jax_ignore" data-layout="" data-yaml-mime="ManagedReference">
+    <header class="bg-body border-bottom">
+      <nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
+        <div class="container-xxl flex-nowrap">
+          <a class="navbar-brand" href="../index.html">
+            <img id="logo" class="svg" src="../images/logo-small.svg" alt="Apq.Cfg">
+            Apq.Cfg
+          </a>
+          <button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
+            <i class="bi bi-three-dots"></i>
+          </button>
+          <div class="collapse navbar-collapse" id="navpanel">
+            <div id="navbar">
+              <form class="search" role="search" id="search">
+                <i class="bi bi-search"></i>
+                <input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
+              </form>
+            </div>
+          </div>
+        </div>
+      </nav>
+    </header>
+
+    <main class="container-xxl">
+      <div class="toc-offcanvas">
+        <div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
+          <div class="offcanvas-header">
+            <h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
+            <button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
+          </div>
+          <div class="offcanvas-body">
+            <nav class="toc" id="toc"></nav>
+          </div>
+        </div>
+      </div>
+
+      <div class="content">
+        <div class="actionbar">
+          <button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
+            <i class="bi bi-list"></i>
+          </button>
+
+          <nav id="breadcrumb"></nav>
+        </div>
+
+        <article data-uid="Apq.Cfg.CfgBuilderTemplateExtensions">
+
+
+
+  <h1 id="Apq_Cfg_CfgBuilderTemplateExtensions" data-uid="Apq.Cfg.CfgBuilderTemplateExtensions" class="text-break">
+Class CfgBuilderTemplateExtensions  
+  </h1>
+
+  <div class="facts text-secondary">
+    <dl><dt>Namespace</dt><dd><a class="xref" href="Apq.html">Apq</a>.<a class="xref" href="Apq.Cfg.html">Cfg</a></dd></dl>
+  <dl><dt>Assembly</dt><dd>Apq.Cfg.dll</dd></dl>
+  </div>
+
+  <div class="markdown summary"><p>CfgBuilder 模板扩展方法</p>
+</div>
+  <div class="markdown conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public static class CfgBuilderTemplateExtensions</code></pre>
+  </div>
+
+
+
+
+  <dl class="typelist inheritance">
+    <dt>Inheritance</dt>
+    <dd>
+      <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
+      <div><span class="xref">CfgBuilderTemplateExtensions</span></div>
+    </dd>
+  </dl>
+
+
+
+  <dl class="typelist inheritedMembers">
+    <dt>Inherited Members</dt>
+    <dd>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object)</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object, object)</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone">object.MemberwiseClone()</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object, object)</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>
+    </div>
+  </dd></dl>
+
+
+
+
+
+
+  <h2 class="section" id="methods">Methods
+</h2>
+
+
+  <a id="Apq_Cfg_CfgBuilderTemplateExtensions_AddVariableResolver_" data-uid="Apq.Cfg.CfgBuilderTemplateExtensions.AddVariableResolver*"></a>
+
+  <h3 id="Apq_Cfg_CfgBuilderTemplateExtensions_AddVariableResolver_Apq_Cfg_CfgBuilder_Apq_Cfg_Template_IVariableResolver_" data-uid="Apq.Cfg.CfgBuilderTemplateExtensions.AddVariableResolver(Apq.Cfg.CfgBuilder,Apq.Cfg.Template.IVariableResolver)">
+  AddVariableResolver(CfgBuilder, IVariableResolver)
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>添加自定义变量解析器</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public static CfgBuilder AddVariableResolver(this CfgBuilder builder, IVariableResolver resolver)</code></pre>
+  </div>
+
+  <h4 class="section">Parameters</h4>
+  <dl class="parameters">
+    <dt><code>builder</code> <a class="xref" href="Apq.Cfg.CfgBuilder.html">CfgBuilder</a></dt>
+    <dd><p>配置构建器</p>
+</dd>
+    <dt><code>resolver</code> <a class="xref" href="Apq.Cfg.Template.IVariableResolver.html">IVariableResolver</a></dt>
+    <dd><p>变量解析器</p>
+</dd>
+  </dl>
+
+  <h4 class="section">Returns</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="Apq.Cfg.CfgBuilder.html">CfgBuilder</a></dt>
+    <dd><p>配置构建器实例,支持链式调用</p>
+</dd>
+  </dl>
+
+
+
+
+
+
+  <h4 class="section" id="Apq_Cfg_CfgBuilderTemplateExtensions_AddVariableResolver_Apq_Cfg_CfgBuilder_Apq_Cfg_Template_IVariableResolver__examples">Examples</h4>
+  <pre><code class="lang-csharp">var cfg = new CfgBuilder()
+    .AddJson("config.json", level: 0)
+    .AddVariableResolver(new CustomResolver())
+    .Build();</code></pre>
+
+
+
+
+
+
+  <a id="Apq_Cfg_CfgBuilderTemplateExtensions_ConfigureVariableResolution_" data-uid="Apq.Cfg.CfgBuilderTemplateExtensions.ConfigureVariableResolution*"></a>
+
+  <h3 id="Apq_Cfg_CfgBuilderTemplateExtensions_ConfigureVariableResolution_Apq_Cfg_CfgBuilder_System_Action_Apq_Cfg_Template_VariableResolutionOptions__" data-uid="Apq.Cfg.CfgBuilderTemplateExtensions.ConfigureVariableResolution(Apq.Cfg.CfgBuilder,System.Action{Apq.Cfg.Template.VariableResolutionOptions})">
+  ConfigureVariableResolution(CfgBuilder, Action&lt;VariableResolutionOptions&gt;)
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>启用变量解析功能</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public static CfgBuilder ConfigureVariableResolution(this CfgBuilder builder, Action&lt;VariableResolutionOptions&gt; configure)</code></pre>
+  </div>
+
+  <h4 class="section">Parameters</h4>
+  <dl class="parameters">
+    <dt><code>builder</code> <a class="xref" href="Apq.Cfg.CfgBuilder.html">CfgBuilder</a></dt>
+    <dd><p>配置构建器</p>
+</dd>
+    <dt><code>configure</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.action-1">Action</a>&lt;<a class="xref" href="Apq.Cfg.Template.VariableResolutionOptions.html">VariableResolutionOptions</a>&gt;</dt>
+    <dd><p>配置选项委托</p>
+</dd>
+  </dl>
+
+  <h4 class="section">Returns</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="Apq.Cfg.CfgBuilder.html">CfgBuilder</a></dt>
+    <dd><p>配置构建器实例,支持链式调用</p>
+</dd>
+  </dl>
+
+
+
+
+
+
+  <h4 class="section" id="Apq_Cfg_CfgBuilderTemplateExtensions_ConfigureVariableResolution_Apq_Cfg_CfgBuilder_System_Action_Apq_Cfg_Template_VariableResolutionOptions___examples">Examples</h4>
+  <pre><code class="lang-csharp">var cfg = new CfgBuilder()
+    .AddJson("config.json", level: 0)
+    .ConfigureVariableResolution(options =&gt;
+    {
+        options.MaxRecursionDepth = 5;
+        options.UnresolvedBehavior = UnresolvedVariableBehavior.Throw;
+    })
+    .Build();
+
+// 使用解析后的值
+var logPath = cfg.GetResolved("App:LogPath");</code></pre>
+
+
+  <h4 class="section" id="Apq_Cfg_CfgBuilderTemplateExtensions_ConfigureVariableResolution_Apq_Cfg_CfgBuilder_System_Action_Apq_Cfg_Template_VariableResolutionOptions___remarks">Remarks</h4>
+  <div class="markdown level1 remarks"><p>启用后,可以使用 GetResolved() 方法获取解析变量后的配置值。
+此方法主要用于配置自定义解析选项,如果使用默认选项,可以直接调用 GetResolved()。</p>
+</div>
+
+
+
+
+
+</article>
+
+
+
+      </div>
+
+      <div class="affix">
+        <nav id="affix"></nav>
+      </div>
+    </main>
+
+    <div class="container-xxl search-results" id="search-results"></div>
+
+    <footer class="border-top text-secondary">
+      <div class="container-xxl">
+        <div class="flex-fill">
+          Apq.Cfg - .NET 统一配置组件库 (基于 .NET 10.0,兼容 .NET 8.0)
+        </div>
+      </div>
+    </footer>
+  </body>
+</html>

+ 701 - 0
docs/site/public/api-reference/api/Apq.Cfg.CfgSourceLevels.html

@@ -0,0 +1,701 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8">
+      <title>Class CfgSourceLevels | Apq.Cfg API </title>
+      <meta name="viewport" content="width=device-width, initial-scale=1.0">
+      <meta name="title" content="Class CfgSourceLevels | Apq.Cfg API ">
+      
+      <meta name="description" content="配置源默认层级常量">
+      <link rel="icon" href="../favicon.svg">
+      <link rel="stylesheet" href="../public/docfx.min.css">
+      <link rel="stylesheet" href="../public/main.css">
+      <meta name="docfx:navrel" content="../toc.html">
+      <meta name="docfx:tocrel" content="toc.html">
+      
+      <meta name="docfx:rel" content="../">
+      
+      
+      
+      <meta name="loc:inThisArticle" content="In this article">
+      <meta name="loc:searchResultsCount" content="{count} results for &quot;{query}&quot;">
+      <meta name="loc:searchNoResults" content="No results for &quot;{query}&quot;">
+      <meta name="loc:tocFilter" content="Filter by title">
+      <meta name="loc:nextArticle" content="Next">
+      <meta name="loc:prevArticle" content="Previous">
+      <meta name="loc:themeLight" content="Light">
+      <meta name="loc:themeDark" content="Dark">
+      <meta name="loc:themeAuto" content="Auto">
+      <meta name="loc:changeTheme" content="Change theme">
+      <meta name="loc:copy" content="Copy">
+      <meta name="loc:downloadPdf" content="Download PDF">
+
+      <script type="module" src="./../public/docfx.min.js"></script>
+
+      <script>
+        const theme = localStorage.getItem('theme') || 'auto'
+        document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
+      </script>
+
+  </head>
+
+  <body class="tex2jax_ignore" data-layout="" data-yaml-mime="ManagedReference">
+    <header class="bg-body border-bottom">
+      <nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
+        <div class="container-xxl flex-nowrap">
+          <a class="navbar-brand" href="../index.html">
+            <img id="logo" class="svg" src="../images/logo-small.svg" alt="Apq.Cfg">
+            Apq.Cfg
+          </a>
+          <button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
+            <i class="bi bi-three-dots"></i>
+          </button>
+          <div class="collapse navbar-collapse" id="navpanel">
+            <div id="navbar">
+              <form class="search" role="search" id="search">
+                <i class="bi bi-search"></i>
+                <input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
+              </form>
+            </div>
+          </div>
+        </div>
+      </nav>
+    </header>
+
+    <main class="container-xxl">
+      <div class="toc-offcanvas">
+        <div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
+          <div class="offcanvas-header">
+            <h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
+            <button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
+          </div>
+          <div class="offcanvas-body">
+            <nav class="toc" id="toc"></nav>
+          </div>
+        </div>
+      </div>
+
+      <div class="content">
+        <div class="actionbar">
+          <button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
+            <i class="bi bi-list"></i>
+          </button>
+
+          <nav id="breadcrumb"></nav>
+        </div>
+
+        <article data-uid="Apq.Cfg.CfgSourceLevels">
+
+
+
+  <h1 id="Apq_Cfg_CfgSourceLevels" data-uid="Apq.Cfg.CfgSourceLevels" class="text-break">
+Class CfgSourceLevels  
+  </h1>
+
+  <div class="facts text-secondary">
+    <dl><dt>Namespace</dt><dd><a class="xref" href="Apq.html">Apq</a>.<a class="xref" href="Apq.Cfg.html">Cfg</a></dd></dl>
+  <dl><dt>Assembly</dt><dd>Apq.Cfg.dll</dd></dl>
+  </div>
+
+  <div class="markdown summary"><p>配置源默认层级常量</p>
+</div>
+  <div class="markdown conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public static class CfgSourceLevels</code></pre>
+  </div>
+
+
+
+
+  <dl class="typelist inheritance">
+    <dt>Inheritance</dt>
+    <dd>
+      <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
+      <div><span class="xref">CfgSourceLevels</span></div>
+    </dd>
+  </dl>
+
+
+
+  <dl class="typelist inheritedMembers">
+    <dt>Inherited Members</dt>
+    <dd>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object)</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object, object)</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone">object.MemberwiseClone()</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object, object)</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>
+    </div>
+  </dd></dl>
+
+
+
+
+  <h2 id="Apq_Cfg_CfgSourceLevels_remarks">Remarks</h2>
+  <div class="markdown level0 remarks"><p>层级规划原则:数值越大优先级越高,高层级覆盖低层级</p>
+<p>
+| 层级范围 | 用途 | 配置源 |
+|----------|------|--------|
+| 0 | 基础配置文件 | Json, Ini, Xml, Yaml, Toml |
+| 100 | 远程存储 | Redis, Database |
+| 200 | 配置中心 | Consul, Etcd, Nacos, Apollo, Zookeeper |
+| 300 | 密钥管理 | Vault |
+| 400 | 环境相关 | .env, EnvironmentVariables(最高优先级覆盖) |
+</p>
+</div>
+
+
+  <h2 class="section" id="fields">Fields
+</h2>
+
+
+
+  <h3 id="Apq_Cfg_CfgSourceLevels_Apollo" data-uid="Apq.Cfg.CfgSourceLevels.Apollo">
+  Apollo
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>Apollo 配置中心默认层级 (200)</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public const int Apollo = 200</code></pre>
+  </div>
+
+
+
+
+  <h4 class="section">Field Value</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
+    <dd></dd>
+  </dl>
+
+
+
+
+
+  <h4 class="section" id="Apq_Cfg_CfgSourceLevels_Apollo_remarks">Remarks</h4>
+  <div class="markdown level1 remarks"><p>配置中心,优先级高于远程存储</p>
+</div>
+
+
+
+
+
+  <h3 id="Apq_Cfg_CfgSourceLevels_Consul" data-uid="Apq.Cfg.CfgSourceLevels.Consul">
+  Consul
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>Consul 配置中心默认层级 (200)</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public const int Consul = 200</code></pre>
+  </div>
+
+
+
+
+  <h4 class="section">Field Value</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
+    <dd></dd>
+  </dl>
+
+
+
+
+
+  <h4 class="section" id="Apq_Cfg_CfgSourceLevels_Consul_remarks">Remarks</h4>
+  <div class="markdown level1 remarks"><p>配置中心,优先级高于远程存储</p>
+</div>
+
+
+
+
+
+  <h3 id="Apq_Cfg_CfgSourceLevels_Database" data-uid="Apq.Cfg.CfgSourceLevels.Database">
+  Database
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>数据库配置源默认层级 (100)</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public const int Database = 100</code></pre>
+  </div>
+
+
+
+
+  <h4 class="section">Field Value</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
+    <dd></dd>
+  </dl>
+
+
+
+
+
+  <h4 class="section" id="Apq_Cfg_CfgSourceLevels_Database_remarks">Remarks</h4>
+  <div class="markdown level1 remarks"><p>远程存储配置源,优先级高于本地文件</p>
+</div>
+
+
+
+
+
+  <h3 id="Apq_Cfg_CfgSourceLevels_Env" data-uid="Apq.Cfg.CfgSourceLevels.Env">
+  Env
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>.env 文件默认层级 (400)</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public const int Env = 400</code></pre>
+  </div>
+
+
+
+
+  <h4 class="section">Field Value</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
+    <dd></dd>
+  </dl>
+
+
+
+
+
+  <h4 class="section" id="Apq_Cfg_CfgSourceLevels_Env_remarks">Remarks</h4>
+  <div class="markdown level1 remarks"><p>.env 文件用于环境特定配置,与环境变量同级。
+当 setEnvironmentVariables=true 时,.env 内容会写入系统环境变量。</p>
+</div>
+
+
+
+
+
+  <h3 id="Apq_Cfg_CfgSourceLevels_EnvironmentVariables" data-uid="Apq.Cfg.CfgSourceLevels.EnvironmentVariables">
+  EnvironmentVariables
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>环境变量默认层级 (400)</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public const int EnvironmentVariables = 400</code></pre>
+  </div>
+
+
+
+
+  <h4 class="section">Field Value</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
+    <dd></dd>
+  </dl>
+
+
+
+
+
+  <h4 class="section" id="Apq_Cfg_CfgSourceLevels_EnvironmentVariables_remarks">Remarks</h4>
+  <div class="markdown level1 remarks"><p>环境变量具有最高优先级,用于运行时覆盖</p>
+</div>
+
+
+
+
+
+  <h3 id="Apq_Cfg_CfgSourceLevels_Etcd" data-uid="Apq.Cfg.CfgSourceLevels.Etcd">
+  Etcd
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>Etcd 配置中心默认层级 (200)</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public const int Etcd = 200</code></pre>
+  </div>
+
+
+
+
+  <h4 class="section">Field Value</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
+    <dd></dd>
+  </dl>
+
+
+
+
+
+  <h4 class="section" id="Apq_Cfg_CfgSourceLevels_Etcd_remarks">Remarks</h4>
+  <div class="markdown level1 remarks"><p>配置中心,优先级高于远程存储</p>
+</div>
+
+
+
+
+
+  <h3 id="Apq_Cfg_CfgSourceLevels_Ini" data-uid="Apq.Cfg.CfgSourceLevels.Ini">
+  Ini
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>INI 文件默认层级 (0)</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public const int Ini = 0</code></pre>
+  </div>
+
+
+
+
+  <h4 class="section">Field Value</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
+    <dd></dd>
+  </dl>
+
+
+
+
+
+  <h4 class="section" id="Apq_Cfg_CfgSourceLevels_Ini_remarks">Remarks</h4>
+  <div class="markdown level1 remarks"><p>基础配置文件</p>
+</div>
+
+
+
+
+
+  <h3 id="Apq_Cfg_CfgSourceLevels_Json" data-uid="Apq.Cfg.CfgSourceLevels.Json">
+  Json
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>JSON 文件默认层级 (0)</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public const int Json = 0</code></pre>
+  </div>
+
+
+
+
+  <h4 class="section">Field Value</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
+    <dd></dd>
+  </dl>
+
+
+
+
+
+  <h4 class="section" id="Apq_Cfg_CfgSourceLevels_Json_remarks">Remarks</h4>
+  <div class="markdown level1 remarks"><p>基础配置文件,通常作为应用程序的默认配置</p>
+</div>
+
+
+
+
+
+  <h3 id="Apq_Cfg_CfgSourceLevels_Nacos" data-uid="Apq.Cfg.CfgSourceLevels.Nacos">
+  Nacos
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>Nacos 配置中心默认层级 (200)</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public const int Nacos = 200</code></pre>
+  </div>
+
+
+
+
+  <h4 class="section">Field Value</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
+    <dd></dd>
+  </dl>
+
+
+
+
+
+  <h4 class="section" id="Apq_Cfg_CfgSourceLevels_Nacos_remarks">Remarks</h4>
+  <div class="markdown level1 remarks"><p>配置中心,优先级高于远程存储</p>
+</div>
+
+
+
+
+
+  <h3 id="Apq_Cfg_CfgSourceLevels_Redis" data-uid="Apq.Cfg.CfgSourceLevels.Redis">
+  Redis
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>Redis 配置源默认层级 (100)</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public const int Redis = 100</code></pre>
+  </div>
+
+
+
+
+  <h4 class="section">Field Value</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
+    <dd></dd>
+  </dl>
+
+
+
+
+
+  <h4 class="section" id="Apq_Cfg_CfgSourceLevels_Redis_remarks">Remarks</h4>
+  <div class="markdown level1 remarks"><p>远程存储配置源,优先级高于本地文件</p>
+</div>
+
+
+
+
+
+  <h3 id="Apq_Cfg_CfgSourceLevels_Toml" data-uid="Apq.Cfg.CfgSourceLevels.Toml">
+  Toml
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>TOML 文件默认层级 (0)</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public const int Toml = 0</code></pre>
+  </div>
+
+
+
+
+  <h4 class="section">Field Value</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
+    <dd></dd>
+  </dl>
+
+
+
+
+
+  <h4 class="section" id="Apq_Cfg_CfgSourceLevels_Toml_remarks">Remarks</h4>
+  <div class="markdown level1 remarks"><p>基础配置文件</p>
+</div>
+
+
+
+
+
+  <h3 id="Apq_Cfg_CfgSourceLevels_Vault" data-uid="Apq.Cfg.CfgSourceLevels.Vault">
+  Vault
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>HashiCorp Vault 密钥管理默认层级 (300)</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public const int Vault = 300</code></pre>
+  </div>
+
+
+
+
+  <h4 class="section">Field Value</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
+    <dd></dd>
+  </dl>
+
+
+
+
+
+  <h4 class="section" id="Apq_Cfg_CfgSourceLevels_Vault_remarks">Remarks</h4>
+  <div class="markdown level1 remarks"><p>密钥管理,优先级高于配置中心,用于敏感配置</p>
+</div>
+
+
+
+
+
+  <h3 id="Apq_Cfg_CfgSourceLevels_Xml" data-uid="Apq.Cfg.CfgSourceLevels.Xml">
+  Xml
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>XML 文件默认层级 (0)</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public const int Xml = 0</code></pre>
+  </div>
+
+
+
+
+  <h4 class="section">Field Value</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
+    <dd></dd>
+  </dl>
+
+
+
+
+
+  <h4 class="section" id="Apq_Cfg_CfgSourceLevels_Xml_remarks">Remarks</h4>
+  <div class="markdown level1 remarks"><p>基础配置文件</p>
+</div>
+
+
+
+
+
+  <h3 id="Apq_Cfg_CfgSourceLevels_Yaml" data-uid="Apq.Cfg.CfgSourceLevels.Yaml">
+  Yaml
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>YAML 文件默认层级 (0)</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public const int Yaml = 0</code></pre>
+  </div>
+
+
+
+
+  <h4 class="section">Field Value</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
+    <dd></dd>
+  </dl>
+
+
+
+
+
+  <h4 class="section" id="Apq_Cfg_CfgSourceLevels_Yaml_remarks">Remarks</h4>
+  <div class="markdown level1 remarks"><p>基础配置文件</p>
+</div>
+
+
+
+
+
+  <h3 id="Apq_Cfg_CfgSourceLevels_Zookeeper" data-uid="Apq.Cfg.CfgSourceLevels.Zookeeper">
+  Zookeeper
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>Zookeeper 配置中心默认层级 (200)</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public const int Zookeeper = 200</code></pre>
+  </div>
+
+
+
+
+  <h4 class="section">Field Value</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
+    <dd></dd>
+  </dl>
+
+
+
+
+
+  <h4 class="section" id="Apq_Cfg_CfgSourceLevels_Zookeeper_remarks">Remarks</h4>
+  <div class="markdown level1 remarks"><p>配置中心,优先级高于远程存储</p>
+</div>
+
+
+
+
+
+</article>
+
+
+
+      </div>
+
+      <div class="affix">
+        <nav id="affix"></nav>
+      </div>
+    </main>
+
+    <div class="container-xxl search-results" id="search-results"></div>
+
+    <footer class="border-top text-secondary">
+      <div class="container-xxl">
+        <div class="flex-fill">
+          Apq.Cfg - .NET 统一配置组件库 (基于 .NET 10.0,兼容 .NET 8.0)
+        </div>
+      </div>
+    </footer>
+  </body>
+</html>

+ 9 - 9
docs/site/public/api-reference/api/Apq.Cfg.Consul.CfgBuilderExtensions.html

@@ -165,7 +165,7 @@ Class CfgBuilderExtensions
   <div class="markdown level1 conceptual"></div>
 
   <div class="codewrapper">
-    <pre><code class="lang-csharp hljs">public static CfgBuilder AddConsul(this CfgBuilder builder, Action&lt;ConsulCfgOptions&gt; configure, int level, bool isPrimaryWriter = false)</code></pre>
+    <pre><code class="lang-csharp hljs">public static CfgBuilder AddConsul(this CfgBuilder builder, Action&lt;ConsulCfgOptions&gt; configure, int level = 200, bool isPrimaryWriter = false)</code></pre>
   </div>
 
   <h4 class="section">Parameters</h4>
@@ -177,17 +177,17 @@ Class CfgBuilderExtensions
     <dd><p>配置选项</p>
 </dd>
     <dt><code>level</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
-    <dd><p>配置层级,数值越大优先级越高</p>
+    <dd><p>配置层级,数值越大优先级越高,默认为 <a class="xref" href="Apq.Cfg.CfgSourceLevels.html#Apq_Cfg_CfgSourceLevels_Consul">Consul</a> (15)</p>
 </dd>
     <dt><code>isPrimaryWriter</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
-    <dd><p>是否为主写入源</p>
+    <dd><p>是否为主写入源,默认为false</p>
 </dd>
   </dl>
 
   <h4 class="section">Returns</h4>
   <dl class="parameters">
     <dt><a class="xref" href="Apq.Cfg.CfgBuilder.html">CfgBuilder</a></dt>
-    <dd><p>配置构建器</p>
+    <dd><p>配置构建器实例,支持链式调用</p>
 </dd>
   </dl>
 
@@ -213,7 +213,7 @@ Class CfgBuilderExtensions
   <div class="markdown level1 conceptual"></div>
 
   <div class="codewrapper">
-    <pre><code class="lang-csharp hljs">public static CfgBuilder AddConsul(this CfgBuilder builder, string address, string keyPrefix = &quot;config/&quot;, int level = 0, bool enableHotReload = true)</code></pre>
+    <pre><code class="lang-csharp hljs">public static CfgBuilder AddConsul(this CfgBuilder builder, string address, string keyPrefix = &quot;config/&quot;, int level = 200, bool enableHotReload = true)</code></pre>
   </div>
 
   <h4 class="section">Parameters</h4>
@@ -225,20 +225,20 @@ Class CfgBuilderExtensions
     <dd><p>Consul 服务地址</p>
 </dd>
     <dt><code>keyPrefix</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
-    <dd><p>KV 键前缀</p>
+    <dd><p>KV 键前缀,默认为 &quot;config/&quot;</p>
 </dd>
     <dt><code>level</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
-    <dd><p>配置层级</p>
+    <dd><p>配置层级,数值越大优先级越高,默认为 <a class="xref" href="Apq.Cfg.CfgSourceLevels.html#Apq_Cfg_CfgSourceLevels_Consul">Consul</a> (15)</p>
 </dd>
     <dt><code>enableHotReload</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
-    <dd><p>是否启用热重载</p>
+    <dd><p>是否启用热重载,默认为true</p>
 </dd>
   </dl>
 
   <h4 class="section">Returns</h4>
   <dl class="parameters">
     <dt><a class="xref" href="Apq.Cfg.CfgBuilder.html">CfgBuilder</a></dt>
-    <dd><p>配置构建器</p>
+    <dd><p>配置构建器实例,支持链式调用</p>
 </dd>
   </dl>
 

+ 11 - 6
docs/site/public/api-reference/api/Apq.Cfg.Database.CfgBuilderExtensions.html

@@ -165,25 +165,30 @@ Class CfgBuilderExtensions
   <div class="markdown level1 conceptual"></div>
 
   <div class="codewrapper">
-    <pre><code class="lang-csharp hljs">public static CfgBuilder AddDatabase(this CfgBuilder builder, Action&lt;DatabaseOptions&gt; configure, int level, bool isPrimaryWriter = false)</code></pre>
+    <pre><code class="lang-csharp hljs">public static CfgBuilder AddDatabase(this CfgBuilder builder, Action&lt;DatabaseOptions&gt; configure, int level = 100, bool isPrimaryWriter = false)</code></pre>
   </div>
 
   <h4 class="section">Parameters</h4>
   <dl class="parameters">
     <dt><code>builder</code> <a class="xref" href="Apq.Cfg.CfgBuilder.html">CfgBuilder</a></dt>
-    <dd></dd>
+    <dd><p>配置构建器</p>
+</dd>
     <dt><code>configure</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.action-1">Action</a>&lt;<a class="xref" href="Apq.Cfg.Database.DatabaseOptions.html">DatabaseOptions</a>&gt;</dt>
-    <dd></dd>
+    <dd><p>数据库配置选项</p>
+</dd>
     <dt><code>level</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
-    <dd></dd>
+    <dd><p>配置层级,数值越大优先级越高,默认为 <a class="xref" href="Apq.Cfg.CfgSourceLevels.html#Apq_Cfg_CfgSourceLevels_Database">Database</a> (10)</p>
+</dd>
     <dt><code>isPrimaryWriter</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
-    <dd></dd>
+    <dd><p>是否为主要写入器,默认为false</p>
+</dd>
   </dl>
 
   <h4 class="section">Returns</h4>
   <dl class="parameters">
     <dt><a class="xref" href="Apq.Cfg.CfgBuilder.html">CfgBuilder</a></dt>
-    <dd></dd>
+    <dd><p>配置构建器实例,支持链式调用</p>
+</dd>
   </dl>
 
 

+ 8 - 8
docs/site/public/api-reference/api/Apq.Cfg.Env.CfgBuilderExtensions.html

@@ -165,7 +165,7 @@ Class CfgBuilderExtensions
   <div class="markdown level1 conceptual"></div>
 
   <div class="codewrapper">
-    <pre><code class="lang-csharp hljs">public static CfgBuilder AddEnv(this CfgBuilder builder, string path, int level, bool writeable = false, bool optional = true, bool reloadOnChange = true, bool isPrimaryWriter = false, bool setEnvironmentVariables = false)</code></pre>
+    <pre><code class="lang-csharp hljs">public static CfgBuilder AddEnv(this CfgBuilder builder, string path, int level = 400, bool writeable = false, bool optional = true, bool reloadOnChange = true, bool isPrimaryWriter = false, bool setEnvironmentVariables = false)</code></pre>
   </div>
 
   <h4 class="section">Parameters</h4>
@@ -177,29 +177,29 @@ Class CfgBuilderExtensions
     <dd><p>.env 文件路径</p>
 </dd>
     <dt><code>level</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
-    <dd><p>配置层级,数值越大优先级越高</p>
+    <dd><p>配置层级,数值越大优先级越高,默认为 <a class="xref" href="Apq.Cfg.CfgSourceLevels.html#Apq_Cfg_CfgSourceLevels_Env">Env</a> (5)</p>
 </dd>
     <dt><code>writeable</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
-    <dd><p>是否可写</p>
+    <dd><p>是否可写,默认为false</p>
 </dd>
     <dt><code>optional</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
-    <dd><p>文件不存在时是否忽略</p>
+    <dd><p>文件不存在时是否忽略,默认为true</p>
 </dd>
     <dt><code>reloadOnChange</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
-    <dd><p>文件变更时是否自动重载</p>
+    <dd><p>文件变更时是否自动重载,默认为true</p>
 </dd>
     <dt><code>isPrimaryWriter</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
-    <dd><p>是否为默认写入目标</p>
+    <dd><p>是否为默认写入目标,默认为false</p>
 </dd>
     <dt><code>setEnvironmentVariables</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
-    <dd><p>是否将配置写入系统环境变量(默认为 false)</p>
+    <dd><p>是否将配置写入系统环境变量,默认为false</p>
 </dd>
   </dl>
 
   <h4 class="section">Returns</h4>
   <dl class="parameters">
     <dt><a class="xref" href="Apq.Cfg.CfgBuilder.html">CfgBuilder</a></dt>
-    <dd><p>配置构建器</p>
+    <dd><p>配置构建器实例,支持链式调用</p>
 </dd>
   </dl>
 

+ 14 - 14
docs/site/public/api-reference/api/Apq.Cfg.Etcd.CfgBuilderExtensions.html

@@ -165,7 +165,7 @@ Class CfgBuilderExtensions
   <div class="markdown level1 conceptual"></div>
 
   <div class="codewrapper">
-    <pre><code class="lang-csharp hljs">public static CfgBuilder AddEtcd(this CfgBuilder builder, Action&lt;EtcdCfgOptions&gt; configure, int level, bool isPrimaryWriter = false)</code></pre>
+    <pre><code class="lang-csharp hljs">public static CfgBuilder AddEtcd(this CfgBuilder builder, Action&lt;EtcdCfgOptions&gt; configure, int level = 200, bool isPrimaryWriter = false)</code></pre>
   </div>
 
   <h4 class="section">Parameters</h4>
@@ -177,17 +177,17 @@ Class CfgBuilderExtensions
     <dd><p>配置选项</p>
 </dd>
     <dt><code>level</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
-    <dd><p>配置层级,数值越大优先级越高</p>
+    <dd><p>配置层级,数值越大优先级越高,默认为 <a class="xref" href="Apq.Cfg.CfgSourceLevels.html#Apq_Cfg_CfgSourceLevels_Etcd">Etcd</a> (15)</p>
 </dd>
     <dt><code>isPrimaryWriter</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
-    <dd><p>是否为主写入源</p>
+    <dd><p>是否为主写入源,默认为false</p>
 </dd>
   </dl>
 
   <h4 class="section">Returns</h4>
   <dl class="parameters">
     <dt><a class="xref" href="Apq.Cfg.CfgBuilder.html">CfgBuilder</a></dt>
-    <dd><p>配置构建器</p>
+    <dd><p>配置构建器实例,支持链式调用</p>
 </dd>
   </dl>
 
@@ -213,7 +213,7 @@ Class CfgBuilderExtensions
   <div class="markdown level1 conceptual"></div>
 
   <div class="codewrapper">
-    <pre><code class="lang-csharp hljs">public static CfgBuilder AddEtcd(this CfgBuilder builder, string endpoint, string keyPrefix = &quot;/config/&quot;, int level = 0, bool enableHotReload = true)</code></pre>
+    <pre><code class="lang-csharp hljs">public static CfgBuilder AddEtcd(this CfgBuilder builder, string endpoint, string keyPrefix = &quot;/config/&quot;, int level = 200, bool enableHotReload = true)</code></pre>
   </div>
 
   <h4 class="section">Parameters</h4>
@@ -225,20 +225,20 @@ Class CfgBuilderExtensions
     <dd><p>Etcd 服务端点</p>
 </dd>
     <dt><code>keyPrefix</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
-    <dd><p>KV 键前缀</p>
+    <dd><p>KV 键前缀,默认为 &quot;/config/&quot;</p>
 </dd>
     <dt><code>level</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
-    <dd><p>配置层级</p>
+    <dd><p>配置层级,数值越大优先级越高,默认为 <a class="xref" href="Apq.Cfg.CfgSourceLevels.html#Apq_Cfg_CfgSourceLevels_Etcd">Etcd</a> (15)</p>
 </dd>
     <dt><code>enableHotReload</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
-    <dd><p>是否启用热重载</p>
+    <dd><p>是否启用热重载,默认为true</p>
 </dd>
   </dl>
 
   <h4 class="section">Returns</h4>
   <dl class="parameters">
     <dt><a class="xref" href="Apq.Cfg.CfgBuilder.html">CfgBuilder</a></dt>
-    <dd><p>配置构建器</p>
+    <dd><p>配置构建器实例,支持链式调用</p>
 </dd>
   </dl>
 
@@ -264,7 +264,7 @@ Class CfgBuilderExtensions
   <div class="markdown level1 conceptual"></div>
 
   <div class="codewrapper">
-    <pre><code class="lang-csharp hljs">public static CfgBuilder AddEtcd(this CfgBuilder builder, string[] endpoints, string keyPrefix = &quot;/config/&quot;, int level = 0, bool enableHotReload = true)</code></pre>
+    <pre><code class="lang-csharp hljs">public static CfgBuilder AddEtcd(this CfgBuilder builder, string[] endpoints, string keyPrefix = &quot;/config/&quot;, int level = 200, bool enableHotReload = true)</code></pre>
   </div>
 
   <h4 class="section">Parameters</h4>
@@ -276,20 +276,20 @@ Class CfgBuilderExtensions
     <dd><p>Etcd 服务端点列表</p>
 </dd>
     <dt><code>keyPrefix</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
-    <dd><p>KV 键前缀</p>
+    <dd><p>KV 键前缀,默认为 &quot;/config/&quot;</p>
 </dd>
     <dt><code>level</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
-    <dd><p>配置层级</p>
+    <dd><p>配置层级,数值越大优先级越高,默认为 <a class="xref" href="Apq.Cfg.CfgSourceLevels.html#Apq_Cfg_CfgSourceLevels_Etcd">Etcd</a> (15)</p>
 </dd>
     <dt><code>enableHotReload</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
-    <dd><p>是否启用热重载</p>
+    <dd><p>是否启用热重载,默认为true</p>
 </dd>
   </dl>
 
   <h4 class="section">Returns</h4>
   <dl class="parameters">
     <dt><a class="xref" href="Apq.Cfg.CfgBuilder.html">CfgBuilder</a></dt>
-    <dd><p>配置构建器</p>
+    <dd><p>配置构建器实例,支持链式调用</p>
 </dd>
   </dl>
 

+ 75 - 0
docs/site/public/api-reference/api/Apq.Cfg.ICfgRoot.html

@@ -140,6 +140,81 @@ Interface ICfgRoot
   <div>
       <a class="xref" href="Apq.Cfg.CfgRootExtensions.html#Apq_Cfg_CfgRootExtensions_TryGet__1_Apq_Cfg_ICfgRoot_System_String___0__">CfgRootExtensions.TryGet&lt;T&gt;(ICfgRoot, string, out T?)</a>
   </div>
+  <div>
+      <a class="xref" href="Apq.Cfg.Snapshot.CfgRootSnapshotExtensions.html#Apq_Cfg_Snapshot_CfgRootSnapshotExtensions_ExportSnapshot_Apq_Cfg_ICfgRoot_Apq_Cfg_Snapshot_ExportOptions_">CfgRootSnapshotExtensions.ExportSnapshot(ICfgRoot, ExportOptions?)</a>
+  </div>
+  <div>
+      <a class="xref" href="Apq.Cfg.Snapshot.CfgRootSnapshotExtensions.html#Apq_Cfg_Snapshot_CfgRootSnapshotExtensions_ExportSnapshot_Apq_Cfg_ICfgRoot_Apq_Cfg_Snapshot_SnapshotExporter_Apq_Cfg_Snapshot_ExportOptions_">CfgRootSnapshotExtensions.ExportSnapshot(ICfgRoot, SnapshotExporter, ExportOptions?)</a>
+  </div>
+  <div>
+      <a class="xref" href="Apq.Cfg.Snapshot.CfgRootSnapshotExtensions.html#Apq_Cfg_Snapshot_CfgRootSnapshotExtensions_ExportSnapshot_Apq_Cfg_ICfgRoot_System_Action_Apq_Cfg_Snapshot_ExportOptions__">CfgRootSnapshotExtensions.ExportSnapshot(ICfgRoot, Action&lt;ExportOptions&gt;)</a>
+  </div>
+  <div>
+      <a class="xref" href="Apq.Cfg.Snapshot.CfgRootSnapshotExtensions.html#Apq_Cfg_Snapshot_CfgRootSnapshotExtensions_ExportSnapshotAsDictionary_Apq_Cfg_ICfgRoot_System_Boolean_">CfgRootSnapshotExtensions.ExportSnapshotAsDictionary(ICfgRoot, bool)</a>
+  </div>
+  <div>
+      <a class="xref" href="Apq.Cfg.Snapshot.CfgRootSnapshotExtensions.html#Apq_Cfg_Snapshot_CfgRootSnapshotExtensions_ExportSnapshotAsEnv_Apq_Cfg_ICfgRoot_System_String_System_Boolean_">CfgRootSnapshotExtensions.ExportSnapshotAsEnv(ICfgRoot, string?, bool)</a>
+  </div>
+  <div>
+      <a class="xref" href="Apq.Cfg.Snapshot.CfgRootSnapshotExtensions.html#Apq_Cfg_Snapshot_CfgRootSnapshotExtensions_ExportSnapshotAsJson_Apq_Cfg_ICfgRoot_System_Boolean_System_Boolean_">CfgRootSnapshotExtensions.ExportSnapshotAsJson(ICfgRoot, bool, bool)</a>
+  </div>
+  <div>
+      <a class="xref" href="Apq.Cfg.Snapshot.CfgRootSnapshotExtensions.html#Apq_Cfg_Snapshot_CfgRootSnapshotExtensions_ExportSnapshotAsKeyValue_Apq_Cfg_ICfgRoot_System_Boolean_">CfgRootSnapshotExtensions.ExportSnapshotAsKeyValue(ICfgRoot, bool)</a>
+  </div>
+  <div>
+      <a class="xref" href="Apq.Cfg.Snapshot.CfgRootSnapshotExtensions.html#Apq_Cfg_Snapshot_CfgRootSnapshotExtensions_ExportSnapshotAsync_Apq_Cfg_ICfgRoot_Apq_Cfg_Snapshot_SnapshotExporter_System_IO_Stream_Apq_Cfg_Snapshot_ExportOptions_System_Threading_CancellationToken_">CfgRootSnapshotExtensions.ExportSnapshotAsync(ICfgRoot, SnapshotExporter, Stream, ExportOptions?, CancellationToken)</a>
+  </div>
+  <div>
+      <a class="xref" href="Apq.Cfg.Snapshot.CfgRootSnapshotExtensions.html#Apq_Cfg_Snapshot_CfgRootSnapshotExtensions_ExportSnapshotAsync_Apq_Cfg_ICfgRoot_System_IO_Stream_Apq_Cfg_Snapshot_ExportOptions_System_Threading_CancellationToken_">CfgRootSnapshotExtensions.ExportSnapshotAsync(ICfgRoot, Stream, ExportOptions?, CancellationToken)</a>
+  </div>
+  <div>
+      <a class="xref" href="Apq.Cfg.Snapshot.CfgRootSnapshotExtensions.html#Apq_Cfg_Snapshot_CfgRootSnapshotExtensions_ExportSnapshotToFileAsync_Apq_Cfg_ICfgRoot_Apq_Cfg_Snapshot_SnapshotExporter_System_String_Apq_Cfg_Snapshot_ExportOptions_System_Threading_CancellationToken_">CfgRootSnapshotExtensions.ExportSnapshotToFileAsync(ICfgRoot, SnapshotExporter, string, ExportOptions?, CancellationToken)</a>
+  </div>
+  <div>
+      <a class="xref" href="Apq.Cfg.Snapshot.CfgRootSnapshotExtensions.html#Apq_Cfg_Snapshot_CfgRootSnapshotExtensions_ExportSnapshotToFileAsync_Apq_Cfg_ICfgRoot_System_String_Apq_Cfg_Snapshot_ExportOptions_System_Threading_CancellationToken_">CfgRootSnapshotExtensions.ExportSnapshotToFileAsync(ICfgRoot, string, ExportOptions?, CancellationToken)</a>
+  </div>
+  <div>
+      <a class="xref" href="Apq.Cfg.TemplateExtensions.html#Apq_Cfg_TemplateExtensions_GetManyResolved_Apq_Cfg_ICfgRoot_System_Collections_Generic_IEnumerable_System_String__">TemplateExtensions.GetManyResolved(ICfgRoot, IEnumerable&lt;string&gt;)</a>
+  </div>
+  <div>
+      <a class="xref" href="Apq.Cfg.TemplateExtensions.html#Apq_Cfg_TemplateExtensions_GetResolved_Apq_Cfg_ICfgRoot_System_String_">TemplateExtensions.GetResolved(ICfgRoot, string)</a>
+  </div>
+  <div>
+      <a class="xref" href="Apq.Cfg.TemplateExtensions.html#Apq_Cfg_TemplateExtensions_GetResolved_Apq_Cfg_ICfgRoot_System_String_Apq_Cfg_Template_VariableResolutionOptions_">TemplateExtensions.GetResolved(ICfgRoot, string, VariableResolutionOptions)</a>
+  </div>
+  <div>
+      <a class="xref" href="Apq.Cfg.TemplateExtensions.html#Apq_Cfg_TemplateExtensions_GetResolved__1_Apq_Cfg_ICfgRoot_System_String_">TemplateExtensions.GetResolved&lt;T&gt;(ICfgRoot, string)</a>
+  </div>
+  <div>
+      <a class="xref" href="Apq.Cfg.TemplateExtensions.html#Apq_Cfg_TemplateExtensions_ResolveVariables_Apq_Cfg_ICfgRoot_System_String_">TemplateExtensions.ResolveVariables(ICfgRoot, string?)</a>
+  </div>
+  <div>
+      <a class="xref" href="Apq.Cfg.TemplateExtensions.html#Apq_Cfg_TemplateExtensions_ResolveVariables_Apq_Cfg_ICfgRoot_System_String_Apq_Cfg_Template_VariableResolutionOptions_">TemplateExtensions.ResolveVariables(ICfgRoot, string?, VariableResolutionOptions)</a>
+  </div>
+  <div>
+      <a class="xref" href="Apq.Cfg.TemplateExtensions.html#Apq_Cfg_TemplateExtensions_TryGetResolved_Apq_Cfg_ICfgRoot_System_String_System_String__">TemplateExtensions.TryGetResolved(ICfgRoot, string, out string?)</a>
+  </div>
+  <div>
+      <a class="xref" href="Apq.Cfg.TemplateExtensions.html#Apq_Cfg_TemplateExtensions_TryGetResolved__1_Apq_Cfg_ICfgRoot_System_String___0__">TemplateExtensions.TryGetResolved&lt;T&gt;(ICfgRoot, string, out T?)</a>
+  </div>
+  <div>
+      <a class="xref" href="Apq.Cfg.Validation.CfgRootValidationExtensions.html#Apq_Cfg_Validation_CfgRootValidationExtensions_TryValidate_Apq_Cfg_ICfgRoot_Apq_Cfg_Validation_IConfigValidator_Apq_Cfg_Validation_ValidationResult__">CfgRootValidationExtensions.TryValidate(ICfgRoot, IConfigValidator, out ValidationResult)</a>
+  </div>
+  <div>
+      <a class="xref" href="Apq.Cfg.Validation.CfgRootValidationExtensions.html#Apq_Cfg_Validation_CfgRootValidationExtensions_TryValidate_Apq_Cfg_ICfgRoot_System_Action_Apq_Cfg_Validation_ConfigValidationBuilder__Apq_Cfg_Validation_ValidationResult__">CfgRootValidationExtensions.TryValidate(ICfgRoot, Action&lt;ConfigValidationBuilder&gt;, out ValidationResult)</a>
+  </div>
+  <div>
+      <a class="xref" href="Apq.Cfg.Validation.CfgRootValidationExtensions.html#Apq_Cfg_Validation_CfgRootValidationExtensions_Validate_Apq_Cfg_ICfgRoot_Apq_Cfg_Validation_IConfigValidator_">CfgRootValidationExtensions.Validate(ICfgRoot, IConfigValidator)</a>
+  </div>
+  <div>
+      <a class="xref" href="Apq.Cfg.Validation.CfgRootValidationExtensions.html#Apq_Cfg_Validation_CfgRootValidationExtensions_Validate_Apq_Cfg_ICfgRoot_System_Action_Apq_Cfg_Validation_ConfigValidationBuilder__">CfgRootValidationExtensions.Validate(ICfgRoot, Action&lt;ConfigValidationBuilder&gt;)</a>
+  </div>
+  <div>
+      <a class="xref" href="Apq.Cfg.Validation.CfgRootValidationExtensions.html#Apq_Cfg_Validation_CfgRootValidationExtensions_ValidateAndThrow_Apq_Cfg_ICfgRoot_Apq_Cfg_Validation_IConfigValidator_">CfgRootValidationExtensions.ValidateAndThrow(ICfgRoot, IConfigValidator)</a>
+  </div>
+  <div>
+      <a class="xref" href="Apq.Cfg.Validation.CfgRootValidationExtensions.html#Apq_Cfg_Validation_CfgRootValidationExtensions_ValidateAndThrow_Apq_Cfg_ICfgRoot_System_Action_Apq_Cfg_Validation_ConfigValidationBuilder__">CfgRootValidationExtensions.ValidateAndThrow(ICfgRoot, Action&lt;ConfigValidationBuilder&gt;)</a>
+  </div>
   </dd></dl>
 
 

+ 17 - 9
docs/site/public/api-reference/api/Apq.Cfg.Ini.CfgBuilderExtensions.html

@@ -165,31 +165,39 @@ Class CfgBuilderExtensions
   <div class="markdown level1 conceptual"></div>
 
   <div class="codewrapper">
-    <pre><code class="lang-csharp hljs">public static CfgBuilder AddIni(this CfgBuilder builder, string path, int level, bool writeable = false, bool optional = true, bool reloadOnChange = true, bool isPrimaryWriter = false)</code></pre>
+    <pre><code class="lang-csharp hljs">public static CfgBuilder AddIni(this CfgBuilder builder, string path, int level = 0, bool writeable = false, bool optional = true, bool reloadOnChange = true, bool isPrimaryWriter = false)</code></pre>
   </div>
 
   <h4 class="section">Parameters</h4>
   <dl class="parameters">
     <dt><code>builder</code> <a class="xref" href="Apq.Cfg.CfgBuilder.html">CfgBuilder</a></dt>
-    <dd></dd>
+    <dd><p>配置构建器</p>
+</dd>
     <dt><code>path</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
-    <dd></dd>
+    <dd><p>INI 文件路径</p>
+</dd>
     <dt><code>level</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
-    <dd></dd>
+    <dd><p>配置层级,数值越大优先级越高,默认为 <a class="xref" href="Apq.Cfg.CfgSourceLevels.html#Apq_Cfg_CfgSourceLevels_Ini">Ini</a> (0)</p>
+</dd>
     <dt><code>writeable</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
-    <dd></dd>
+    <dd><p>是否可写,默认为false</p>
+</dd>
     <dt><code>optional</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
-    <dd></dd>
+    <dd><p>是否为可选文件,默认为true</p>
+</dd>
     <dt><code>reloadOnChange</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
-    <dd></dd>
+    <dd><p>文件变更时是否自动重载,默认为true</p>
+</dd>
     <dt><code>isPrimaryWriter</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
-    <dd></dd>
+    <dd><p>是否为主要写入器,默认为false</p>
+</dd>
   </dl>
 
   <h4 class="section">Returns</h4>
   <dl class="parameters">
     <dt><a class="xref" href="Apq.Cfg.CfgBuilder.html">CfgBuilder</a></dt>
-    <dd></dd>
+    <dd><p>配置构建器实例,支持链式调用</p>
+</dd>
   </dl>
 
 

+ 19 - 19
docs/site/public/api-reference/api/Apq.Cfg.Nacos.CfgBuilderExtensions.html

@@ -165,7 +165,7 @@ Class CfgBuilderExtensions
   <div class="markdown level1 conceptual"></div>
 
   <div class="codewrapper">
-    <pre><code class="lang-csharp hljs">public static CfgBuilder AddNacos(this CfgBuilder builder, Action&lt;NacosCfgOptions&gt; configure, int level, bool isPrimaryWriter = false)</code></pre>
+    <pre><code class="lang-csharp hljs">public static CfgBuilder AddNacos(this CfgBuilder builder, Action&lt;NacosCfgOptions&gt; configure, int level = 200, bool isPrimaryWriter = false)</code></pre>
   </div>
 
   <h4 class="section">Parameters</h4>
@@ -177,17 +177,17 @@ Class CfgBuilderExtensions
     <dd><p>配置选项</p>
 </dd>
     <dt><code>level</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
-    <dd><p>配置层级,数值越大优先级越高</p>
+    <dd><p>配置层级,数值越大优先级越高,默认为 <a class="xref" href="Apq.Cfg.CfgSourceLevels.html#Apq_Cfg_CfgSourceLevels_Nacos">Nacos</a> (15)</p>
 </dd>
     <dt><code>isPrimaryWriter</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
-    <dd><p>是否为主写入源</p>
+    <dd><p>是否为主写入源,默认为false</p>
 </dd>
   </dl>
 
   <h4 class="section">Returns</h4>
   <dl class="parameters">
     <dt><a class="xref" href="Apq.Cfg.CfgBuilder.html">CfgBuilder</a></dt>
-    <dd><p>配置构建器</p>
+    <dd><p>配置构建器实例,支持链式调用</p>
 </dd>
   </dl>
 
@@ -213,7 +213,7 @@ Class CfgBuilderExtensions
   <div class="markdown level1 conceptual"></div>
 
   <div class="codewrapper">
-    <pre><code class="lang-csharp hljs">public static CfgBuilder AddNacos(this CfgBuilder builder, string serverAddresses, string dataId, string group = &quot;DEFAULT_GROUP&quot;, int level = 0, bool enableHotReload = false)</code></pre>
+    <pre><code class="lang-csharp hljs">public static CfgBuilder AddNacos(this CfgBuilder builder, string serverAddresses, string dataId, string group = &quot;DEFAULT_GROUP&quot;, int level = 200, bool enableHotReload = false)</code></pre>
   </div>
 
   <h4 class="section">Parameters</h4>
@@ -228,20 +228,20 @@ Class CfgBuilderExtensions
     <dd><p>配置的 DataId</p>
 </dd>
     <dt><code>group</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
-    <dd><p>配置分组</p>
+    <dd><p>配置分组,默认为 &quot;DEFAULT_GROUP&quot;</p>
 </dd>
     <dt><code>level</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
-    <dd><p>配置层级</p>
+    <dd><p>配置层级,数值越大优先级越高,默认为 <a class="xref" href="Apq.Cfg.CfgSourceLevels.html#Apq_Cfg_CfgSourceLevels_Nacos">Nacos</a> (15)</p>
 </dd>
     <dt><code>enableHotReload</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
-    <dd><p>是否启用热重载</p>
+    <dd><p>是否启用热重载,默认为false</p>
 </dd>
   </dl>
 
   <h4 class="section">Returns</h4>
   <dl class="parameters">
     <dt><a class="xref" href="Apq.Cfg.CfgBuilder.html">CfgBuilder</a></dt>
-    <dd><p>配置构建器</p>
+    <dd><p>配置构建器实例,支持链式调用</p>
 </dd>
   </dl>
 
@@ -267,7 +267,7 @@ Class CfgBuilderExtensions
   <div class="markdown level1 conceptual"></div>
 
   <div class="codewrapper">
-    <pre><code class="lang-csharp hljs">public static CfgBuilder AddNacosJson(this CfgBuilder builder, string serverAddresses, string dataId, string group = &quot;DEFAULT_GROUP&quot;, int level = 0, bool enableHotReload = false)</code></pre>
+    <pre><code class="lang-csharp hljs">public static CfgBuilder AddNacosJson(this CfgBuilder builder, string serverAddresses, string dataId, string group = &quot;DEFAULT_GROUP&quot;, int level = 200, bool enableHotReload = false)</code></pre>
   </div>
 
   <h4 class="section">Parameters</h4>
@@ -282,20 +282,20 @@ Class CfgBuilderExtensions
     <dd><p>配置的 DataId</p>
 </dd>
     <dt><code>group</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
-    <dd><p>配置分组</p>
+    <dd><p>配置分组,默认为 &quot;DEFAULT_GROUP&quot;</p>
 </dd>
     <dt><code>level</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
-    <dd><p>配置层级</p>
+    <dd><p>配置层级,数值越大优先级越高,默认为 <a class="xref" href="Apq.Cfg.CfgSourceLevels.html#Apq_Cfg_CfgSourceLevels_Nacos">Nacos</a> (15)</p>
 </dd>
     <dt><code>enableHotReload</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
-    <dd><p>是否启用热重载</p>
+    <dd><p>是否启用热重载,默认为false</p>
 </dd>
   </dl>
 
   <h4 class="section">Returns</h4>
   <dl class="parameters">
     <dt><a class="xref" href="Apq.Cfg.CfgBuilder.html">CfgBuilder</a></dt>
-    <dd><p>配置构建器</p>
+    <dd><p>配置构建器实例,支持链式调用</p>
 </dd>
   </dl>
 
@@ -321,7 +321,7 @@ Class CfgBuilderExtensions
   <div class="markdown level1 conceptual"></div>
 
   <div class="codewrapper">
-    <pre><code class="lang-csharp hljs">public static CfgBuilder AddNacosProperties(this CfgBuilder builder, string serverAddresses, string dataId, string group = &quot;DEFAULT_GROUP&quot;, int level = 0, bool enableHotReload = false)</code></pre>
+    <pre><code class="lang-csharp hljs">public static CfgBuilder AddNacosProperties(this CfgBuilder builder, string serverAddresses, string dataId, string group = &quot;DEFAULT_GROUP&quot;, int level = 200, bool enableHotReload = false)</code></pre>
   </div>
 
   <h4 class="section">Parameters</h4>
@@ -336,20 +336,20 @@ Class CfgBuilderExtensions
     <dd><p>配置的 DataId</p>
 </dd>
     <dt><code>group</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
-    <dd><p>配置分组</p>
+    <dd><p>配置分组,默认为 &quot;DEFAULT_GROUP&quot;</p>
 </dd>
     <dt><code>level</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
-    <dd><p>配置层级</p>
+    <dd><p>配置层级,数值越大优先级越高,默认为 <a class="xref" href="Apq.Cfg.CfgSourceLevels.html#Apq_Cfg_CfgSourceLevels_Nacos">Nacos</a> (15)</p>
 </dd>
     <dt><code>enableHotReload</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
-    <dd><p>是否启用热重载</p>
+    <dd><p>是否启用热重载,默认为false</p>
 </dd>
   </dl>
 
   <h4 class="section">Returns</h4>
   <dl class="parameters">
     <dt><a class="xref" href="Apq.Cfg.CfgBuilder.html">CfgBuilder</a></dt>
-    <dd><p>配置构建器</p>
+    <dd><p>配置构建器实例,支持链式调用</p>
 </dd>
   </dl>
 

+ 11 - 6
docs/site/public/api-reference/api/Apq.Cfg.Redis.CfgBuilderExtensions.html

@@ -165,25 +165,30 @@ Class CfgBuilderExtensions
   <div class="markdown level1 conceptual"></div>
 
   <div class="codewrapper">
-    <pre><code class="lang-csharp hljs">public static CfgBuilder AddRedis(this CfgBuilder builder, Action&lt;RedisOptions&gt; configure, int level, bool isPrimaryWriter = false)</code></pre>
+    <pre><code class="lang-csharp hljs">public static CfgBuilder AddRedis(this CfgBuilder builder, Action&lt;RedisOptions&gt; configure, int level = 100, bool isPrimaryWriter = false)</code></pre>
   </div>
 
   <h4 class="section">Parameters</h4>
   <dl class="parameters">
     <dt><code>builder</code> <a class="xref" href="Apq.Cfg.CfgBuilder.html">CfgBuilder</a></dt>
-    <dd></dd>
+    <dd><p>配置构建器</p>
+</dd>
     <dt><code>configure</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.action-1">Action</a>&lt;<a class="xref" href="Apq.Cfg.Redis.RedisOptions.html">RedisOptions</a>&gt;</dt>
-    <dd></dd>
+    <dd><p>Redis 配置选项</p>
+</dd>
     <dt><code>level</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
-    <dd></dd>
+    <dd><p>配置层级,数值越大优先级越高,默认为 <a class="xref" href="Apq.Cfg.CfgSourceLevels.html#Apq_Cfg_CfgSourceLevels_Redis">Redis</a> (10)</p>
+</dd>
     <dt><code>isPrimaryWriter</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
-    <dd></dd>
+    <dd><p>是否为主要写入器,默认为false</p>
+</dd>
   </dl>
 
   <h4 class="section">Returns</h4>
   <dl class="parameters">
     <dt><a class="xref" href="Apq.Cfg.CfgBuilder.html">CfgBuilder</a></dt>
-    <dd></dd>
+    <dd><p>配置构建器实例,支持链式调用</p>
+</dd>
   </dl>
 
 

+ 148 - 0
docs/site/public/api-reference/api/Apq.Cfg.ServiceCollectionExtensions.html

@@ -315,6 +315,64 @@ services.AddApqCfg((builder, sp) =&gt; builder
 
 
 
+  <a id="Apq_Cfg_ServiceCollectionExtensions_AddApqCfgWithValidation_" data-uid="Apq.Cfg.ServiceCollectionExtensions.AddApqCfgWithValidation*"></a>
+
+  <h3 id="Apq_Cfg_ServiceCollectionExtensions_AddApqCfgWithValidation_Microsoft_Extensions_DependencyInjection_IServiceCollection_System_Action_Apq_Cfg_CfgBuilder__System_Boolean_" data-uid="Apq.Cfg.ServiceCollectionExtensions.AddApqCfgWithValidation(Microsoft.Extensions.DependencyInjection.IServiceCollection,System.Action{Apq.Cfg.CfgBuilder},System.Boolean)">
+  AddApqCfgWithValidation(IServiceCollection, Action&lt;CfgBuilder&gt;, bool)
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>添加 Apq.Cfg 配置服务并启用验证</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public static IServiceCollection AddApqCfgWithValidation(this IServiceCollection services, Action&lt;CfgBuilder&gt; configure, bool validateOnStartup = true)</code></pre>
+  </div>
+
+  <h4 class="section">Parameters</h4>
+  <dl class="parameters">
+    <dt><code>services</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection">IServiceCollection</a></dt>
+    <dd><p>服务集合</p>
+</dd>
+    <dt><code>configure</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.action-1">Action</a>&lt;<a class="xref" href="Apq.Cfg.CfgBuilder.html">CfgBuilder</a>&gt;</dt>
+    <dd><p>配置构建器委托</p>
+</dd>
+    <dt><code>validateOnStartup</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
+    <dd><p>是否在启动时验证配置,默认为 true</p>
+</dd>
+  </dl>
+
+  <h4 class="section">Returns</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection">IServiceCollection</a></dt>
+    <dd><p>服务集合,支持链式调用</p>
+</dd>
+  </dl>
+
+
+
+
+
+
+  <h4 class="section" id="Apq_Cfg_ServiceCollectionExtensions_AddApqCfgWithValidation_Microsoft_Extensions_DependencyInjection_IServiceCollection_System_Action_Apq_Cfg_CfgBuilder__System_Boolean__examples">Examples</h4>
+  <pre><code class="lang-csharp">services.AddApqCfgWithValidation(cfg =&gt; cfg
+    .AddJson("config.json", level: 0)
+    .AddValidation(v =&gt; v
+        .Required("Database:ConnectionString")
+        .Range("Database:Port", 1, 65535)));</code></pre>
+
+
+
+  <h4 class="section">Exceptions</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="Apq.Cfg.Validation.ConfigValidationException.html">ConfigValidationException</a></dt>
+    <dd><p>当 validateOnStartup 为 true 且验证失败时抛出</p>
+</dd>
+  </dl>
+
+
+
   <a id="Apq_Cfg_ServiceCollectionExtensions_AddApqCfg_" data-uid="Apq.Cfg.ServiceCollectionExtensions.AddApqCfg*"></a>
 
   <h3 id="Apq_Cfg_ServiceCollectionExtensions_AddApqCfg__1_Microsoft_Extensions_DependencyInjection_IServiceCollection_System_Action_Apq_Cfg_CfgBuilder__System_String_" data-uid="Apq.Cfg.ServiceCollectionExtensions.AddApqCfg``1(Microsoft.Extensions.DependencyInjection.IServiceCollection,System.Action{Apq.Cfg.CfgBuilder},System.String)">
@@ -387,6 +445,96 @@ var dbOptions = serviceProvider.GetRequiredService&lt;IOptions&lt;DatabaseOption
 
 
 
+  <a id="Apq_Cfg_ServiceCollectionExtensions_AddConfigValidator_" data-uid="Apq.Cfg.ServiceCollectionExtensions.AddConfigValidator*"></a>
+
+  <h3 id="Apq_Cfg_ServiceCollectionExtensions_AddConfigValidator_Microsoft_Extensions_DependencyInjection_IServiceCollection_Apq_Cfg_Validation_IConfigValidator_" data-uid="Apq.Cfg.ServiceCollectionExtensions.AddConfigValidator(Microsoft.Extensions.DependencyInjection.IServiceCollection,Apq.Cfg.Validation.IConfigValidator)">
+  AddConfigValidator(IServiceCollection, IConfigValidator)
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>添加配置验证器到服务集合</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public static IServiceCollection AddConfigValidator(this IServiceCollection services, IConfigValidator validator)</code></pre>
+  </div>
+
+  <h4 class="section">Parameters</h4>
+  <dl class="parameters">
+    <dt><code>services</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection">IServiceCollection</a></dt>
+    <dd><p>服务集合</p>
+</dd>
+    <dt><code>validator</code> <a class="xref" href="Apq.Cfg.Validation.IConfigValidator.html">IConfigValidator</a></dt>
+    <dd><p>验证器实例</p>
+</dd>
+  </dl>
+
+  <h4 class="section">Returns</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection">IServiceCollection</a></dt>
+    <dd><p>服务集合,支持链式调用</p>
+</dd>
+  </dl>
+
+
+
+
+
+
+
+
+
+
+
+  <a id="Apq_Cfg_ServiceCollectionExtensions_AddConfigValidator_" data-uid="Apq.Cfg.ServiceCollectionExtensions.AddConfigValidator*"></a>
+
+  <h3 id="Apq_Cfg_ServiceCollectionExtensions_AddConfigValidator_Microsoft_Extensions_DependencyInjection_IServiceCollection_System_Action_Apq_Cfg_Validation_ConfigValidationBuilder__" data-uid="Apq.Cfg.ServiceCollectionExtensions.AddConfigValidator(Microsoft.Extensions.DependencyInjection.IServiceCollection,System.Action{Apq.Cfg.Validation.ConfigValidationBuilder})">
+  AddConfigValidator(IServiceCollection, Action&lt;ConfigValidationBuilder&gt;)
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>添加配置验证器到服务集合</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public static IServiceCollection AddConfigValidator(this IServiceCollection services, Action&lt;ConfigValidationBuilder&gt; configure)</code></pre>
+  </div>
+
+  <h4 class="section">Parameters</h4>
+  <dl class="parameters">
+    <dt><code>services</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection">IServiceCollection</a></dt>
+    <dd><p>服务集合</p>
+</dd>
+    <dt><code>configure</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.action-1">Action</a>&lt;<a class="xref" href="Apq.Cfg.Validation.ConfigValidationBuilder.html">ConfigValidationBuilder</a>&gt;</dt>
+    <dd><p>验证规则配置委托</p>
+</dd>
+  </dl>
+
+  <h4 class="section">Returns</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.iservicecollection">IServiceCollection</a></dt>
+    <dd><p>服务集合,支持链式调用</p>
+</dd>
+  </dl>
+
+
+
+
+
+
+  <h4 class="section" id="Apq_Cfg_ServiceCollectionExtensions_AddConfigValidator_Microsoft_Extensions_DependencyInjection_IServiceCollection_System_Action_Apq_Cfg_Validation_ConfigValidationBuilder___examples">Examples</h4>
+  <pre><code class="lang-csharp">services.AddApqCfg(cfg =&gt; cfg.AddJson("config.json", level: 0));
+services.AddConfigValidator(v =&gt; v
+    .Required("Database:ConnectionString")
+    .Range("Database:Port", 1, 65535));</code></pre>
+
+
+
+
+
+
   <a id="Apq_Cfg_ServiceCollectionExtensions_ConfigureApqCfg_" data-uid="Apq.Cfg.ServiceCollectionExtensions.ConfigureApqCfg*"></a>
 
   <h3 id="Apq_Cfg_ServiceCollectionExtensions_ConfigureApqCfg__1_Microsoft_Extensions_DependencyInjection_IServiceCollection_System_String_" data-uid="Apq.Cfg.ServiceCollectionExtensions.ConfigureApqCfg``1(Microsoft.Extensions.DependencyInjection.IServiceCollection,System.String)">

+ 690 - 0
docs/site/public/api-reference/api/Apq.Cfg.Snapshot.CfgRootSnapshotExtensions.html

@@ -0,0 +1,690 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8">
+      <title>Class CfgRootSnapshotExtensions | Apq.Cfg API </title>
+      <meta name="viewport" content="width=device-width, initial-scale=1.0">
+      <meta name="title" content="Class CfgRootSnapshotExtensions | Apq.Cfg API ">
+      
+      <meta name="description" content="ICfgRoot 配置快照导出扩展方法">
+      <link rel="icon" href="../favicon.svg">
+      <link rel="stylesheet" href="../public/docfx.min.css">
+      <link rel="stylesheet" href="../public/main.css">
+      <meta name="docfx:navrel" content="../toc.html">
+      <meta name="docfx:tocrel" content="toc.html">
+      
+      <meta name="docfx:rel" content="../">
+      
+      
+      
+      <meta name="loc:inThisArticle" content="In this article">
+      <meta name="loc:searchResultsCount" content="{count} results for &quot;{query}&quot;">
+      <meta name="loc:searchNoResults" content="No results for &quot;{query}&quot;">
+      <meta name="loc:tocFilter" content="Filter by title">
+      <meta name="loc:nextArticle" content="Next">
+      <meta name="loc:prevArticle" content="Previous">
+      <meta name="loc:themeLight" content="Light">
+      <meta name="loc:themeDark" content="Dark">
+      <meta name="loc:themeAuto" content="Auto">
+      <meta name="loc:changeTheme" content="Change theme">
+      <meta name="loc:copy" content="Copy">
+      <meta name="loc:downloadPdf" content="Download PDF">
+
+      <script type="module" src="./../public/docfx.min.js"></script>
+
+      <script>
+        const theme = localStorage.getItem('theme') || 'auto'
+        document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
+      </script>
+
+  </head>
+
+  <body class="tex2jax_ignore" data-layout="" data-yaml-mime="ManagedReference">
+    <header class="bg-body border-bottom">
+      <nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
+        <div class="container-xxl flex-nowrap">
+          <a class="navbar-brand" href="../index.html">
+            <img id="logo" class="svg" src="../images/logo-small.svg" alt="Apq.Cfg">
+            Apq.Cfg
+          </a>
+          <button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
+            <i class="bi bi-three-dots"></i>
+          </button>
+          <div class="collapse navbar-collapse" id="navpanel">
+            <div id="navbar">
+              <form class="search" role="search" id="search">
+                <i class="bi bi-search"></i>
+                <input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
+              </form>
+            </div>
+          </div>
+        </div>
+      </nav>
+    </header>
+
+    <main class="container-xxl">
+      <div class="toc-offcanvas">
+        <div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
+          <div class="offcanvas-header">
+            <h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
+            <button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
+          </div>
+          <div class="offcanvas-body">
+            <nav class="toc" id="toc"></nav>
+          </div>
+        </div>
+      </div>
+
+      <div class="content">
+        <div class="actionbar">
+          <button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
+            <i class="bi bi-list"></i>
+          </button>
+
+          <nav id="breadcrumb"></nav>
+        </div>
+
+        <article data-uid="Apq.Cfg.Snapshot.CfgRootSnapshotExtensions">
+
+
+
+  <h1 id="Apq_Cfg_Snapshot_CfgRootSnapshotExtensions" data-uid="Apq.Cfg.Snapshot.CfgRootSnapshotExtensions" class="text-break">
+Class CfgRootSnapshotExtensions  
+  </h1>
+
+  <div class="facts text-secondary">
+    <dl><dt>Namespace</dt><dd><a class="xref" href="Apq.html">Apq</a>.<a class="xref" href="Apq.Cfg.html">Cfg</a>.<a class="xref" href="Apq.Cfg.Snapshot.html">Snapshot</a></dd></dl>
+  <dl><dt>Assembly</dt><dd>Apq.Cfg.dll</dd></dl>
+  </div>
+
+  <div class="markdown summary"><p>ICfgRoot 配置快照导出扩展方法</p>
+</div>
+  <div class="markdown conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public static class CfgRootSnapshotExtensions</code></pre>
+  </div>
+
+
+
+
+  <dl class="typelist inheritance">
+    <dt>Inheritance</dt>
+    <dd>
+      <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
+      <div><span class="xref">CfgRootSnapshotExtensions</span></div>
+    </dd>
+  </dl>
+
+
+
+  <dl class="typelist inheritedMembers">
+    <dt>Inherited Members</dt>
+    <dd>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object)</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object, object)</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone">object.MemberwiseClone()</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object, object)</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>
+    </div>
+  </dd></dl>
+
+
+
+
+
+
+  <h2 class="section" id="methods">Methods
+</h2>
+
+
+  <a id="Apq_Cfg_Snapshot_CfgRootSnapshotExtensions_ExportSnapshot_" data-uid="Apq.Cfg.Snapshot.CfgRootSnapshotExtensions.ExportSnapshot*"></a>
+
+  <h3 id="Apq_Cfg_Snapshot_CfgRootSnapshotExtensions_ExportSnapshot_Apq_Cfg_ICfgRoot_Apq_Cfg_Snapshot_ExportOptions_" data-uid="Apq.Cfg.Snapshot.CfgRootSnapshotExtensions.ExportSnapshot(Apq.Cfg.ICfgRoot,Apq.Cfg.Snapshot.ExportOptions)">
+  ExportSnapshot(ICfgRoot, ExportOptions?)
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>导出配置快照为字符串(默认 JSON 格式)</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public static string ExportSnapshot(this ICfgRoot cfg, ExportOptions? options = null)</code></pre>
+  </div>
+
+  <h4 class="section">Parameters</h4>
+  <dl class="parameters">
+    <dt><code>cfg</code> <a class="xref" href="Apq.Cfg.ICfgRoot.html">ICfgRoot</a></dt>
+    <dd><p>配置根</p>
+</dd>
+    <dt><code>options</code> <a class="xref" href="Apq.Cfg.Snapshot.ExportOptions.html">ExportOptions</a></dt>
+    <dd><p>导出选项</p>
+</dd>
+  </dl>
+
+  <h4 class="section">Returns</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd><p>导出的配置字符串</p>
+</dd>
+  </dl>
+
+
+
+
+
+
+  <h4 class="section" id="Apq_Cfg_Snapshot_CfgRootSnapshotExtensions_ExportSnapshot_Apq_Cfg_ICfgRoot_Apq_Cfg_Snapshot_ExportOptions__examples">Examples</h4>
+  <pre><code class="lang-csharp">// 导出为 JSON(默认)
+var json = cfg.ExportSnapshot();
+
+// 导出时排除敏感配置
+var safe = cfg.ExportSnapshot(new ExportOptions
+{
+    ExcludeKeys = new[] { "Secrets:*", "Database:Password" }
+});</code></pre>
+
+
+
+
+
+
+  <a id="Apq_Cfg_Snapshot_CfgRootSnapshotExtensions_ExportSnapshot_" data-uid="Apq.Cfg.Snapshot.CfgRootSnapshotExtensions.ExportSnapshot*"></a>
+
+  <h3 id="Apq_Cfg_Snapshot_CfgRootSnapshotExtensions_ExportSnapshot_Apq_Cfg_ICfgRoot_Apq_Cfg_Snapshot_SnapshotExporter_Apq_Cfg_Snapshot_ExportOptions_" data-uid="Apq.Cfg.Snapshot.CfgRootSnapshotExtensions.ExportSnapshot(Apq.Cfg.ICfgRoot,Apq.Cfg.Snapshot.SnapshotExporter,Apq.Cfg.Snapshot.ExportOptions)">
+  ExportSnapshot(ICfgRoot, SnapshotExporter, ExportOptions?)
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>使用自定义导出器导出配置快照</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public static string ExportSnapshot(this ICfgRoot cfg, SnapshotExporter exporter, ExportOptions? options = null)</code></pre>
+  </div>
+
+  <h4 class="section">Parameters</h4>
+  <dl class="parameters">
+    <dt><code>cfg</code> <a class="xref" href="Apq.Cfg.ICfgRoot.html">ICfgRoot</a></dt>
+    <dd><p>配置根</p>
+</dd>
+    <dt><code>exporter</code> <a class="xref" href="Apq.Cfg.Snapshot.SnapshotExporter.html">SnapshotExporter</a></dt>
+    <dd><p>导出器委托</p>
+</dd>
+    <dt><code>options</code> <a class="xref" href="Apq.Cfg.Snapshot.ExportOptions.html">ExportOptions</a></dt>
+    <dd><p>导出选项</p>
+</dd>
+  </dl>
+
+  <h4 class="section">Returns</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd><p>导出的配置字符串</p>
+</dd>
+  </dl>
+
+
+
+
+
+
+  <h4 class="section" id="Apq_Cfg_Snapshot_CfgRootSnapshotExtensions_ExportSnapshot_Apq_Cfg_ICfgRoot_Apq_Cfg_Snapshot_SnapshotExporter_Apq_Cfg_Snapshot_ExportOptions__examples">Examples</h4>
+  <pre><code class="lang-csharp">// 使用内置导出器
+var json = cfg.ExportSnapshot(SnapshotExporters.Json);
+var env = cfg.ExportSnapshot(SnapshotExporters.Env);
+
+// 使用自定义导出器
+var custom = cfg.ExportSnapshot((data, ctx) =&gt; string.Join("\n", data.Select(x =&gt; $"{x.Key}={x.Value}")));</code></pre>
+
+
+
+
+
+
+  <a id="Apq_Cfg_Snapshot_CfgRootSnapshotExtensions_ExportSnapshot_" data-uid="Apq.Cfg.Snapshot.CfgRootSnapshotExtensions.ExportSnapshot*"></a>
+
+  <h3 id="Apq_Cfg_Snapshot_CfgRootSnapshotExtensions_ExportSnapshot_Apq_Cfg_ICfgRoot_System_Action_Apq_Cfg_Snapshot_ExportOptions__" data-uid="Apq.Cfg.Snapshot.CfgRootSnapshotExtensions.ExportSnapshot(Apq.Cfg.ICfgRoot,System.Action{Apq.Cfg.Snapshot.ExportOptions})">
+  ExportSnapshot(ICfgRoot, Action&lt;ExportOptions&gt;)
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>使用构建器模式配置导出选项</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public static string ExportSnapshot(this ICfgRoot cfg, Action&lt;ExportOptions&gt; configure)</code></pre>
+  </div>
+
+  <h4 class="section">Parameters</h4>
+  <dl class="parameters">
+    <dt><code>cfg</code> <a class="xref" href="Apq.Cfg.ICfgRoot.html">ICfgRoot</a></dt>
+    <dd><p>配置根</p>
+</dd>
+    <dt><code>configure</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.action-1">Action</a>&lt;<a class="xref" href="Apq.Cfg.Snapshot.ExportOptions.html">ExportOptions</a>&gt;</dt>
+    <dd><p>配置委托</p>
+</dd>
+  </dl>
+
+  <h4 class="section">Returns</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd><p>导出的配置字符串</p>
+</dd>
+  </dl>
+
+
+
+
+
+
+  <h4 class="section" id="Apq_Cfg_Snapshot_CfgRootSnapshotExtensions_ExportSnapshot_Apq_Cfg_ICfgRoot_System_Action_Apq_Cfg_Snapshot_ExportOptions___examples">Examples</h4>
+  <pre><code class="lang-csharp">var json = cfg.ExportSnapshot(options =&gt;
+{
+    options.IncludeMetadata = true;
+    options.ExcludeKeys = new[] { "Secrets:*" };
+});</code></pre>
+
+
+
+
+
+
+  <a id="Apq_Cfg_Snapshot_CfgRootSnapshotExtensions_ExportSnapshotAsDictionary_" data-uid="Apq.Cfg.Snapshot.CfgRootSnapshotExtensions.ExportSnapshotAsDictionary*"></a>
+
+  <h3 id="Apq_Cfg_Snapshot_CfgRootSnapshotExtensions_ExportSnapshotAsDictionary_Apq_Cfg_ICfgRoot_System_Boolean_" data-uid="Apq.Cfg.Snapshot.CfgRootSnapshotExtensions.ExportSnapshotAsDictionary(Apq.Cfg.ICfgRoot,System.Boolean)">
+  ExportSnapshotAsDictionary(ICfgRoot, bool)
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>导出配置快照为字典</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public static IReadOnlyDictionary&lt;string, string?&gt; ExportSnapshotAsDictionary(this ICfgRoot cfg, bool maskSensitive = true)</code></pre>
+  </div>
+
+  <h4 class="section">Parameters</h4>
+  <dl class="parameters">
+    <dt><code>cfg</code> <a class="xref" href="Apq.Cfg.ICfgRoot.html">ICfgRoot</a></dt>
+    <dd><p>配置根</p>
+</dd>
+    <dt><code>maskSensitive</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
+    <dd><p>是否脱敏敏感值</p>
+</dd>
+  </dl>
+
+  <h4 class="section">Returns</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ireadonlydictionary-2">IReadOnlyDictionary</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a>, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a>&gt;</dt>
+    <dd><p>扁平化的配置字典</p>
+</dd>
+  </dl>
+
+
+
+
+
+
+
+
+
+
+
+  <a id="Apq_Cfg_Snapshot_CfgRootSnapshotExtensions_ExportSnapshotAsEnv_" data-uid="Apq.Cfg.Snapshot.CfgRootSnapshotExtensions.ExportSnapshotAsEnv*"></a>
+
+  <h3 id="Apq_Cfg_Snapshot_CfgRootSnapshotExtensions_ExportSnapshotAsEnv_Apq_Cfg_ICfgRoot_System_String_System_Boolean_" data-uid="Apq.Cfg.Snapshot.CfgRootSnapshotExtensions.ExportSnapshotAsEnv(Apq.Cfg.ICfgRoot,System.String,System.Boolean)">
+  ExportSnapshotAsEnv(ICfgRoot, string?, bool)
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>导出配置快照为环境变量格式</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public static string ExportSnapshotAsEnv(this ICfgRoot cfg, string? prefix = null, bool maskSensitive = true)</code></pre>
+  </div>
+
+  <h4 class="section">Parameters</h4>
+  <dl class="parameters">
+    <dt><code>cfg</code> <a class="xref" href="Apq.Cfg.ICfgRoot.html">ICfgRoot</a></dt>
+    <dd><p>配置根</p>
+</dd>
+    <dt><code>prefix</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd><p>环境变量前缀</p>
+</dd>
+    <dt><code>maskSensitive</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
+    <dd><p>是否脱敏敏感值</p>
+</dd>
+  </dl>
+
+  <h4 class="section">Returns</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd><p>环境变量格式的配置字符串</p>
+</dd>
+  </dl>
+
+
+
+
+
+
+
+
+
+
+
+  <a id="Apq_Cfg_Snapshot_CfgRootSnapshotExtensions_ExportSnapshotAsJson_" data-uid="Apq.Cfg.Snapshot.CfgRootSnapshotExtensions.ExportSnapshotAsJson*"></a>
+
+  <h3 id="Apq_Cfg_Snapshot_CfgRootSnapshotExtensions_ExportSnapshotAsJson_Apq_Cfg_ICfgRoot_System_Boolean_System_Boolean_" data-uid="Apq.Cfg.Snapshot.CfgRootSnapshotExtensions.ExportSnapshotAsJson(Apq.Cfg.ICfgRoot,System.Boolean,System.Boolean)">
+  ExportSnapshotAsJson(ICfgRoot, bool, bool)
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>导出配置快照为 JSON 字符串</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public static string ExportSnapshotAsJson(this ICfgRoot cfg, bool indented = true, bool maskSensitive = true)</code></pre>
+  </div>
+
+  <h4 class="section">Parameters</h4>
+  <dl class="parameters">
+    <dt><code>cfg</code> <a class="xref" href="Apq.Cfg.ICfgRoot.html">ICfgRoot</a></dt>
+    <dd><p>配置根</p>
+</dd>
+    <dt><code>indented</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
+    <dd><p>是否缩进格式化</p>
+</dd>
+    <dt><code>maskSensitive</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
+    <dd><p>是否脱敏敏感值</p>
+</dd>
+  </dl>
+
+  <h4 class="section">Returns</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd><p>JSON 格式的配置字符串</p>
+</dd>
+  </dl>
+
+
+
+
+
+
+
+
+
+
+
+  <a id="Apq_Cfg_Snapshot_CfgRootSnapshotExtensions_ExportSnapshotAsKeyValue_" data-uid="Apq.Cfg.Snapshot.CfgRootSnapshotExtensions.ExportSnapshotAsKeyValue*"></a>
+
+  <h3 id="Apq_Cfg_Snapshot_CfgRootSnapshotExtensions_ExportSnapshotAsKeyValue_Apq_Cfg_ICfgRoot_System_Boolean_" data-uid="Apq.Cfg.Snapshot.CfgRootSnapshotExtensions.ExportSnapshotAsKeyValue(Apq.Cfg.ICfgRoot,System.Boolean)">
+  ExportSnapshotAsKeyValue(ICfgRoot, bool)
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>导出配置快照为键值对格式</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public static string ExportSnapshotAsKeyValue(this ICfgRoot cfg, bool maskSensitive = true)</code></pre>
+  </div>
+
+  <h4 class="section">Parameters</h4>
+  <dl class="parameters">
+    <dt><code>cfg</code> <a class="xref" href="Apq.Cfg.ICfgRoot.html">ICfgRoot</a></dt>
+    <dd><p>配置根</p>
+</dd>
+    <dt><code>maskSensitive</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
+    <dd><p>是否脱敏敏感值</p>
+</dd>
+  </dl>
+
+  <h4 class="section">Returns</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd><p>键值对格式的配置字符串</p>
+</dd>
+  </dl>
+
+
+
+
+
+
+
+
+
+
+
+  <a id="Apq_Cfg_Snapshot_CfgRootSnapshotExtensions_ExportSnapshotAsync_" data-uid="Apq.Cfg.Snapshot.CfgRootSnapshotExtensions.ExportSnapshotAsync*"></a>
+
+  <h3 id="Apq_Cfg_Snapshot_CfgRootSnapshotExtensions_ExportSnapshotAsync_Apq_Cfg_ICfgRoot_Apq_Cfg_Snapshot_SnapshotExporter_System_IO_Stream_Apq_Cfg_Snapshot_ExportOptions_System_Threading_CancellationToken_" data-uid="Apq.Cfg.Snapshot.CfgRootSnapshotExtensions.ExportSnapshotAsync(Apq.Cfg.ICfgRoot,Apq.Cfg.Snapshot.SnapshotExporter,System.IO.Stream,Apq.Cfg.Snapshot.ExportOptions,System.Threading.CancellationToken)">
+  ExportSnapshotAsync(ICfgRoot, SnapshotExporter, Stream, ExportOptions?, CancellationToken)
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>使用自定义导出器导出配置快照到流</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public static Task ExportSnapshotAsync(this ICfgRoot cfg, SnapshotExporter exporter, Stream stream, ExportOptions? options = null, CancellationToken cancellationToken = default)</code></pre>
+  </div>
+
+  <h4 class="section">Parameters</h4>
+  <dl class="parameters">
+    <dt><code>cfg</code> <a class="xref" href="Apq.Cfg.ICfgRoot.html">ICfgRoot</a></dt>
+    <dd></dd>
+    <dt><code>exporter</code> <a class="xref" href="Apq.Cfg.Snapshot.SnapshotExporter.html">SnapshotExporter</a></dt>
+    <dd></dd>
+    <dt><code>stream</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.io.stream">Stream</a></dt>
+    <dd></dd>
+    <dt><code>options</code> <a class="xref" href="Apq.Cfg.Snapshot.ExportOptions.html">ExportOptions</a></dt>
+    <dd></dd>
+    <dt><code>cancellationToken</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken">CancellationToken</a></dt>
+    <dd></dd>
+  </dl>
+
+  <h4 class="section">Returns</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.tasks.task">Task</a></dt>
+    <dd></dd>
+  </dl>
+
+
+
+
+
+
+
+
+
+
+
+  <a id="Apq_Cfg_Snapshot_CfgRootSnapshotExtensions_ExportSnapshotAsync_" data-uid="Apq.Cfg.Snapshot.CfgRootSnapshotExtensions.ExportSnapshotAsync*"></a>
+
+  <h3 id="Apq_Cfg_Snapshot_CfgRootSnapshotExtensions_ExportSnapshotAsync_Apq_Cfg_ICfgRoot_System_IO_Stream_Apq_Cfg_Snapshot_ExportOptions_System_Threading_CancellationToken_" data-uid="Apq.Cfg.Snapshot.CfgRootSnapshotExtensions.ExportSnapshotAsync(Apq.Cfg.ICfgRoot,System.IO.Stream,Apq.Cfg.Snapshot.ExportOptions,System.Threading.CancellationToken)">
+  ExportSnapshotAsync(ICfgRoot, Stream, ExportOptions?, CancellationToken)
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>导出配置快照到流</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public static Task ExportSnapshotAsync(this ICfgRoot cfg, Stream stream, ExportOptions? options = null, CancellationToken cancellationToken = default)</code></pre>
+  </div>
+
+  <h4 class="section">Parameters</h4>
+  <dl class="parameters">
+    <dt><code>cfg</code> <a class="xref" href="Apq.Cfg.ICfgRoot.html">ICfgRoot</a></dt>
+    <dd><p>配置根</p>
+</dd>
+    <dt><code>stream</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.io.stream">Stream</a></dt>
+    <dd><p>输出流</p>
+</dd>
+    <dt><code>options</code> <a class="xref" href="Apq.Cfg.Snapshot.ExportOptions.html">ExportOptions</a></dt>
+    <dd><p>导出选项</p>
+</dd>
+    <dt><code>cancellationToken</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken">CancellationToken</a></dt>
+    <dd><p>取消令牌</p>
+</dd>
+  </dl>
+
+  <h4 class="section">Returns</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.tasks.task">Task</a></dt>
+    <dd></dd>
+  </dl>
+
+
+
+
+
+
+
+
+
+
+
+  <a id="Apq_Cfg_Snapshot_CfgRootSnapshotExtensions_ExportSnapshotToFileAsync_" data-uid="Apq.Cfg.Snapshot.CfgRootSnapshotExtensions.ExportSnapshotToFileAsync*"></a>
+
+  <h3 id="Apq_Cfg_Snapshot_CfgRootSnapshotExtensions_ExportSnapshotToFileAsync_Apq_Cfg_ICfgRoot_Apq_Cfg_Snapshot_SnapshotExporter_System_String_Apq_Cfg_Snapshot_ExportOptions_System_Threading_CancellationToken_" data-uid="Apq.Cfg.Snapshot.CfgRootSnapshotExtensions.ExportSnapshotToFileAsync(Apq.Cfg.ICfgRoot,Apq.Cfg.Snapshot.SnapshotExporter,System.String,Apq.Cfg.Snapshot.ExportOptions,System.Threading.CancellationToken)">
+  ExportSnapshotToFileAsync(ICfgRoot, SnapshotExporter, string, ExportOptions?, CancellationToken)
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>使用自定义导出器导出配置快照到文件</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public static Task ExportSnapshotToFileAsync(this ICfgRoot cfg, SnapshotExporter exporter, string filePath, ExportOptions? options = null, CancellationToken cancellationToken = default)</code></pre>
+  </div>
+
+  <h4 class="section">Parameters</h4>
+  <dl class="parameters">
+    <dt><code>cfg</code> <a class="xref" href="Apq.Cfg.ICfgRoot.html">ICfgRoot</a></dt>
+    <dd></dd>
+    <dt><code>exporter</code> <a class="xref" href="Apq.Cfg.Snapshot.SnapshotExporter.html">SnapshotExporter</a></dt>
+    <dd></dd>
+    <dt><code>filePath</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd></dd>
+    <dt><code>options</code> <a class="xref" href="Apq.Cfg.Snapshot.ExportOptions.html">ExportOptions</a></dt>
+    <dd></dd>
+    <dt><code>cancellationToken</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken">CancellationToken</a></dt>
+    <dd></dd>
+  </dl>
+
+  <h4 class="section">Returns</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.tasks.task">Task</a></dt>
+    <dd></dd>
+  </dl>
+
+
+
+
+
+
+
+
+
+
+
+  <a id="Apq_Cfg_Snapshot_CfgRootSnapshotExtensions_ExportSnapshotToFileAsync_" data-uid="Apq.Cfg.Snapshot.CfgRootSnapshotExtensions.ExportSnapshotToFileAsync*"></a>
+
+  <h3 id="Apq_Cfg_Snapshot_CfgRootSnapshotExtensions_ExportSnapshotToFileAsync_Apq_Cfg_ICfgRoot_System_String_Apq_Cfg_Snapshot_ExportOptions_System_Threading_CancellationToken_" data-uid="Apq.Cfg.Snapshot.CfgRootSnapshotExtensions.ExportSnapshotToFileAsync(Apq.Cfg.ICfgRoot,System.String,Apq.Cfg.Snapshot.ExportOptions,System.Threading.CancellationToken)">
+  ExportSnapshotToFileAsync(ICfgRoot, string, ExportOptions?, CancellationToken)
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>导出配置快照到文件</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public static Task ExportSnapshotToFileAsync(this ICfgRoot cfg, string filePath, ExportOptions? options = null, CancellationToken cancellationToken = default)</code></pre>
+  </div>
+
+  <h4 class="section">Parameters</h4>
+  <dl class="parameters">
+    <dt><code>cfg</code> <a class="xref" href="Apq.Cfg.ICfgRoot.html">ICfgRoot</a></dt>
+    <dd><p>配置根</p>
+</dd>
+    <dt><code>filePath</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd><p>文件路径</p>
+</dd>
+    <dt><code>options</code> <a class="xref" href="Apq.Cfg.Snapshot.ExportOptions.html">ExportOptions</a></dt>
+    <dd><p>导出选项</p>
+</dd>
+    <dt><code>cancellationToken</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken">CancellationToken</a></dt>
+    <dd><p>取消令牌</p>
+</dd>
+  </dl>
+
+  <h4 class="section">Returns</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.tasks.task">Task</a></dt>
+    <dd></dd>
+  </dl>
+
+
+
+
+
+
+
+
+
+
+
+
+</article>
+
+
+
+      </div>
+
+      <div class="affix">
+        <nav id="affix"></nav>
+      </div>
+    </main>
+
+    <div class="container-xxl search-results" id="search-results"></div>
+
+    <footer class="border-top text-secondary">
+      <div class="container-xxl">
+        <div class="flex-fill">
+          Apq.Cfg - .NET 统一配置组件库 (基于 .NET 10.0,兼容 .NET 8.0)
+        </div>
+      </div>
+    </footer>
+  </body>
+</html>

+ 494 - 0
docs/site/public/api-reference/api/Apq.Cfg.Snapshot.ConfigExporter.html

@@ -0,0 +1,494 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8">
+      <title>Class ConfigExporter | Apq.Cfg API </title>
+      <meta name="viewport" content="width=device-width, initial-scale=1.0">
+      <meta name="title" content="Class ConfigExporter | Apq.Cfg API ">
+      
+      <meta name="description" content="配置快照导出器">
+      <link rel="icon" href="../favicon.svg">
+      <link rel="stylesheet" href="../public/docfx.min.css">
+      <link rel="stylesheet" href="../public/main.css">
+      <meta name="docfx:navrel" content="../toc.html">
+      <meta name="docfx:tocrel" content="toc.html">
+      
+      <meta name="docfx:rel" content="../">
+      
+      
+      
+      <meta name="loc:inThisArticle" content="In this article">
+      <meta name="loc:searchResultsCount" content="{count} results for &quot;{query}&quot;">
+      <meta name="loc:searchNoResults" content="No results for &quot;{query}&quot;">
+      <meta name="loc:tocFilter" content="Filter by title">
+      <meta name="loc:nextArticle" content="Next">
+      <meta name="loc:prevArticle" content="Previous">
+      <meta name="loc:themeLight" content="Light">
+      <meta name="loc:themeDark" content="Dark">
+      <meta name="loc:themeAuto" content="Auto">
+      <meta name="loc:changeTheme" content="Change theme">
+      <meta name="loc:copy" content="Copy">
+      <meta name="loc:downloadPdf" content="Download PDF">
+
+      <script type="module" src="./../public/docfx.min.js"></script>
+
+      <script>
+        const theme = localStorage.getItem('theme') || 'auto'
+        document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
+      </script>
+
+  </head>
+
+  <body class="tex2jax_ignore" data-layout="" data-yaml-mime="ManagedReference">
+    <header class="bg-body border-bottom">
+      <nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
+        <div class="container-xxl flex-nowrap">
+          <a class="navbar-brand" href="../index.html">
+            <img id="logo" class="svg" src="../images/logo-small.svg" alt="Apq.Cfg">
+            Apq.Cfg
+          </a>
+          <button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
+            <i class="bi bi-three-dots"></i>
+          </button>
+          <div class="collapse navbar-collapse" id="navpanel">
+            <div id="navbar">
+              <form class="search" role="search" id="search">
+                <i class="bi bi-search"></i>
+                <input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
+              </form>
+            </div>
+          </div>
+        </div>
+      </nav>
+    </header>
+
+    <main class="container-xxl">
+      <div class="toc-offcanvas">
+        <div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
+          <div class="offcanvas-header">
+            <h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
+            <button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
+          </div>
+          <div class="offcanvas-body">
+            <nav class="toc" id="toc"></nav>
+          </div>
+        </div>
+      </div>
+
+      <div class="content">
+        <div class="actionbar">
+          <button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
+            <i class="bi bi-list"></i>
+          </button>
+
+          <nav id="breadcrumb"></nav>
+        </div>
+
+        <article data-uid="Apq.Cfg.Snapshot.ConfigExporter">
+
+
+
+  <h1 id="Apq_Cfg_Snapshot_ConfigExporter" data-uid="Apq.Cfg.Snapshot.ConfigExporter" class="text-break">
+Class ConfigExporter  
+  </h1>
+
+  <div class="facts text-secondary">
+    <dl><dt>Namespace</dt><dd><a class="xref" href="Apq.html">Apq</a>.<a class="xref" href="Apq.Cfg.html">Cfg</a>.<a class="xref" href="Apq.Cfg.Snapshot.html">Snapshot</a></dd></dl>
+  <dl><dt>Assembly</dt><dd>Apq.Cfg.dll</dd></dl>
+  </div>
+
+  <div class="markdown summary"><p>配置快照导出器</p>
+</div>
+  <div class="markdown conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public static class ConfigExporter</code></pre>
+  </div>
+
+
+
+
+  <dl class="typelist inheritance">
+    <dt>Inheritance</dt>
+    <dd>
+      <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
+      <div><span class="xref">ConfigExporter</span></div>
+    </dd>
+  </dl>
+
+
+
+  <dl class="typelist inheritedMembers">
+    <dt>Inherited Members</dt>
+    <dd>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object)</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object, object)</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone">object.MemberwiseClone()</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object, object)</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>
+    </div>
+  </dd></dl>
+
+
+
+
+  <h2 id="Apq_Cfg_Snapshot_ConfigExporter_remarks">Remarks</h2>
+  <div class="markdown level0 remarks"><p>提供配置快照导出的核心功能。支持内置格式和自定义导出器。</p>
+</div>
+
+
+  <h2 class="section" id="methods">Methods
+</h2>
+
+
+  <a id="Apq_Cfg_Snapshot_ConfigExporter_Export_" data-uid="Apq.Cfg.Snapshot.ConfigExporter.Export*"></a>
+
+  <h3 id="Apq_Cfg_Snapshot_ConfigExporter_Export_Apq_Cfg_ICfgRoot_Apq_Cfg_Snapshot_ExportOptions_" data-uid="Apq.Cfg.Snapshot.ConfigExporter.Export(Apq.Cfg.ICfgRoot,Apq.Cfg.Snapshot.ExportOptions)">
+  Export(ICfgRoot, ExportOptions?)
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>使用默认 JSON 格式导出配置</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public static string Export(ICfgRoot cfg, ExportOptions? options = null)</code></pre>
+  </div>
+
+  <h4 class="section">Parameters</h4>
+  <dl class="parameters">
+    <dt><code>cfg</code> <a class="xref" href="Apq.Cfg.ICfgRoot.html">ICfgRoot</a></dt>
+    <dd><p>配置根</p>
+</dd>
+    <dt><code>options</code> <a class="xref" href="Apq.Cfg.Snapshot.ExportOptions.html">ExportOptions</a></dt>
+    <dd><p>导出选项</p>
+</dd>
+  </dl>
+
+  <h4 class="section">Returns</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd><p>导出的配置字符串</p>
+</dd>
+  </dl>
+
+
+
+
+
+
+
+
+
+
+
+  <a id="Apq_Cfg_Snapshot_ConfigExporter_Export_" data-uid="Apq.Cfg.Snapshot.ConfigExporter.Export*"></a>
+
+  <h3 id="Apq_Cfg_Snapshot_ConfigExporter_Export_Apq_Cfg_ICfgRoot_Apq_Cfg_Snapshot_SnapshotExporter_Apq_Cfg_Snapshot_ExportOptions_" data-uid="Apq.Cfg.Snapshot.ConfigExporter.Export(Apq.Cfg.ICfgRoot,Apq.Cfg.Snapshot.SnapshotExporter,Apq.Cfg.Snapshot.ExportOptions)">
+  Export(ICfgRoot, SnapshotExporter, ExportOptions?)
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>使用自定义导出器导出配置</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public static string Export(ICfgRoot cfg, SnapshotExporter exporter, ExportOptions? options = null)</code></pre>
+  </div>
+
+  <h4 class="section">Parameters</h4>
+  <dl class="parameters">
+    <dt><code>cfg</code> <a class="xref" href="Apq.Cfg.ICfgRoot.html">ICfgRoot</a></dt>
+    <dd><p>配置根</p>
+</dd>
+    <dt><code>exporter</code> <a class="xref" href="Apq.Cfg.Snapshot.SnapshotExporter.html">SnapshotExporter</a></dt>
+    <dd><p>导出器委托</p>
+</dd>
+    <dt><code>options</code> <a class="xref" href="Apq.Cfg.Snapshot.ExportOptions.html">ExportOptions</a></dt>
+    <dd><p>导出选项</p>
+</dd>
+  </dl>
+
+  <h4 class="section">Returns</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd><p>导出的配置字符串</p>
+</dd>
+  </dl>
+
+
+
+
+
+
+  <h4 class="section" id="Apq_Cfg_Snapshot_ConfigExporter_Export_Apq_Cfg_ICfgRoot_Apq_Cfg_Snapshot_SnapshotExporter_Apq_Cfg_Snapshot_ExportOptions__examples">Examples</h4>
+  <pre><code class="lang-csharp">// 使用内置导出器
+var json = ConfigExporter.Export(cfg, SnapshotExporters.Json);
+var env = ConfigExporter.Export(cfg, SnapshotExporters.Env);
+
+// 使用自定义导出器
+var custom = ConfigExporter.Export(cfg, (data, ctx) =&gt; string.Join("\n", data.Select(x =&gt; $"{x.Key}={x.Value}")));</code></pre>
+
+
+
+
+
+
+  <a id="Apq_Cfg_Snapshot_ConfigExporter_ExportAsync_" data-uid="Apq.Cfg.Snapshot.ConfigExporter.ExportAsync*"></a>
+
+  <h3 id="Apq_Cfg_Snapshot_ConfigExporter_ExportAsync_Apq_Cfg_ICfgRoot_Apq_Cfg_Snapshot_SnapshotExporter_System_IO_Stream_Apq_Cfg_Snapshot_ExportOptions_System_Threading_CancellationToken_" data-uid="Apq.Cfg.Snapshot.ConfigExporter.ExportAsync(Apq.Cfg.ICfgRoot,Apq.Cfg.Snapshot.SnapshotExporter,System.IO.Stream,Apq.Cfg.Snapshot.ExportOptions,System.Threading.CancellationToken)">
+  ExportAsync(ICfgRoot, SnapshotExporter, Stream, ExportOptions?, CancellationToken)
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>使用自定义导出器导出配置到流</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public static Task ExportAsync(ICfgRoot cfg, SnapshotExporter exporter, Stream stream, ExportOptions? options = null, CancellationToken cancellationToken = default)</code></pre>
+  </div>
+
+  <h4 class="section">Parameters</h4>
+  <dl class="parameters">
+    <dt><code>cfg</code> <a class="xref" href="Apq.Cfg.ICfgRoot.html">ICfgRoot</a></dt>
+    <dd></dd>
+    <dt><code>exporter</code> <a class="xref" href="Apq.Cfg.Snapshot.SnapshotExporter.html">SnapshotExporter</a></dt>
+    <dd></dd>
+    <dt><code>stream</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.io.stream">Stream</a></dt>
+    <dd></dd>
+    <dt><code>options</code> <a class="xref" href="Apq.Cfg.Snapshot.ExportOptions.html">ExportOptions</a></dt>
+    <dd></dd>
+    <dt><code>cancellationToken</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken">CancellationToken</a></dt>
+    <dd></dd>
+  </dl>
+
+  <h4 class="section">Returns</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.tasks.task">Task</a></dt>
+    <dd></dd>
+  </dl>
+
+
+
+
+
+
+
+
+
+
+
+  <a id="Apq_Cfg_Snapshot_ConfigExporter_ExportAsync_" data-uid="Apq.Cfg.Snapshot.ConfigExporter.ExportAsync*"></a>
+
+  <h3 id="Apq_Cfg_Snapshot_ConfigExporter_ExportAsync_Apq_Cfg_ICfgRoot_System_IO_Stream_Apq_Cfg_Snapshot_ExportOptions_System_Threading_CancellationToken_" data-uid="Apq.Cfg.Snapshot.ConfigExporter.ExportAsync(Apq.Cfg.ICfgRoot,System.IO.Stream,Apq.Cfg.Snapshot.ExportOptions,System.Threading.CancellationToken)">
+  ExportAsync(ICfgRoot, Stream, ExportOptions?, CancellationToken)
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>导出配置到流</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public static Task ExportAsync(ICfgRoot cfg, Stream stream, ExportOptions? options = null, CancellationToken cancellationToken = default)</code></pre>
+  </div>
+
+  <h4 class="section">Parameters</h4>
+  <dl class="parameters">
+    <dt><code>cfg</code> <a class="xref" href="Apq.Cfg.ICfgRoot.html">ICfgRoot</a></dt>
+    <dd></dd>
+    <dt><code>stream</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.io.stream">Stream</a></dt>
+    <dd></dd>
+    <dt><code>options</code> <a class="xref" href="Apq.Cfg.Snapshot.ExportOptions.html">ExportOptions</a></dt>
+    <dd></dd>
+    <dt><code>cancellationToken</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken">CancellationToken</a></dt>
+    <dd></dd>
+  </dl>
+
+  <h4 class="section">Returns</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.tasks.task">Task</a></dt>
+    <dd></dd>
+  </dl>
+
+
+
+
+
+
+
+
+
+
+
+  <a id="Apq_Cfg_Snapshot_ConfigExporter_ExportToDictionary_" data-uid="Apq.Cfg.Snapshot.ConfigExporter.ExportToDictionary*"></a>
+
+  <h3 id="Apq_Cfg_Snapshot_ConfigExporter_ExportToDictionary_Apq_Cfg_ICfgRoot_Apq_Cfg_Snapshot_ExportOptions_" data-uid="Apq.Cfg.Snapshot.ConfigExporter.ExportToDictionary(Apq.Cfg.ICfgRoot,Apq.Cfg.Snapshot.ExportOptions)">
+  ExportToDictionary(ICfgRoot, ExportOptions?)
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>导出配置为字典</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public static IReadOnlyDictionary&lt;string, string?&gt; ExportToDictionary(ICfgRoot cfg, ExportOptions? options = null)</code></pre>
+  </div>
+
+  <h4 class="section">Parameters</h4>
+  <dl class="parameters">
+    <dt><code>cfg</code> <a class="xref" href="Apq.Cfg.ICfgRoot.html">ICfgRoot</a></dt>
+    <dd><p>配置根</p>
+</dd>
+    <dt><code>options</code> <a class="xref" href="Apq.Cfg.Snapshot.ExportOptions.html">ExportOptions</a></dt>
+    <dd><p>导出选项(仅使用过滤和脱敏选项)</p>
+</dd>
+  </dl>
+
+  <h4 class="section">Returns</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ireadonlydictionary-2">IReadOnlyDictionary</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a>, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a>&gt;</dt>
+    <dd><p>扁平化的配置字典</p>
+</dd>
+  </dl>
+
+
+
+
+
+
+
+
+
+
+
+  <a id="Apq_Cfg_Snapshot_ConfigExporter_ExportToFileAsync_" data-uid="Apq.Cfg.Snapshot.ConfigExporter.ExportToFileAsync*"></a>
+
+  <h3 id="Apq_Cfg_Snapshot_ConfigExporter_ExportToFileAsync_Apq_Cfg_ICfgRoot_Apq_Cfg_Snapshot_SnapshotExporter_System_String_Apq_Cfg_Snapshot_ExportOptions_System_Threading_CancellationToken_" data-uid="Apq.Cfg.Snapshot.ConfigExporter.ExportToFileAsync(Apq.Cfg.ICfgRoot,Apq.Cfg.Snapshot.SnapshotExporter,System.String,Apq.Cfg.Snapshot.ExportOptions,System.Threading.CancellationToken)">
+  ExportToFileAsync(ICfgRoot, SnapshotExporter, string, ExportOptions?, CancellationToken)
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>使用自定义导出器导出配置到文件</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public static Task ExportToFileAsync(ICfgRoot cfg, SnapshotExporter exporter, string filePath, ExportOptions? options = null, CancellationToken cancellationToken = default)</code></pre>
+  </div>
+
+  <h4 class="section">Parameters</h4>
+  <dl class="parameters">
+    <dt><code>cfg</code> <a class="xref" href="Apq.Cfg.ICfgRoot.html">ICfgRoot</a></dt>
+    <dd></dd>
+    <dt><code>exporter</code> <a class="xref" href="Apq.Cfg.Snapshot.SnapshotExporter.html">SnapshotExporter</a></dt>
+    <dd></dd>
+    <dt><code>filePath</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd></dd>
+    <dt><code>options</code> <a class="xref" href="Apq.Cfg.Snapshot.ExportOptions.html">ExportOptions</a></dt>
+    <dd></dd>
+    <dt><code>cancellationToken</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken">CancellationToken</a></dt>
+    <dd></dd>
+  </dl>
+
+  <h4 class="section">Returns</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.tasks.task">Task</a></dt>
+    <dd></dd>
+  </dl>
+
+
+
+
+
+
+
+
+
+
+
+  <a id="Apq_Cfg_Snapshot_ConfigExporter_ExportToFileAsync_" data-uid="Apq.Cfg.Snapshot.ConfigExporter.ExportToFileAsync*"></a>
+
+  <h3 id="Apq_Cfg_Snapshot_ConfigExporter_ExportToFileAsync_Apq_Cfg_ICfgRoot_System_String_Apq_Cfg_Snapshot_ExportOptions_System_Threading_CancellationToken_" data-uid="Apq.Cfg.Snapshot.ConfigExporter.ExportToFileAsync(Apq.Cfg.ICfgRoot,System.String,Apq.Cfg.Snapshot.ExportOptions,System.Threading.CancellationToken)">
+  ExportToFileAsync(ICfgRoot, string, ExportOptions?, CancellationToken)
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>导出配置到文件</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public static Task ExportToFileAsync(ICfgRoot cfg, string filePath, ExportOptions? options = null, CancellationToken cancellationToken = default)</code></pre>
+  </div>
+
+  <h4 class="section">Parameters</h4>
+  <dl class="parameters">
+    <dt><code>cfg</code> <a class="xref" href="Apq.Cfg.ICfgRoot.html">ICfgRoot</a></dt>
+    <dd></dd>
+    <dt><code>filePath</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd></dd>
+    <dt><code>options</code> <a class="xref" href="Apq.Cfg.Snapshot.ExportOptions.html">ExportOptions</a></dt>
+    <dd></dd>
+    <dt><code>cancellationToken</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken">CancellationToken</a></dt>
+    <dd></dd>
+  </dl>
+
+  <h4 class="section">Returns</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.tasks.task">Task</a></dt>
+    <dd></dd>
+  </dl>
+
+
+
+
+
+
+
+
+
+
+
+
+</article>
+
+
+
+      </div>
+
+      <div class="affix">
+        <nav id="affix"></nav>
+      </div>
+    </main>
+
+    <div class="container-xxl search-results" id="search-results"></div>
+
+    <footer class="border-top text-secondary">
+      <div class="container-xxl">
+        <div class="flex-fill">
+          Apq.Cfg - .NET 统一配置组件库 (基于 .NET 10.0,兼容 .NET 8.0)
+        </div>
+      </div>
+    </footer>
+  </body>
+</html>

+ 367 - 0
docs/site/public/api-reference/api/Apq.Cfg.Snapshot.ExportContext.html

@@ -0,0 +1,367 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8">
+      <title>Class ExportContext | Apq.Cfg API </title>
+      <meta name="viewport" content="width=device-width, initial-scale=1.0">
+      <meta name="title" content="Class ExportContext | Apq.Cfg API ">
+      
+      <meta name="description" content="导出上下文,提供导出时的元数据和选项">
+      <link rel="icon" href="../favicon.svg">
+      <link rel="stylesheet" href="../public/docfx.min.css">
+      <link rel="stylesheet" href="../public/main.css">
+      <meta name="docfx:navrel" content="../toc.html">
+      <meta name="docfx:tocrel" content="toc.html">
+      
+      <meta name="docfx:rel" content="../">
+      
+      
+      
+      <meta name="loc:inThisArticle" content="In this article">
+      <meta name="loc:searchResultsCount" content="{count} results for &quot;{query}&quot;">
+      <meta name="loc:searchNoResults" content="No results for &quot;{query}&quot;">
+      <meta name="loc:tocFilter" content="Filter by title">
+      <meta name="loc:nextArticle" content="Next">
+      <meta name="loc:prevArticle" content="Previous">
+      <meta name="loc:themeLight" content="Light">
+      <meta name="loc:themeDark" content="Dark">
+      <meta name="loc:themeAuto" content="Auto">
+      <meta name="loc:changeTheme" content="Change theme">
+      <meta name="loc:copy" content="Copy">
+      <meta name="loc:downloadPdf" content="Download PDF">
+
+      <script type="module" src="./../public/docfx.min.js"></script>
+
+      <script>
+        const theme = localStorage.getItem('theme') || 'auto'
+        document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
+      </script>
+
+  </head>
+
+  <body class="tex2jax_ignore" data-layout="" data-yaml-mime="ManagedReference">
+    <header class="bg-body border-bottom">
+      <nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
+        <div class="container-xxl flex-nowrap">
+          <a class="navbar-brand" href="../index.html">
+            <img id="logo" class="svg" src="../images/logo-small.svg" alt="Apq.Cfg">
+            Apq.Cfg
+          </a>
+          <button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
+            <i class="bi bi-three-dots"></i>
+          </button>
+          <div class="collapse navbar-collapse" id="navpanel">
+            <div id="navbar">
+              <form class="search" role="search" id="search">
+                <i class="bi bi-search"></i>
+                <input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
+              </form>
+            </div>
+          </div>
+        </div>
+      </nav>
+    </header>
+
+    <main class="container-xxl">
+      <div class="toc-offcanvas">
+        <div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
+          <div class="offcanvas-header">
+            <h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
+            <button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
+          </div>
+          <div class="offcanvas-body">
+            <nav class="toc" id="toc"></nav>
+          </div>
+        </div>
+      </div>
+
+      <div class="content">
+        <div class="actionbar">
+          <button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
+            <i class="bi bi-list"></i>
+          </button>
+
+          <nav id="breadcrumb"></nav>
+        </div>
+
+        <article data-uid="Apq.Cfg.Snapshot.ExportContext">
+
+
+
+  <h1 id="Apq_Cfg_Snapshot_ExportContext" data-uid="Apq.Cfg.Snapshot.ExportContext" class="text-break">
+Class ExportContext  
+  </h1>
+
+  <div class="facts text-secondary">
+    <dl><dt>Namespace</dt><dd><a class="xref" href="Apq.html">Apq</a>.<a class="xref" href="Apq.Cfg.html">Cfg</a>.<a class="xref" href="Apq.Cfg.Snapshot.html">Snapshot</a></dd></dl>
+  <dl><dt>Assembly</dt><dd>Apq.Cfg.dll</dd></dl>
+  </div>
+
+  <div class="markdown summary"><p>导出上下文,提供导出时的元数据和选项</p>
+</div>
+  <div class="markdown conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public sealed class ExportContext</code></pre>
+  </div>
+
+
+
+
+  <dl class="typelist inheritance">
+    <dt>Inheritance</dt>
+    <dd>
+      <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
+      <div><span class="xref">ExportContext</span></div>
+    </dd>
+  </dl>
+
+
+
+  <dl class="typelist inheritedMembers">
+    <dt>Inherited Members</dt>
+    <dd>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object)</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object, object)</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object, object)</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>
+    </div>
+  </dd></dl>
+
+
+
+
+
+
+  <h2 class="section" id="properties">Properties
+</h2>
+
+
+  <a id="Apq_Cfg_Snapshot_ExportContext_EnvPrefix_" data-uid="Apq.Cfg.Snapshot.ExportContext.EnvPrefix*"></a>
+
+  <h3 id="Apq_Cfg_Snapshot_ExportContext_EnvPrefix" data-uid="Apq.Cfg.Snapshot.ExportContext.EnvPrefix">
+  EnvPrefix
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>环境变量格式的键前缀</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public string? EnvPrefix { get; init; }</code></pre>
+  </div>
+
+
+
+
+
+  <h4 class="section">Property Value</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd></dd>
+  </dl>
+
+
+
+
+
+
+
+
+  <a id="Apq_Cfg_Snapshot_ExportContext_ExportedAt_" data-uid="Apq.Cfg.Snapshot.ExportContext.ExportedAt*"></a>
+
+  <h3 id="Apq_Cfg_Snapshot_ExportContext_ExportedAt" data-uid="Apq.Cfg.Snapshot.ExportContext.ExportedAt">
+  ExportedAt
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>导出时间(UTC)</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public DateTime ExportedAt { get; init; }</code></pre>
+  </div>
+
+
+
+
+
+  <h4 class="section">Property Value</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.datetime">DateTime</a></dt>
+    <dd></dd>
+  </dl>
+
+
+
+
+
+
+
+
+  <a id="Apq_Cfg_Snapshot_ExportContext_IncludeMetadata_" data-uid="Apq.Cfg.Snapshot.ExportContext.IncludeMetadata*"></a>
+
+  <h3 id="Apq_Cfg_Snapshot_ExportContext_IncludeMetadata" data-uid="Apq.Cfg.Snapshot.ExportContext.IncludeMetadata">
+  IncludeMetadata
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>是否包含元数据</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public bool IncludeMetadata { get; init; }</code></pre>
+  </div>
+
+
+
+
+
+  <h4 class="section">Property Value</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
+    <dd></dd>
+  </dl>
+
+
+
+
+
+
+
+
+  <a id="Apq_Cfg_Snapshot_ExportContext_Indented_" data-uid="Apq.Cfg.Snapshot.ExportContext.Indented*"></a>
+
+  <h3 id="Apq_Cfg_Snapshot_ExportContext_Indented" data-uid="Apq.Cfg.Snapshot.ExportContext.Indented">
+  Indented
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>是否缩进格式化</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public bool Indented { get; init; }</code></pre>
+  </div>
+
+
+
+
+
+  <h4 class="section">Property Value</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
+    <dd></dd>
+  </dl>
+
+
+
+
+
+
+
+
+  <a id="Apq_Cfg_Snapshot_ExportContext_KeyCount_" data-uid="Apq.Cfg.Snapshot.ExportContext.KeyCount*"></a>
+
+  <h3 id="Apq_Cfg_Snapshot_ExportContext_KeyCount" data-uid="Apq.Cfg.Snapshot.ExportContext.KeyCount">
+  KeyCount
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>配置键数量</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public int KeyCount { get; init; }</code></pre>
+  </div>
+
+
+
+
+
+  <h4 class="section">Property Value</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
+    <dd></dd>
+  </dl>
+
+
+
+
+
+
+
+
+  <a id="Apq_Cfg_Snapshot_ExportContext_Properties_" data-uid="Apq.Cfg.Snapshot.ExportContext.Properties*"></a>
+
+  <h3 id="Apq_Cfg_Snapshot_ExportContext_Properties" data-uid="Apq.Cfg.Snapshot.ExportContext.Properties">
+  Properties
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>自定义属性,供自定义导出器使用</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public IDictionary&lt;string, object?&gt; Properties { get; }</code></pre>
+  </div>
+
+
+
+
+
+  <h4 class="section">Property Value</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.idictionary-2">IDictionary</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a>, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a>&gt;</dt>
+    <dd></dd>
+  </dl>
+
+
+
+
+
+
+
+
+
+</article>
+
+
+
+      </div>
+
+      <div class="affix">
+        <nav id="affix"></nav>
+      </div>
+    </main>
+
+    <div class="container-xxl search-results" id="search-results"></div>
+
+    <footer class="border-top text-secondary">
+      <div class="container-xxl">
+        <div class="flex-fill">
+          Apq.Cfg - .NET 统一配置组件库 (基于 .NET 10.0,兼容 .NET 8.0)
+        </div>
+      </div>
+    </footer>
+  </body>
+</html>

+ 367 - 0
docs/site/public/api-reference/api/Apq.Cfg.Snapshot.ExportOptions.html

@@ -0,0 +1,367 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8">
+      <title>Class ExportOptions | Apq.Cfg API </title>
+      <meta name="viewport" content="width=device-width, initial-scale=1.0">
+      <meta name="title" content="Class ExportOptions | Apq.Cfg API ">
+      
+      <meta name="description" content="配置导出选项">
+      <link rel="icon" href="../favicon.svg">
+      <link rel="stylesheet" href="../public/docfx.min.css">
+      <link rel="stylesheet" href="../public/main.css">
+      <meta name="docfx:navrel" content="../toc.html">
+      <meta name="docfx:tocrel" content="toc.html">
+      
+      <meta name="docfx:rel" content="../">
+      
+      
+      
+      <meta name="loc:inThisArticle" content="In this article">
+      <meta name="loc:searchResultsCount" content="{count} results for &quot;{query}&quot;">
+      <meta name="loc:searchNoResults" content="No results for &quot;{query}&quot;">
+      <meta name="loc:tocFilter" content="Filter by title">
+      <meta name="loc:nextArticle" content="Next">
+      <meta name="loc:prevArticle" content="Previous">
+      <meta name="loc:themeLight" content="Light">
+      <meta name="loc:themeDark" content="Dark">
+      <meta name="loc:themeAuto" content="Auto">
+      <meta name="loc:changeTheme" content="Change theme">
+      <meta name="loc:copy" content="Copy">
+      <meta name="loc:downloadPdf" content="Download PDF">
+
+      <script type="module" src="./../public/docfx.min.js"></script>
+
+      <script>
+        const theme = localStorage.getItem('theme') || 'auto'
+        document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
+      </script>
+
+  </head>
+
+  <body class="tex2jax_ignore" data-layout="" data-yaml-mime="ManagedReference">
+    <header class="bg-body border-bottom">
+      <nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
+        <div class="container-xxl flex-nowrap">
+          <a class="navbar-brand" href="../index.html">
+            <img id="logo" class="svg" src="../images/logo-small.svg" alt="Apq.Cfg">
+            Apq.Cfg
+          </a>
+          <button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
+            <i class="bi bi-three-dots"></i>
+          </button>
+          <div class="collapse navbar-collapse" id="navpanel">
+            <div id="navbar">
+              <form class="search" role="search" id="search">
+                <i class="bi bi-search"></i>
+                <input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
+              </form>
+            </div>
+          </div>
+        </div>
+      </nav>
+    </header>
+
+    <main class="container-xxl">
+      <div class="toc-offcanvas">
+        <div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
+          <div class="offcanvas-header">
+            <h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
+            <button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
+          </div>
+          <div class="offcanvas-body">
+            <nav class="toc" id="toc"></nav>
+          </div>
+        </div>
+      </div>
+
+      <div class="content">
+        <div class="actionbar">
+          <button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
+            <i class="bi bi-list"></i>
+          </button>
+
+          <nav id="breadcrumb"></nav>
+        </div>
+
+        <article data-uid="Apq.Cfg.Snapshot.ExportOptions">
+
+
+
+  <h1 id="Apq_Cfg_Snapshot_ExportOptions" data-uid="Apq.Cfg.Snapshot.ExportOptions" class="text-break">
+Class ExportOptions  
+  </h1>
+
+  <div class="facts text-secondary">
+    <dl><dt>Namespace</dt><dd><a class="xref" href="Apq.html">Apq</a>.<a class="xref" href="Apq.Cfg.html">Cfg</a>.<a class="xref" href="Apq.Cfg.Snapshot.html">Snapshot</a></dd></dl>
+  <dl><dt>Assembly</dt><dd>Apq.Cfg.dll</dd></dl>
+  </div>
+
+  <div class="markdown summary"><p>配置导出选项</p>
+</div>
+  <div class="markdown conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public sealed class ExportOptions</code></pre>
+  </div>
+
+
+
+
+  <dl class="typelist inheritance">
+    <dt>Inheritance</dt>
+    <dd>
+      <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
+      <div><span class="xref">ExportOptions</span></div>
+    </dd>
+  </dl>
+
+
+
+  <dl class="typelist inheritedMembers">
+    <dt>Inherited Members</dt>
+    <dd>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object)</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object, object)</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object, object)</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>
+    </div>
+  </dd></dl>
+
+
+
+
+
+
+  <h2 class="section" id="properties">Properties
+</h2>
+
+
+  <a id="Apq_Cfg_Snapshot_ExportOptions_EnvPrefix_" data-uid="Apq.Cfg.Snapshot.ExportOptions.EnvPrefix*"></a>
+
+  <h3 id="Apq_Cfg_Snapshot_ExportOptions_EnvPrefix" data-uid="Apq.Cfg.Snapshot.ExportOptions.EnvPrefix">
+  EnvPrefix
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>环境变量格式的键前缀</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public string? EnvPrefix { get; set; }</code></pre>
+  </div>
+
+
+
+
+
+  <h4 class="section">Property Value</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd></dd>
+  </dl>
+
+
+
+
+
+
+
+
+  <a id="Apq_Cfg_Snapshot_ExportOptions_ExcludeKeys_" data-uid="Apq.Cfg.Snapshot.ExportOptions.ExcludeKeys*"></a>
+
+  <h3 id="Apq_Cfg_Snapshot_ExportOptions_ExcludeKeys" data-uid="Apq.Cfg.Snapshot.ExportOptions.ExcludeKeys">
+  ExcludeKeys
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>排除指定的键(支持通配符 *)</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public string[]? ExcludeKeys { get; set; }</code></pre>
+  </div>
+
+
+
+
+
+  <h4 class="section">Property Value</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a>[]</dt>
+    <dd></dd>
+  </dl>
+
+
+
+
+
+
+
+
+  <a id="Apq_Cfg_Snapshot_ExportOptions_IncludeKeys_" data-uid="Apq.Cfg.Snapshot.ExportOptions.IncludeKeys*"></a>
+
+  <h3 id="Apq_Cfg_Snapshot_ExportOptions_IncludeKeys" data-uid="Apq.Cfg.Snapshot.ExportOptions.IncludeKeys">
+  IncludeKeys
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>仅包含指定的键(支持通配符 *),为 null 时包含所有键</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public string[]? IncludeKeys { get; set; }</code></pre>
+  </div>
+
+
+
+
+
+  <h4 class="section">Property Value</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a>[]</dt>
+    <dd></dd>
+  </dl>
+
+
+
+
+
+
+
+
+  <a id="Apq_Cfg_Snapshot_ExportOptions_IncludeMetadata_" data-uid="Apq.Cfg.Snapshot.ExportOptions.IncludeMetadata*"></a>
+
+  <h3 id="Apq_Cfg_Snapshot_ExportOptions_IncludeMetadata" data-uid="Apq.Cfg.Snapshot.ExportOptions.IncludeMetadata">
+  IncludeMetadata
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>是否包含元数据(导出时间、版本等)</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public bool IncludeMetadata { get; set; }</code></pre>
+  </div>
+
+
+
+
+
+  <h4 class="section">Property Value</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
+    <dd></dd>
+  </dl>
+
+
+
+
+
+
+
+
+  <a id="Apq_Cfg_Snapshot_ExportOptions_Indented_" data-uid="Apq.Cfg.Snapshot.ExportOptions.Indented*"></a>
+
+  <h3 id="Apq_Cfg_Snapshot_ExportOptions_Indented" data-uid="Apq.Cfg.Snapshot.ExportOptions.Indented">
+  Indented
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>JSON 格式化选项:是否缩进</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public bool Indented { get; set; }</code></pre>
+  </div>
+
+
+
+
+
+  <h4 class="section">Property Value</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
+    <dd></dd>
+  </dl>
+
+
+
+
+
+
+
+
+  <a id="Apq_Cfg_Snapshot_ExportOptions_MaskSensitiveValues_" data-uid="Apq.Cfg.Snapshot.ExportOptions.MaskSensitiveValues*"></a>
+
+  <h3 id="Apq_Cfg_Snapshot_ExportOptions_MaskSensitiveValues" data-uid="Apq.Cfg.Snapshot.ExportOptions.MaskSensitiveValues">
+  MaskSensitiveValues
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>是否对敏感值进行脱敏处理</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public bool MaskSensitiveValues { get; set; }</code></pre>
+  </div>
+
+
+
+
+
+  <h4 class="section">Property Value</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
+    <dd></dd>
+  </dl>
+
+
+
+
+
+
+
+
+
+</article>
+
+
+
+      </div>
+
+      <div class="affix">
+        <nav id="affix"></nav>
+      </div>
+    </main>
+
+    <div class="container-xxl search-results" id="search-results"></div>
+
+    <footer class="border-top text-secondary">
+      <div class="container-xxl">
+        <div class="flex-fill">
+          Apq.Cfg - .NET 统一配置组件库 (基于 .NET 10.0,兼容 .NET 8.0)
+        </div>
+      </div>
+    </footer>
+  </body>
+</html>

+ 157 - 0
docs/site/public/api-reference/api/Apq.Cfg.Snapshot.SnapshotExporter.html

@@ -0,0 +1,157 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8">
+      <title>Delegate SnapshotExporter | Apq.Cfg API </title>
+      <meta name="viewport" content="width=device-width, initial-scale=1.0">
+      <meta name="title" content="Delegate SnapshotExporter | Apq.Cfg API ">
+      
+      <meta name="description" content="配置快照导出委托">
+      <link rel="icon" href="../favicon.svg">
+      <link rel="stylesheet" href="../public/docfx.min.css">
+      <link rel="stylesheet" href="../public/main.css">
+      <meta name="docfx:navrel" content="../toc.html">
+      <meta name="docfx:tocrel" content="toc.html">
+      
+      <meta name="docfx:rel" content="../">
+      
+      
+      
+      <meta name="loc:inThisArticle" content="In this article">
+      <meta name="loc:searchResultsCount" content="{count} results for &quot;{query}&quot;">
+      <meta name="loc:searchNoResults" content="No results for &quot;{query}&quot;">
+      <meta name="loc:tocFilter" content="Filter by title">
+      <meta name="loc:nextArticle" content="Next">
+      <meta name="loc:prevArticle" content="Previous">
+      <meta name="loc:themeLight" content="Light">
+      <meta name="loc:themeDark" content="Dark">
+      <meta name="loc:themeAuto" content="Auto">
+      <meta name="loc:changeTheme" content="Change theme">
+      <meta name="loc:copy" content="Copy">
+      <meta name="loc:downloadPdf" content="Download PDF">
+
+      <script type="module" src="./../public/docfx.min.js"></script>
+
+      <script>
+        const theme = localStorage.getItem('theme') || 'auto'
+        document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
+      </script>
+
+  </head>
+
+  <body class="tex2jax_ignore" data-layout="" data-yaml-mime="ManagedReference">
+    <header class="bg-body border-bottom">
+      <nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
+        <div class="container-xxl flex-nowrap">
+          <a class="navbar-brand" href="../index.html">
+            <img id="logo" class="svg" src="../images/logo-small.svg" alt="Apq.Cfg">
+            Apq.Cfg
+          </a>
+          <button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
+            <i class="bi bi-three-dots"></i>
+          </button>
+          <div class="collapse navbar-collapse" id="navpanel">
+            <div id="navbar">
+              <form class="search" role="search" id="search">
+                <i class="bi bi-search"></i>
+                <input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
+              </form>
+            </div>
+          </div>
+        </div>
+      </nav>
+    </header>
+
+    <main class="container-xxl">
+      <div class="toc-offcanvas">
+        <div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
+          <div class="offcanvas-header">
+            <h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
+            <button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
+          </div>
+          <div class="offcanvas-body">
+            <nav class="toc" id="toc"></nav>
+          </div>
+        </div>
+      </div>
+
+      <div class="content">
+        <div class="actionbar">
+          <button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
+            <i class="bi bi-list"></i>
+          </button>
+
+          <nav id="breadcrumb"></nav>
+        </div>
+
+        <article data-uid="Apq.Cfg.Snapshot.SnapshotExporter">
+
+
+
+  <h1 id="Apq_Cfg_Snapshot_SnapshotExporter" data-uid="Apq.Cfg.Snapshot.SnapshotExporter" class="text-break">
+Delegate SnapshotExporter  
+  </h1>
+
+  <div class="facts text-secondary">
+    <dl><dt>Namespace</dt><dd><a class="xref" href="Apq.html">Apq</a>.<a class="xref" href="Apq.Cfg.html">Cfg</a>.<a class="xref" href="Apq.Cfg.Snapshot.html">Snapshot</a></dd></dl>
+  <dl><dt>Assembly</dt><dd>Apq.Cfg.dll</dd></dl>
+  </div>
+
+  <div class="markdown summary"><p>配置快照导出委托</p>
+</div>
+  <div class="markdown conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public delegate string SnapshotExporter(IReadOnlyDictionary&lt;string, string?&gt; data, ExportContext context)</code></pre>
+  </div>
+
+  <h4 class="section">Parameters</h4>
+  <dl class="parameters">
+    <dt><code>data</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ireadonlydictionary-2">IReadOnlyDictionary</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a>, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a>&gt;</dt>
+    <dd><p>扁平化的配置键值对</p>
+</dd>
+    <dt><code>context</code> <a class="xref" href="Apq.Cfg.Snapshot.ExportContext.html">ExportContext</a></dt>
+    <dd><p>导出上下文,包含元数据和选项</p>
+</dd>
+  </dl>
+
+  <h4 class="section">Returns</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd><p>导出的字符串</p>
+</dd>
+  </dl>
+
+
+
+
+
+
+
+
+
+
+
+
+</article>
+
+
+
+      </div>
+
+      <div class="affix">
+        <nav id="affix"></nav>
+      </div>
+    </main>
+
+    <div class="container-xxl search-results" id="search-results"></div>
+
+    <footer class="border-top text-secondary">
+      <div class="container-xxl">
+        <div class="flex-fill">
+          Apq.Cfg - .NET 统一配置组件库 (基于 .NET 10.0,兼容 .NET 8.0)
+        </div>
+      </div>
+    </footer>
+  </body>
+</html>

+ 308 - 0
docs/site/public/api-reference/api/Apq.Cfg.Snapshot.SnapshotExporters.html

@@ -0,0 +1,308 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8">
+      <title>Class SnapshotExporters | Apq.Cfg API </title>
+      <meta name="viewport" content="width=device-width, initial-scale=1.0">
+      <meta name="title" content="Class SnapshotExporters | Apq.Cfg API ">
+      
+      <meta name="description" content="内置配置快照导出器">
+      <link rel="icon" href="../favicon.svg">
+      <link rel="stylesheet" href="../public/docfx.min.css">
+      <link rel="stylesheet" href="../public/main.css">
+      <meta name="docfx:navrel" content="../toc.html">
+      <meta name="docfx:tocrel" content="toc.html">
+      
+      <meta name="docfx:rel" content="../">
+      
+      
+      
+      <meta name="loc:inThisArticle" content="In this article">
+      <meta name="loc:searchResultsCount" content="{count} results for &quot;{query}&quot;">
+      <meta name="loc:searchNoResults" content="No results for &quot;{query}&quot;">
+      <meta name="loc:tocFilter" content="Filter by title">
+      <meta name="loc:nextArticle" content="Next">
+      <meta name="loc:prevArticle" content="Previous">
+      <meta name="loc:themeLight" content="Light">
+      <meta name="loc:themeDark" content="Dark">
+      <meta name="loc:themeAuto" content="Auto">
+      <meta name="loc:changeTheme" content="Change theme">
+      <meta name="loc:copy" content="Copy">
+      <meta name="loc:downloadPdf" content="Download PDF">
+
+      <script type="module" src="./../public/docfx.min.js"></script>
+
+      <script>
+        const theme = localStorage.getItem('theme') || 'auto'
+        document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
+      </script>
+
+  </head>
+
+  <body class="tex2jax_ignore" data-layout="" data-yaml-mime="ManagedReference">
+    <header class="bg-body border-bottom">
+      <nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
+        <div class="container-xxl flex-nowrap">
+          <a class="navbar-brand" href="../index.html">
+            <img id="logo" class="svg" src="../images/logo-small.svg" alt="Apq.Cfg">
+            Apq.Cfg
+          </a>
+          <button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
+            <i class="bi bi-three-dots"></i>
+          </button>
+          <div class="collapse navbar-collapse" id="navpanel">
+            <div id="navbar">
+              <form class="search" role="search" id="search">
+                <i class="bi bi-search"></i>
+                <input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
+              </form>
+            </div>
+          </div>
+        </div>
+      </nav>
+    </header>
+
+    <main class="container-xxl">
+      <div class="toc-offcanvas">
+        <div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
+          <div class="offcanvas-header">
+            <h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
+            <button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
+          </div>
+          <div class="offcanvas-body">
+            <nav class="toc" id="toc"></nav>
+          </div>
+        </div>
+      </div>
+
+      <div class="content">
+        <div class="actionbar">
+          <button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
+            <i class="bi bi-list"></i>
+          </button>
+
+          <nav id="breadcrumb"></nav>
+        </div>
+
+        <article data-uid="Apq.Cfg.Snapshot.SnapshotExporters">
+
+
+
+  <h1 id="Apq_Cfg_Snapshot_SnapshotExporters" data-uid="Apq.Cfg.Snapshot.SnapshotExporters" class="text-break">
+Class SnapshotExporters  
+  </h1>
+
+  <div class="facts text-secondary">
+    <dl><dt>Namespace</dt><dd><a class="xref" href="Apq.html">Apq</a>.<a class="xref" href="Apq.Cfg.html">Cfg</a>.<a class="xref" href="Apq.Cfg.Snapshot.html">Snapshot</a></dd></dl>
+  <dl><dt>Assembly</dt><dd>Apq.Cfg.dll</dd></dl>
+  </div>
+
+  <div class="markdown summary"><p>内置配置快照导出器</p>
+</div>
+  <div class="markdown conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public static class SnapshotExporters</code></pre>
+  </div>
+
+
+
+
+  <dl class="typelist inheritance">
+    <dt>Inheritance</dt>
+    <dd>
+      <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
+      <div><span class="xref">SnapshotExporters</span></div>
+    </dd>
+  </dl>
+
+
+
+  <dl class="typelist inheritedMembers">
+    <dt>Inherited Members</dt>
+    <dd>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object)</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object, object)</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone">object.MemberwiseClone()</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object, object)</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>
+    </div>
+  </dd></dl>
+
+
+
+
+
+
+  <h2 class="section" id="methods">Methods
+</h2>
+
+
+  <a id="Apq_Cfg_Snapshot_SnapshotExporters_Env_" data-uid="Apq.Cfg.Snapshot.SnapshotExporters.Env*"></a>
+
+  <h3 id="Apq_Cfg_Snapshot_SnapshotExporters_Env_System_Collections_Generic_IReadOnlyDictionary_System_String_System_String__Apq_Cfg_Snapshot_ExportContext_" data-uid="Apq.Cfg.Snapshot.SnapshotExporters.Env(System.Collections.Generic.IReadOnlyDictionary{System.String,System.String},Apq.Cfg.Snapshot.ExportContext)">
+  Env(IReadOnlyDictionary&lt;string, string?&gt;, ExportContext)
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>环境变量格式导出器</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public static string Env(IReadOnlyDictionary&lt;string, string?&gt; data, ExportContext context)</code></pre>
+  </div>
+
+  <h4 class="section">Parameters</h4>
+  <dl class="parameters">
+    <dt><code>data</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ireadonlydictionary-2">IReadOnlyDictionary</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a>, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a>&gt;</dt>
+    <dd></dd>
+    <dt><code>context</code> <a class="xref" href="Apq.Cfg.Snapshot.ExportContext.html">ExportContext</a></dt>
+    <dd></dd>
+  </dl>
+
+  <h4 class="section">Returns</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd></dd>
+  </dl>
+
+
+
+
+
+
+
+  <h4 class="section" id="Apq_Cfg_Snapshot_SnapshotExporters_Env_System_Collections_Generic_IReadOnlyDictionary_System_String_System_String__Apq_Cfg_Snapshot_ExportContext__remarks">Remarks</h4>
+  <div class="markdown level1 remarks"><p>将配置导出为环境变量格式。
+键名转换规则:转为大写,冒号替换为双下划线。
+例如:Database:Host -&gt; DATABASE__HOST=localhost</p>
+</div>
+
+
+
+
+  <a id="Apq_Cfg_Snapshot_SnapshotExporters_Json_" data-uid="Apq.Cfg.Snapshot.SnapshotExporters.Json*"></a>
+
+  <h3 id="Apq_Cfg_Snapshot_SnapshotExporters_Json_System_Collections_Generic_IReadOnlyDictionary_System_String_System_String__Apq_Cfg_Snapshot_ExportContext_" data-uid="Apq.Cfg.Snapshot.SnapshotExporters.Json(System.Collections.Generic.IReadOnlyDictionary{System.String,System.String},Apq.Cfg.Snapshot.ExportContext)">
+  Json(IReadOnlyDictionary&lt;string, string?&gt;, ExportContext)
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>JSON 格式导出器(嵌套结构)</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public static string Json(IReadOnlyDictionary&lt;string, string?&gt; data, ExportContext context)</code></pre>
+  </div>
+
+  <h4 class="section">Parameters</h4>
+  <dl class="parameters">
+    <dt><code>data</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ireadonlydictionary-2">IReadOnlyDictionary</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a>, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a>&gt;</dt>
+    <dd></dd>
+    <dt><code>context</code> <a class="xref" href="Apq.Cfg.Snapshot.ExportContext.html">ExportContext</a></dt>
+    <dd></dd>
+  </dl>
+
+  <h4 class="section">Returns</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd></dd>
+  </dl>
+
+
+
+
+
+
+
+  <h4 class="section" id="Apq_Cfg_Snapshot_SnapshotExporters_Json_System_Collections_Generic_IReadOnlyDictionary_System_String_System_String__Apq_Cfg_Snapshot_ExportContext__remarks">Remarks</h4>
+  <div class="markdown level1 remarks"><p>将配置导出为嵌套的 JSON 结构。
+例如 &quot;Database:Host&quot; = &quot;localhost&quot; 会导出为 {&quot;Database&quot;: {&quot;Host&quot;: &quot;localhost&quot;}}</p>
+</div>
+
+
+
+
+  <a id="Apq_Cfg_Snapshot_SnapshotExporters_KeyValue_" data-uid="Apq.Cfg.Snapshot.SnapshotExporters.KeyValue*"></a>
+
+  <h3 id="Apq_Cfg_Snapshot_SnapshotExporters_KeyValue_System_Collections_Generic_IReadOnlyDictionary_System_String_System_String__Apq_Cfg_Snapshot_ExportContext_" data-uid="Apq.Cfg.Snapshot.SnapshotExporters.KeyValue(System.Collections.Generic.IReadOnlyDictionary{System.String,System.String},Apq.Cfg.Snapshot.ExportContext)">
+  KeyValue(IReadOnlyDictionary&lt;string, string?&gt;, ExportContext)
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>键值对格式导出器</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public static string KeyValue(IReadOnlyDictionary&lt;string, string?&gt; data, ExportContext context)</code></pre>
+  </div>
+
+  <h4 class="section">Parameters</h4>
+  <dl class="parameters">
+    <dt><code>data</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ireadonlydictionary-2">IReadOnlyDictionary</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a>, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a>&gt;</dt>
+    <dd></dd>
+    <dt><code>context</code> <a class="xref" href="Apq.Cfg.Snapshot.ExportContext.html">ExportContext</a></dt>
+    <dd></dd>
+  </dl>
+
+  <h4 class="section">Returns</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd></dd>
+  </dl>
+
+
+
+
+
+
+
+  <h4 class="section" id="Apq_Cfg_Snapshot_SnapshotExporters_KeyValue_System_Collections_Generic_IReadOnlyDictionary_System_String_System_String__Apq_Cfg_Snapshot_ExportContext__remarks">Remarks</h4>
+  <div class="markdown level1 remarks"><p>将配置导出为扁平的键值对格式(key=value)。
+例如:Database:Host=localhost</p>
+</div>
+
+
+
+
+
+</article>
+
+
+
+      </div>
+
+      <div class="affix">
+        <nav id="affix"></nav>
+      </div>
+    </main>
+
+    <div class="container-xxl search-results" id="search-results"></div>
+
+    <footer class="border-top text-secondary">
+      <div class="container-xxl">
+        <div class="flex-fill">
+          Apq.Cfg - .NET 统一配置组件库 (基于 .NET 10.0,兼容 .NET 8.0)
+        </div>
+      </div>
+    </footer>
+  </body>
+</html>

+ 153 - 0
docs/site/public/api-reference/api/Apq.Cfg.Snapshot.html

@@ -0,0 +1,153 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8">
+      <title>Namespace Apq.Cfg.Snapshot | Apq.Cfg API </title>
+      <meta name="viewport" content="width=device-width, initial-scale=1.0">
+      <meta name="title" content="Namespace Apq.Cfg.Snapshot | Apq.Cfg API ">
+      
+      
+      <link rel="icon" href="../favicon.svg">
+      <link rel="stylesheet" href="../public/docfx.min.css">
+      <link rel="stylesheet" href="../public/main.css">
+      <meta name="docfx:navrel" content="../toc.html">
+      <meta name="docfx:tocrel" content="toc.html">
+      
+      <meta name="docfx:rel" content="../">
+      
+      
+      
+      <meta name="loc:inThisArticle" content="In this article">
+      <meta name="loc:searchResultsCount" content="{count} results for &quot;{query}&quot;">
+      <meta name="loc:searchNoResults" content="No results for &quot;{query}&quot;">
+      <meta name="loc:tocFilter" content="Filter by title">
+      <meta name="loc:nextArticle" content="Next">
+      <meta name="loc:prevArticle" content="Previous">
+      <meta name="loc:themeLight" content="Light">
+      <meta name="loc:themeDark" content="Dark">
+      <meta name="loc:themeAuto" content="Auto">
+      <meta name="loc:changeTheme" content="Change theme">
+      <meta name="loc:copy" content="Copy">
+      <meta name="loc:downloadPdf" content="Download PDF">
+
+      <script type="module" src="./../public/docfx.min.js"></script>
+
+      <script>
+        const theme = localStorage.getItem('theme') || 'auto'
+        document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
+      </script>
+
+  </head>
+
+  <body class="tex2jax_ignore" data-layout="" data-yaml-mime="ManagedReference">
+    <header class="bg-body border-bottom">
+      <nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
+        <div class="container-xxl flex-nowrap">
+          <a class="navbar-brand" href="../index.html">
+            <img id="logo" class="svg" src="../images/logo-small.svg" alt="Apq.Cfg">
+            Apq.Cfg
+          </a>
+          <button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
+            <i class="bi bi-three-dots"></i>
+          </button>
+          <div class="collapse navbar-collapse" id="navpanel">
+            <div id="navbar">
+              <form class="search" role="search" id="search">
+                <i class="bi bi-search"></i>
+                <input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
+              </form>
+            </div>
+          </div>
+        </div>
+      </nav>
+    </header>
+
+    <main class="container-xxl">
+      <div class="toc-offcanvas">
+        <div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
+          <div class="offcanvas-header">
+            <h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
+            <button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
+          </div>
+          <div class="offcanvas-body">
+            <nav class="toc" id="toc"></nav>
+          </div>
+        </div>
+      </div>
+
+      <div class="content">
+        <div class="actionbar">
+          <button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
+            <i class="bi bi-list"></i>
+          </button>
+
+          <nav id="breadcrumb"></nav>
+        </div>
+
+        <article data-uid="Apq.Cfg.Snapshot">
+
+  <h1 id="Apq_Cfg_Snapshot" data-uid="Apq.Cfg.Snapshot" class="text-break">Namespace Apq.Cfg.Snapshot</h1>
+  <div class="markdown level0 summary"></div>
+  <div class="markdown level0 conceptual"></div>
+  <div class="markdown level0 remarks"></div>
+
+    <h3 id="classes">
+Classes
+</h3>
+    <dl class="jumplist">
+      <dt><a class="xref" href="Apq.Cfg.Snapshot.CfgRootSnapshotExtensions.html">CfgRootSnapshotExtensions</a></dt>
+      <dd><p>ICfgRoot 配置快照导出扩展方法</p>
+</dd>
+    </dl>
+    <dl class="jumplist">
+      <dt><a class="xref" href="Apq.Cfg.Snapshot.ConfigExporter.html">ConfigExporter</a></dt>
+      <dd><p>配置快照导出器</p>
+</dd>
+    </dl>
+    <dl class="jumplist">
+      <dt><a class="xref" href="Apq.Cfg.Snapshot.ExportContext.html">ExportContext</a></dt>
+      <dd><p>导出上下文,提供导出时的元数据和选项</p>
+</dd>
+    </dl>
+    <dl class="jumplist">
+      <dt><a class="xref" href="Apq.Cfg.Snapshot.ExportOptions.html">ExportOptions</a></dt>
+      <dd><p>配置导出选项</p>
+</dd>
+    </dl>
+    <dl class="jumplist">
+      <dt><a class="xref" href="Apq.Cfg.Snapshot.SnapshotExporters.html">SnapshotExporters</a></dt>
+      <dd><p>内置配置快照导出器</p>
+</dd>
+    </dl>
+    <h3 id="delegates">
+Delegates
+</h3>
+    <dl class="jumplist">
+      <dt><a class="xref" href="Apq.Cfg.Snapshot.SnapshotExporter.html">SnapshotExporter</a></dt>
+      <dd><p>配置快照导出委托</p>
+</dd>
+    </dl>
+
+
+</article>
+
+
+
+      </div>
+
+      <div class="affix">
+        <nav id="affix"></nav>
+      </div>
+    </main>
+
+    <div class="container-xxl search-results" id="search-results"></div>
+
+    <footer class="border-top text-secondary">
+      <div class="container-xxl">
+        <div class="flex-fill">
+          Apq.Cfg - .NET 统一配置组件库 (基于 .NET 10.0,兼容 .NET 8.0)
+        </div>
+      </div>
+    </footer>
+  </body>
+</html>

+ 227 - 0
docs/site/public/api-reference/api/Apq.Cfg.Template.IVariableResolver.html

@@ -0,0 +1,227 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8">
+      <title>Interface IVariableResolver | Apq.Cfg API </title>
+      <meta name="viewport" content="width=device-width, initial-scale=1.0">
+      <meta name="title" content="Interface IVariableResolver | Apq.Cfg API ">
+      
+      <meta name="description" content="变量解析器接口">
+      <link rel="icon" href="../favicon.svg">
+      <link rel="stylesheet" href="../public/docfx.min.css">
+      <link rel="stylesheet" href="../public/main.css">
+      <meta name="docfx:navrel" content="../toc.html">
+      <meta name="docfx:tocrel" content="toc.html">
+      
+      <meta name="docfx:rel" content="../">
+      
+      
+      
+      <meta name="loc:inThisArticle" content="In this article">
+      <meta name="loc:searchResultsCount" content="{count} results for &quot;{query}&quot;">
+      <meta name="loc:searchNoResults" content="No results for &quot;{query}&quot;">
+      <meta name="loc:tocFilter" content="Filter by title">
+      <meta name="loc:nextArticle" content="Next">
+      <meta name="loc:prevArticle" content="Previous">
+      <meta name="loc:themeLight" content="Light">
+      <meta name="loc:themeDark" content="Dark">
+      <meta name="loc:themeAuto" content="Auto">
+      <meta name="loc:changeTheme" content="Change theme">
+      <meta name="loc:copy" content="Copy">
+      <meta name="loc:downloadPdf" content="Download PDF">
+
+      <script type="module" src="./../public/docfx.min.js"></script>
+
+      <script>
+        const theme = localStorage.getItem('theme') || 'auto'
+        document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
+      </script>
+
+  </head>
+
+  <body class="tex2jax_ignore" data-layout="" data-yaml-mime="ManagedReference">
+    <header class="bg-body border-bottom">
+      <nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
+        <div class="container-xxl flex-nowrap">
+          <a class="navbar-brand" href="../index.html">
+            <img id="logo" class="svg" src="../images/logo-small.svg" alt="Apq.Cfg">
+            Apq.Cfg
+          </a>
+          <button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
+            <i class="bi bi-three-dots"></i>
+          </button>
+          <div class="collapse navbar-collapse" id="navpanel">
+            <div id="navbar">
+              <form class="search" role="search" id="search">
+                <i class="bi bi-search"></i>
+                <input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
+              </form>
+            </div>
+          </div>
+        </div>
+      </nav>
+    </header>
+
+    <main class="container-xxl">
+      <div class="toc-offcanvas">
+        <div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
+          <div class="offcanvas-header">
+            <h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
+            <button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
+          </div>
+          <div class="offcanvas-body">
+            <nav class="toc" id="toc"></nav>
+          </div>
+        </div>
+      </div>
+
+      <div class="content">
+        <div class="actionbar">
+          <button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
+            <i class="bi bi-list"></i>
+          </button>
+
+          <nav id="breadcrumb"></nav>
+        </div>
+
+        <article data-uid="Apq.Cfg.Template.IVariableResolver">
+
+
+
+  <h1 id="Apq_Cfg_Template_IVariableResolver" data-uid="Apq.Cfg.Template.IVariableResolver" class="text-break">
+Interface IVariableResolver  
+  </h1>
+
+  <div class="facts text-secondary">
+    <dl><dt>Namespace</dt><dd><a class="xref" href="Apq.html">Apq</a>.<a class="xref" href="Apq.Cfg.html">Cfg</a>.<a class="xref" href="Apq.Cfg.Template.html">Template</a></dd></dl>
+  <dl><dt>Assembly</dt><dd>Apq.Cfg.dll</dd></dl>
+  </div>
+
+  <div class="markdown summary"><p>变量解析器接口</p>
+</div>
+  <div class="markdown conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public interface IVariableResolver</code></pre>
+  </div>
+
+
+
+
+
+
+
+
+
+
+
+  <h2 id="Apq_Cfg_Template_IVariableResolver_remarks">Remarks</h2>
+  <div class="markdown level0 remarks"><p>用于解析配置模板中的变量引用,如 ${App:Name} 或 ${ENV:PATH}</p>
+</div>
+
+
+  <h2 class="section" id="properties">Properties
+</h2>
+
+
+  <a id="Apq_Cfg_Template_IVariableResolver_Prefix_" data-uid="Apq.Cfg.Template.IVariableResolver.Prefix*"></a>
+
+  <h3 id="Apq_Cfg_Template_IVariableResolver_Prefix" data-uid="Apq.Cfg.Template.IVariableResolver.Prefix">
+  Prefix
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>解析器前缀(如 &quot;ENV&quot;、&quot;SYS&quot;),为 null 表示默认解析器</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">string? Prefix { get; }</code></pre>
+  </div>
+
+
+
+
+
+  <h4 class="section">Property Value</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd></dd>
+  </dl>
+
+
+
+
+
+
+
+
+  <h2 class="section" id="methods">Methods
+</h2>
+
+
+  <a id="Apq_Cfg_Template_IVariableResolver_Resolve_" data-uid="Apq.Cfg.Template.IVariableResolver.Resolve*"></a>
+
+  <h3 id="Apq_Cfg_Template_IVariableResolver_Resolve_System_String_Apq_Cfg_ICfgRoot_" data-uid="Apq.Cfg.Template.IVariableResolver.Resolve(System.String,Apq.Cfg.ICfgRoot)">
+  Resolve(string, ICfgRoot)
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>解析变量</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">string? Resolve(string variableName, ICfgRoot cfg)</code></pre>
+  </div>
+
+  <h4 class="section">Parameters</h4>
+  <dl class="parameters">
+    <dt><code>variableName</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd><p>变量名(不含前缀)</p>
+</dd>
+    <dt><code>cfg</code> <a class="xref" href="Apq.Cfg.ICfgRoot.html">ICfgRoot</a></dt>
+    <dd><p>配置根,用于引用其他配置</p>
+</dd>
+  </dl>
+
+  <h4 class="section">Returns</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd><p>解析后的值,null 表示无法解析</p>
+</dd>
+  </dl>
+
+
+
+
+
+
+
+
+
+
+
+
+</article>
+
+
+
+      </div>
+
+      <div class="affix">
+        <nav id="affix"></nav>
+      </div>
+    </main>
+
+    <div class="container-xxl search-results" id="search-results"></div>
+
+    <footer class="border-top text-secondary">
+      <div class="container-xxl">
+        <div class="flex-fill">
+          Apq.Cfg - .NET 统一配置组件库 (基于 .NET 10.0,兼容 .NET 8.0)
+        </div>
+      </div>
+    </footer>
+  </body>
+</html>

+ 284 - 0
docs/site/public/api-reference/api/Apq.Cfg.Template.TemplateEngine.html

@@ -0,0 +1,284 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8">
+      <title>Class TemplateEngine | Apq.Cfg API </title>
+      <meta name="viewport" content="width=device-width, initial-scale=1.0">
+      <meta name="title" content="Class TemplateEngine | Apq.Cfg API ">
+      
+      <meta name="description" content="模板解析引擎">
+      <link rel="icon" href="../favicon.svg">
+      <link rel="stylesheet" href="../public/docfx.min.css">
+      <link rel="stylesheet" href="../public/main.css">
+      <meta name="docfx:navrel" content="../toc.html">
+      <meta name="docfx:tocrel" content="toc.html">
+      
+      <meta name="docfx:rel" content="../">
+      
+      
+      
+      <meta name="loc:inThisArticle" content="In this article">
+      <meta name="loc:searchResultsCount" content="{count} results for &quot;{query}&quot;">
+      <meta name="loc:searchNoResults" content="No results for &quot;{query}&quot;">
+      <meta name="loc:tocFilter" content="Filter by title">
+      <meta name="loc:nextArticle" content="Next">
+      <meta name="loc:prevArticle" content="Previous">
+      <meta name="loc:themeLight" content="Light">
+      <meta name="loc:themeDark" content="Dark">
+      <meta name="loc:themeAuto" content="Auto">
+      <meta name="loc:changeTheme" content="Change theme">
+      <meta name="loc:copy" content="Copy">
+      <meta name="loc:downloadPdf" content="Download PDF">
+
+      <script type="module" src="./../public/docfx.min.js"></script>
+
+      <script>
+        const theme = localStorage.getItem('theme') || 'auto'
+        document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
+      </script>
+
+  </head>
+
+  <body class="tex2jax_ignore" data-layout="" data-yaml-mime="ManagedReference">
+    <header class="bg-body border-bottom">
+      <nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
+        <div class="container-xxl flex-nowrap">
+          <a class="navbar-brand" href="../index.html">
+            <img id="logo" class="svg" src="../images/logo-small.svg" alt="Apq.Cfg">
+            Apq.Cfg
+          </a>
+          <button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
+            <i class="bi bi-three-dots"></i>
+          </button>
+          <div class="collapse navbar-collapse" id="navpanel">
+            <div id="navbar">
+              <form class="search" role="search" id="search">
+                <i class="bi bi-search"></i>
+                <input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
+              </form>
+            </div>
+          </div>
+        </div>
+      </nav>
+    </header>
+
+    <main class="container-xxl">
+      <div class="toc-offcanvas">
+        <div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
+          <div class="offcanvas-header">
+            <h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
+            <button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
+          </div>
+          <div class="offcanvas-body">
+            <nav class="toc" id="toc"></nav>
+          </div>
+        </div>
+      </div>
+
+      <div class="content">
+        <div class="actionbar">
+          <button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
+            <i class="bi bi-list"></i>
+          </button>
+
+          <nav id="breadcrumb"></nav>
+        </div>
+
+        <article data-uid="Apq.Cfg.Template.TemplateEngine">
+
+
+
+  <h1 id="Apq_Cfg_Template_TemplateEngine" data-uid="Apq.Cfg.Template.TemplateEngine" class="text-break">
+Class TemplateEngine  
+  </h1>
+
+  <div class="facts text-secondary">
+    <dl><dt>Namespace</dt><dd><a class="xref" href="Apq.html">Apq</a>.<a class="xref" href="Apq.Cfg.html">Cfg</a>.<a class="xref" href="Apq.Cfg.Template.html">Template</a></dd></dl>
+  <dl><dt>Assembly</dt><dd>Apq.Cfg.dll</dd></dl>
+  </div>
+
+  <div class="markdown summary"><p>模板解析引擎</p>
+</div>
+  <div class="markdown conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public sealed class TemplateEngine</code></pre>
+  </div>
+
+
+
+
+  <dl class="typelist inheritance">
+    <dt>Inheritance</dt>
+    <dd>
+      <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
+      <div><span class="xref">TemplateEngine</span></div>
+    </dd>
+  </dl>
+
+
+
+  <dl class="typelist inheritedMembers">
+    <dt>Inherited Members</dt>
+    <dd>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object)</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object, object)</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object, object)</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>
+    </div>
+  </dd></dl>
+
+
+
+
+  <h2 id="Apq_Cfg_Template_TemplateEngine_remarks">Remarks</h2>
+  <div class="markdown level0 remarks"><p>负责解析配置值中的变量引用,支持嵌套解析和循环引用检测</p>
+</div>
+
+
+  <h2 class="section" id="constructors">Constructors
+</h2>
+
+
+  <a id="Apq_Cfg_Template_TemplateEngine__ctor_" data-uid="Apq.Cfg.Template.TemplateEngine.#ctor*"></a>
+
+  <h3 id="Apq_Cfg_Template_TemplateEngine__ctor_Apq_Cfg_Template_VariableResolutionOptions_" data-uid="Apq.Cfg.Template.TemplateEngine.#ctor(Apq.Cfg.Template.VariableResolutionOptions)">
+  TemplateEngine(VariableResolutionOptions?)
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>创建模板解析引擎</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public TemplateEngine(VariableResolutionOptions? options = null)</code></pre>
+  </div>
+
+  <h4 class="section">Parameters</h4>
+  <dl class="parameters">
+    <dt><code>options</code> <a class="xref" href="Apq.Cfg.Template.VariableResolutionOptions.html">VariableResolutionOptions</a></dt>
+    <dd><p>解析选项,为 null 时使用默认选项</p>
+</dd>
+  </dl>
+
+
+
+
+
+
+
+
+
+
+
+
+  <h2 class="section" id="methods">Methods
+</h2>
+
+
+  <a id="Apq_Cfg_Template_TemplateEngine_ClearCache_" data-uid="Apq.Cfg.Template.TemplateEngine.ClearCache*"></a>
+
+  <h3 id="Apq_Cfg_Template_TemplateEngine_ClearCache" data-uid="Apq.Cfg.Template.TemplateEngine.ClearCache">
+  ClearCache()
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>清除解析缓存</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public void ClearCache()</code></pre>
+  </div>
+
+
+
+
+
+
+
+
+
+
+
+
+
+  <a id="Apq_Cfg_Template_TemplateEngine_Resolve_" data-uid="Apq.Cfg.Template.TemplateEngine.Resolve*"></a>
+
+  <h3 id="Apq_Cfg_Template_TemplateEngine_Resolve_System_String_Apq_Cfg_ICfgRoot_" data-uid="Apq.Cfg.Template.TemplateEngine.Resolve(System.String,Apq.Cfg.ICfgRoot)">
+  Resolve(string?, ICfgRoot)
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>解析模板字符串中的所有变量</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public string? Resolve(string? template, ICfgRoot cfg)</code></pre>
+  </div>
+
+  <h4 class="section">Parameters</h4>
+  <dl class="parameters">
+    <dt><code>template</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd><p>模板字符串</p>
+</dd>
+    <dt><code>cfg</code> <a class="xref" href="Apq.Cfg.ICfgRoot.html">ICfgRoot</a></dt>
+    <dd><p>配置根</p>
+</dd>
+  </dl>
+
+  <h4 class="section">Returns</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd><p>解析后的字符串</p>
+</dd>
+  </dl>
+
+
+
+
+
+
+
+
+
+
+
+
+</article>
+
+
+
+      </div>
+
+      <div class="affix">
+        <nav id="affix"></nav>
+      </div>
+    </main>
+
+    <div class="container-xxl search-results" id="search-results"></div>
+
+    <footer class="border-top text-secondary">
+      <div class="container-xxl">
+        <div class="flex-fill">
+          Apq.Cfg - .NET 统一配置组件库 (基于 .NET 10.0,兼容 .NET 8.0)
+        </div>
+      </div>
+    </footer>
+  </body>
+</html>

+ 157 - 0
docs/site/public/api-reference/api/Apq.Cfg.Template.UnresolvedVariableBehavior.html

@@ -0,0 +1,157 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8">
+      <title>Enum UnresolvedVariableBehavior | Apq.Cfg API </title>
+      <meta name="viewport" content="width=device-width, initial-scale=1.0">
+      <meta name="title" content="Enum UnresolvedVariableBehavior | Apq.Cfg API ">
+      
+      <meta name="description" content="未解析变量的处理方式">
+      <link rel="icon" href="../favicon.svg">
+      <link rel="stylesheet" href="../public/docfx.min.css">
+      <link rel="stylesheet" href="../public/main.css">
+      <meta name="docfx:navrel" content="../toc.html">
+      <meta name="docfx:tocrel" content="toc.html">
+      
+      <meta name="docfx:rel" content="../">
+      
+      
+      
+      <meta name="loc:inThisArticle" content="In this article">
+      <meta name="loc:searchResultsCount" content="{count} results for &quot;{query}&quot;">
+      <meta name="loc:searchNoResults" content="No results for &quot;{query}&quot;">
+      <meta name="loc:tocFilter" content="Filter by title">
+      <meta name="loc:nextArticle" content="Next">
+      <meta name="loc:prevArticle" content="Previous">
+      <meta name="loc:themeLight" content="Light">
+      <meta name="loc:themeDark" content="Dark">
+      <meta name="loc:themeAuto" content="Auto">
+      <meta name="loc:changeTheme" content="Change theme">
+      <meta name="loc:copy" content="Copy">
+      <meta name="loc:downloadPdf" content="Download PDF">
+
+      <script type="module" src="./../public/docfx.min.js"></script>
+
+      <script>
+        const theme = localStorage.getItem('theme') || 'auto'
+        document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
+      </script>
+
+  </head>
+
+  <body class="tex2jax_ignore" data-layout="" data-yaml-mime="ManagedReference">
+    <header class="bg-body border-bottom">
+      <nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
+        <div class="container-xxl flex-nowrap">
+          <a class="navbar-brand" href="../index.html">
+            <img id="logo" class="svg" src="../images/logo-small.svg" alt="Apq.Cfg">
+            Apq.Cfg
+          </a>
+          <button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
+            <i class="bi bi-three-dots"></i>
+          </button>
+          <div class="collapse navbar-collapse" id="navpanel">
+            <div id="navbar">
+              <form class="search" role="search" id="search">
+                <i class="bi bi-search"></i>
+                <input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
+              </form>
+            </div>
+          </div>
+        </div>
+      </nav>
+    </header>
+
+    <main class="container-xxl">
+      <div class="toc-offcanvas">
+        <div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
+          <div class="offcanvas-header">
+            <h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
+            <button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
+          </div>
+          <div class="offcanvas-body">
+            <nav class="toc" id="toc"></nav>
+          </div>
+        </div>
+      </div>
+
+      <div class="content">
+        <div class="actionbar">
+          <button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
+            <i class="bi bi-list"></i>
+          </button>
+
+          <nav id="breadcrumb"></nav>
+        </div>
+
+        <article data-uid="Apq.Cfg.Template.UnresolvedVariableBehavior">
+
+
+
+
+  <h1 id="Apq_Cfg_Template_UnresolvedVariableBehavior" data-uid="Apq.Cfg.Template.UnresolvedVariableBehavior" class="text-break">
+Enum UnresolvedVariableBehavior  
+  </h1>
+
+  <div class="facts text-secondary">
+    <dl><dt>Namespace</dt><dd><a class="xref" href="Apq.html">Apq</a>.<a class="xref" href="Apq.Cfg.html">Cfg</a>.<a class="xref" href="Apq.Cfg.Template.html">Template</a></dd></dl>
+  <dl><dt>Assembly</dt><dd>Apq.Cfg.dll</dd></dl>
+  </div>
+
+  <div class="markdown summary"><p>未解析变量的处理方式</p>
+</div>
+  <div class="markdown conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public enum UnresolvedVariableBehavior</code></pre>
+  </div>
+
+
+
+
+
+
+
+
+
+  <h2 id="fields">Fields
+</h2>
+  <dl class="parameters">
+    <dt id="Apq_Cfg_Template_UnresolvedVariableBehavior_Empty"><code>Empty = 1</code></dt>
+  
+  <dd><p>替换为空字符串</p>
+</dd>
+    <dt id="Apq_Cfg_Template_UnresolvedVariableBehavior_Keep"><code>Keep = 0</code></dt>
+  
+  <dd><p>保留原始变量表达式</p>
+</dd>
+    <dt id="Apq_Cfg_Template_UnresolvedVariableBehavior_Throw"><code>Throw = 2</code></dt>
+  
+  <dd><p>抛出异常</p>
+</dd>
+  </dl>
+
+
+
+</article>
+
+
+
+      </div>
+
+      <div class="affix">
+        <nav id="affix"></nav>
+      </div>
+    </main>
+
+    <div class="container-xxl search-results" id="search-results"></div>
+
+    <footer class="border-top text-secondary">
+      <div class="container-xxl">
+        <div class="flex-fill">
+          Apq.Cfg - .NET 统一配置组件库 (基于 .NET 10.0,兼容 .NET 8.0)
+        </div>
+      </div>
+    </footer>
+  </body>
+</html>

+ 466 - 0
docs/site/public/api-reference/api/Apq.Cfg.Template.VariableResolutionOptions.html

@@ -0,0 +1,466 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8">
+      <title>Class VariableResolutionOptions | Apq.Cfg API </title>
+      <meta name="viewport" content="width=device-width, initial-scale=1.0">
+      <meta name="title" content="Class VariableResolutionOptions | Apq.Cfg API ">
+      
+      <meta name="description" content="变量解析选项">
+      <link rel="icon" href="../favicon.svg">
+      <link rel="stylesheet" href="../public/docfx.min.css">
+      <link rel="stylesheet" href="../public/main.css">
+      <meta name="docfx:navrel" content="../toc.html">
+      <meta name="docfx:tocrel" content="toc.html">
+      
+      <meta name="docfx:rel" content="../">
+      
+      
+      
+      <meta name="loc:inThisArticle" content="In this article">
+      <meta name="loc:searchResultsCount" content="{count} results for &quot;{query}&quot;">
+      <meta name="loc:searchNoResults" content="No results for &quot;{query}&quot;">
+      <meta name="loc:tocFilter" content="Filter by title">
+      <meta name="loc:nextArticle" content="Next">
+      <meta name="loc:prevArticle" content="Previous">
+      <meta name="loc:themeLight" content="Light">
+      <meta name="loc:themeDark" content="Dark">
+      <meta name="loc:themeAuto" content="Auto">
+      <meta name="loc:changeTheme" content="Change theme">
+      <meta name="loc:copy" content="Copy">
+      <meta name="loc:downloadPdf" content="Download PDF">
+
+      <script type="module" src="./../public/docfx.min.js"></script>
+
+      <script>
+        const theme = localStorage.getItem('theme') || 'auto'
+        document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
+      </script>
+
+  </head>
+
+  <body class="tex2jax_ignore" data-layout="" data-yaml-mime="ManagedReference">
+    <header class="bg-body border-bottom">
+      <nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
+        <div class="container-xxl flex-nowrap">
+          <a class="navbar-brand" href="../index.html">
+            <img id="logo" class="svg" src="../images/logo-small.svg" alt="Apq.Cfg">
+            Apq.Cfg
+          </a>
+          <button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
+            <i class="bi bi-three-dots"></i>
+          </button>
+          <div class="collapse navbar-collapse" id="navpanel">
+            <div id="navbar">
+              <form class="search" role="search" id="search">
+                <i class="bi bi-search"></i>
+                <input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
+              </form>
+            </div>
+          </div>
+        </div>
+      </nav>
+    </header>
+
+    <main class="container-xxl">
+      <div class="toc-offcanvas">
+        <div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
+          <div class="offcanvas-header">
+            <h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
+            <button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
+          </div>
+          <div class="offcanvas-body">
+            <nav class="toc" id="toc"></nav>
+          </div>
+        </div>
+      </div>
+
+      <div class="content">
+        <div class="actionbar">
+          <button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
+            <i class="bi bi-list"></i>
+          </button>
+
+          <nav id="breadcrumb"></nav>
+        </div>
+
+        <article data-uid="Apq.Cfg.Template.VariableResolutionOptions">
+
+
+
+  <h1 id="Apq_Cfg_Template_VariableResolutionOptions" data-uid="Apq.Cfg.Template.VariableResolutionOptions" class="text-break">
+Class VariableResolutionOptions  
+  </h1>
+
+  <div class="facts text-secondary">
+    <dl><dt>Namespace</dt><dd><a class="xref" href="Apq.html">Apq</a>.<a class="xref" href="Apq.Cfg.html">Cfg</a>.<a class="xref" href="Apq.Cfg.Template.html">Template</a></dd></dl>
+  <dl><dt>Assembly</dt><dd>Apq.Cfg.dll</dd></dl>
+  </div>
+
+  <div class="markdown summary"><p>变量解析选项</p>
+</div>
+  <div class="markdown conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public sealed class VariableResolutionOptions</code></pre>
+  </div>
+
+
+
+
+  <dl class="typelist inheritance">
+    <dt>Inheritance</dt>
+    <dd>
+      <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
+      <div><span class="xref">VariableResolutionOptions</span></div>
+    </dd>
+  </dl>
+
+
+
+  <dl class="typelist inheritedMembers">
+    <dt>Inherited Members</dt>
+    <dd>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object)</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object, object)</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object, object)</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>
+    </div>
+  </dd></dl>
+
+
+
+
+
+
+  <h2 class="section" id="properties">Properties
+</h2>
+
+
+  <a id="Apq_Cfg_Template_VariableResolutionOptions_CacheResults_" data-uid="Apq.Cfg.Template.VariableResolutionOptions.CacheResults*"></a>
+
+  <h3 id="Apq_Cfg_Template_VariableResolutionOptions_CacheResults" data-uid="Apq.Cfg.Template.VariableResolutionOptions.CacheResults">
+  CacheResults
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>是否缓存解析结果</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public bool CacheResults { get; set; }</code></pre>
+  </div>
+
+
+
+
+
+  <h4 class="section">Property Value</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
+    <dd></dd>
+  </dl>
+
+
+
+
+
+
+
+
+  <a id="Apq_Cfg_Template_VariableResolutionOptions_Default_" data-uid="Apq.Cfg.Template.VariableResolutionOptions.Default*"></a>
+
+  <h3 id="Apq_Cfg_Template_VariableResolutionOptions_Default" data-uid="Apq.Cfg.Template.VariableResolutionOptions.Default">
+  Default
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>创建默认选项(包含所有内置解析器)</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public static VariableResolutionOptions Default { get; }</code></pre>
+  </div>
+
+
+
+
+
+  <h4 class="section">Property Value</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="Apq.Cfg.Template.VariableResolutionOptions.html">VariableResolutionOptions</a></dt>
+    <dd></dd>
+  </dl>
+
+
+
+
+
+
+
+
+  <a id="Apq_Cfg_Template_VariableResolutionOptions_InvalidateCacheOnChange_" data-uid="Apq.Cfg.Template.VariableResolutionOptions.InvalidateCacheOnChange*"></a>
+
+  <h3 id="Apq_Cfg_Template_VariableResolutionOptions_InvalidateCacheOnChange" data-uid="Apq.Cfg.Template.VariableResolutionOptions.InvalidateCacheOnChange">
+  InvalidateCacheOnChange
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>配置变更时是否清除缓存</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public bool InvalidateCacheOnChange { get; set; }</code></pre>
+  </div>
+
+
+
+
+
+  <h4 class="section">Property Value</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
+    <dd></dd>
+  </dl>
+
+
+
+
+
+
+
+
+  <a id="Apq_Cfg_Template_VariableResolutionOptions_MaxRecursionDepth_" data-uid="Apq.Cfg.Template.VariableResolutionOptions.MaxRecursionDepth*"></a>
+
+  <h3 id="Apq_Cfg_Template_VariableResolutionOptions_MaxRecursionDepth" data-uid="Apq.Cfg.Template.VariableResolutionOptions.MaxRecursionDepth">
+  MaxRecursionDepth
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>防止过深嵌套或潜在的无限递归</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public int MaxRecursionDepth { get; set; }</code></pre>
+  </div>
+
+
+
+
+
+  <h4 class="section">Property Value</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
+    <dd></dd>
+  </dl>
+
+
+
+
+
+
+
+
+  <a id="Apq_Cfg_Template_VariableResolutionOptions_PrefixSeparator_" data-uid="Apq.Cfg.Template.VariableResolutionOptions.PrefixSeparator*"></a>
+
+  <h3 id="Apq_Cfg_Template_VariableResolutionOptions_PrefixSeparator" data-uid="Apq.Cfg.Template.VariableResolutionOptions.PrefixSeparator">
+  PrefixSeparator
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>前缀分隔符,默认 &quot;:&quot;</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public string PrefixSeparator { get; set; }</code></pre>
+  </div>
+
+
+
+
+
+  <h4 class="section">Property Value</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd></dd>
+  </dl>
+
+
+
+
+  <h4 class="section" id="Apq_Cfg_Template_VariableResolutionOptions_PrefixSeparator_remarks">Remarks</h4>
+  <div class="markdown level1 remarks"><p>用于分隔解析器前缀和变量名,如 ${ENV:PATH} 中的 &quot;:&quot;</p>
+</div>
+
+
+
+
+  <a id="Apq_Cfg_Template_VariableResolutionOptions_Resolvers_" data-uid="Apq.Cfg.Template.VariableResolutionOptions.Resolvers*"></a>
+
+  <h3 id="Apq_Cfg_Template_VariableResolutionOptions_Resolvers" data-uid="Apq.Cfg.Template.VariableResolutionOptions.Resolvers">
+  Resolvers
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>自定义解析器列表</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public IList&lt;IVariableResolver&gt; Resolvers { get; }</code></pre>
+  </div>
+
+
+
+
+
+  <h4 class="section">Property Value</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ilist-1">IList</a>&lt;<a class="xref" href="Apq.Cfg.Template.IVariableResolver.html">IVariableResolver</a>&gt;</dt>
+    <dd></dd>
+  </dl>
+
+
+
+
+
+
+
+
+  <a id="Apq_Cfg_Template_VariableResolutionOptions_UnresolvedBehavior_" data-uid="Apq.Cfg.Template.VariableResolutionOptions.UnresolvedBehavior*"></a>
+
+  <h3 id="Apq_Cfg_Template_VariableResolutionOptions_UnresolvedBehavior" data-uid="Apq.Cfg.Template.VariableResolutionOptions.UnresolvedBehavior">
+  UnresolvedBehavior
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>未解析变量的处理方式</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public UnresolvedVariableBehavior UnresolvedBehavior { get; set; }</code></pre>
+  </div>
+
+
+
+
+
+  <h4 class="section">Property Value</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="Apq.Cfg.Template.UnresolvedVariableBehavior.html">UnresolvedVariableBehavior</a></dt>
+    <dd></dd>
+  </dl>
+
+
+
+
+
+
+
+
+  <a id="Apq_Cfg_Template_VariableResolutionOptions_VariablePrefix_" data-uid="Apq.Cfg.Template.VariableResolutionOptions.VariablePrefix*"></a>
+
+  <h3 id="Apq_Cfg_Template_VariableResolutionOptions_VariablePrefix" data-uid="Apq.Cfg.Template.VariableResolutionOptions.VariablePrefix">
+  VariablePrefix
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>变量前缀,默认 &quot;${&quot;</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public string VariablePrefix { get; set; }</code></pre>
+  </div>
+
+
+
+
+
+  <h4 class="section">Property Value</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd></dd>
+  </dl>
+
+
+
+
+
+
+
+
+  <a id="Apq_Cfg_Template_VariableResolutionOptions_VariableSuffix_" data-uid="Apq.Cfg.Template.VariableResolutionOptions.VariableSuffix*"></a>
+
+  <h3 id="Apq_Cfg_Template_VariableResolutionOptions_VariableSuffix" data-uid="Apq.Cfg.Template.VariableResolutionOptions.VariableSuffix">
+  VariableSuffix
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>变量后缀,默认 &quot;}&quot;</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public string VariableSuffix { get; set; }</code></pre>
+  </div>
+
+
+
+
+
+  <h4 class="section">Property Value</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd></dd>
+  </dl>
+
+
+
+
+
+
+
+
+
+</article>
+
+
+
+      </div>
+
+      <div class="affix">
+        <nav id="affix"></nav>
+      </div>
+    </main>
+
+    <div class="container-xxl search-results" id="search-results"></div>
+
+    <footer class="border-top text-secondary">
+      <div class="container-xxl">
+        <div class="flex-fill">
+          Apq.Cfg - .NET 统一配置组件库 (基于 .NET 10.0,兼容 .NET 8.0)
+        </div>
+      </div>
+    </footer>
+  </body>
+</html>

+ 315 - 0
docs/site/public/api-reference/api/Apq.Cfg.Template.VariableResolvers.html

@@ -0,0 +1,315 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8">
+      <title>Class VariableResolvers | Apq.Cfg API </title>
+      <meta name="viewport" content="width=device-width, initial-scale=1.0">
+      <meta name="title" content="Class VariableResolvers | Apq.Cfg API ">
+      
+      <meta name="description" content="内置变量解析器">
+      <link rel="icon" href="../favicon.svg">
+      <link rel="stylesheet" href="../public/docfx.min.css">
+      <link rel="stylesheet" href="../public/main.css">
+      <meta name="docfx:navrel" content="../toc.html">
+      <meta name="docfx:tocrel" content="toc.html">
+      
+      <meta name="docfx:rel" content="../">
+      
+      
+      
+      <meta name="loc:inThisArticle" content="In this article">
+      <meta name="loc:searchResultsCount" content="{count} results for &quot;{query}&quot;">
+      <meta name="loc:searchNoResults" content="No results for &quot;{query}&quot;">
+      <meta name="loc:tocFilter" content="Filter by title">
+      <meta name="loc:nextArticle" content="Next">
+      <meta name="loc:prevArticle" content="Previous">
+      <meta name="loc:themeLight" content="Light">
+      <meta name="loc:themeDark" content="Dark">
+      <meta name="loc:themeAuto" content="Auto">
+      <meta name="loc:changeTheme" content="Change theme">
+      <meta name="loc:copy" content="Copy">
+      <meta name="loc:downloadPdf" content="Download PDF">
+
+      <script type="module" src="./../public/docfx.min.js"></script>
+
+      <script>
+        const theme = localStorage.getItem('theme') || 'auto'
+        document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
+      </script>
+
+  </head>
+
+  <body class="tex2jax_ignore" data-layout="" data-yaml-mime="ManagedReference">
+    <header class="bg-body border-bottom">
+      <nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
+        <div class="container-xxl flex-nowrap">
+          <a class="navbar-brand" href="../index.html">
+            <img id="logo" class="svg" src="../images/logo-small.svg" alt="Apq.Cfg">
+            Apq.Cfg
+          </a>
+          <button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
+            <i class="bi bi-three-dots"></i>
+          </button>
+          <div class="collapse navbar-collapse" id="navpanel">
+            <div id="navbar">
+              <form class="search" role="search" id="search">
+                <i class="bi bi-search"></i>
+                <input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
+              </form>
+            </div>
+          </div>
+        </div>
+      </nav>
+    </header>
+
+    <main class="container-xxl">
+      <div class="toc-offcanvas">
+        <div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
+          <div class="offcanvas-header">
+            <h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
+            <button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
+          </div>
+          <div class="offcanvas-body">
+            <nav class="toc" id="toc"></nav>
+          </div>
+        </div>
+      </div>
+
+      <div class="content">
+        <div class="actionbar">
+          <button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
+            <i class="bi bi-list"></i>
+          </button>
+
+          <nav id="breadcrumb"></nav>
+        </div>
+
+        <article data-uid="Apq.Cfg.Template.VariableResolvers">
+
+
+
+  <h1 id="Apq_Cfg_Template_VariableResolvers" data-uid="Apq.Cfg.Template.VariableResolvers" class="text-break">
+Class VariableResolvers  
+  </h1>
+
+  <div class="facts text-secondary">
+    <dl><dt>Namespace</dt><dd><a class="xref" href="Apq.html">Apq</a>.<a class="xref" href="Apq.Cfg.html">Cfg</a>.<a class="xref" href="Apq.Cfg.Template.html">Template</a></dd></dl>
+  <dl><dt>Assembly</dt><dd>Apq.Cfg.dll</dd></dl>
+  </div>
+
+  <div class="markdown summary"><p>内置变量解析器</p>
+</div>
+  <div class="markdown conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public static class VariableResolvers</code></pre>
+  </div>
+
+
+
+
+  <dl class="typelist inheritance">
+    <dt>Inheritance</dt>
+    <dd>
+      <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
+      <div><span class="xref">VariableResolvers</span></div>
+    </dd>
+  </dl>
+
+
+
+  <dl class="typelist inheritedMembers">
+    <dt>Inherited Members</dt>
+    <dd>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object)</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object, object)</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone">object.MemberwiseClone()</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object, object)</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>
+    </div>
+  </dd></dl>
+
+
+
+
+
+
+  <h2 class="section" id="properties">Properties
+</h2>
+
+
+  <a id="Apq_Cfg_Template_VariableResolvers_All_" data-uid="Apq.Cfg.Template.VariableResolvers.All*"></a>
+
+  <h3 id="Apq_Cfg_Template_VariableResolvers_All" data-uid="Apq.Cfg.Template.VariableResolvers.All">
+  All
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>获取所有内置解析器</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public static IEnumerable&lt;IVariableResolver&gt; All { get; }</code></pre>
+  </div>
+
+
+
+
+
+  <h4 class="section">Property Value</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1">IEnumerable</a>&lt;<a class="xref" href="Apq.Cfg.Template.IVariableResolver.html">IVariableResolver</a>&gt;</dt>
+    <dd></dd>
+  </dl>
+
+
+
+
+
+
+
+
+  <a id="Apq_Cfg_Template_VariableResolvers_Config_" data-uid="Apq.Cfg.Template.VariableResolvers.Config*"></a>
+
+  <h3 id="Apq_Cfg_Template_VariableResolvers_Config" data-uid="Apq.Cfg.Template.VariableResolvers.Config">
+  Config
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>配置引用解析器(默认)</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public static IVariableResolver Config { get; }</code></pre>
+  </div>
+
+
+
+
+
+  <h4 class="section">Property Value</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="Apq.Cfg.Template.IVariableResolver.html">IVariableResolver</a></dt>
+    <dd></dd>
+  </dl>
+
+
+
+
+  <h4 class="section" id="Apq_Cfg_Template_VariableResolvers_Config_remarks">Remarks</h4>
+  <div class="markdown level1 remarks"><p>解析对其他配置键的引用,如 ${App:Name}</p>
+</div>
+
+
+
+
+  <a id="Apq_Cfg_Template_VariableResolvers_Environment_" data-uid="Apq.Cfg.Template.VariableResolvers.Environment*"></a>
+
+  <h3 id="Apq_Cfg_Template_VariableResolvers_Environment" data-uid="Apq.Cfg.Template.VariableResolvers.Environment">
+  Environment
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>环境变量解析器</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public static IVariableResolver Environment { get; }</code></pre>
+  </div>
+
+
+
+
+
+  <h4 class="section">Property Value</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="Apq.Cfg.Template.IVariableResolver.html">IVariableResolver</a></dt>
+    <dd></dd>
+  </dl>
+
+
+
+
+  <h4 class="section" id="Apq_Cfg_Template_VariableResolvers_Environment_remarks">Remarks</h4>
+  <div class="markdown level1 remarks"><p>解析环境变量引用,如 <span class="math">\({ENV:PATH}、\)</span>{ENV:APPDATA}</p>
+</div>
+
+
+
+
+  <a id="Apq_Cfg_Template_VariableResolvers_System_" data-uid="Apq.Cfg.Template.VariableResolvers.System*"></a>
+
+  <h3 id="Apq_Cfg_Template_VariableResolvers_System" data-uid="Apq.Cfg.Template.VariableResolvers.System">
+  System
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>系统属性解析器</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public static IVariableResolver System { get; }</code></pre>
+  </div>
+
+
+
+
+
+  <h4 class="section">Property Value</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="Apq.Cfg.Template.IVariableResolver.html">IVariableResolver</a></dt>
+    <dd></dd>
+  </dl>
+
+
+
+
+  <h4 class="section" id="Apq_Cfg_Template_VariableResolvers_System_remarks">Remarks</h4>
+  <div class="markdown level1 remarks"><p>解析系统属性引用,如 <span class="math">\({SYS:MachineName}、\)</span>{SYS:UserName}</p>
+</div>
+
+
+
+
+
+</article>
+
+
+
+      </div>
+
+      <div class="affix">
+        <nav id="affix"></nav>
+      </div>
+    </main>
+
+    <div class="container-xxl search-results" id="search-results"></div>
+
+    <footer class="border-top text-secondary">
+      <div class="container-xxl">
+        <div class="flex-fill">
+          Apq.Cfg - .NET 统一配置组件库 (基于 .NET 10.0,兼容 .NET 8.0)
+        </div>
+      </div>
+    </footer>
+  </body>
+</html>

+ 151 - 0
docs/site/public/api-reference/api/Apq.Cfg.Template.html

@@ -0,0 +1,151 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8">
+      <title>Namespace Apq.Cfg.Template | Apq.Cfg API </title>
+      <meta name="viewport" content="width=device-width, initial-scale=1.0">
+      <meta name="title" content="Namespace Apq.Cfg.Template | Apq.Cfg API ">
+      
+      
+      <link rel="icon" href="../favicon.svg">
+      <link rel="stylesheet" href="../public/docfx.min.css">
+      <link rel="stylesheet" href="../public/main.css">
+      <meta name="docfx:navrel" content="../toc.html">
+      <meta name="docfx:tocrel" content="toc.html">
+      
+      <meta name="docfx:rel" content="../">
+      
+      
+      
+      <meta name="loc:inThisArticle" content="In this article">
+      <meta name="loc:searchResultsCount" content="{count} results for &quot;{query}&quot;">
+      <meta name="loc:searchNoResults" content="No results for &quot;{query}&quot;">
+      <meta name="loc:tocFilter" content="Filter by title">
+      <meta name="loc:nextArticle" content="Next">
+      <meta name="loc:prevArticle" content="Previous">
+      <meta name="loc:themeLight" content="Light">
+      <meta name="loc:themeDark" content="Dark">
+      <meta name="loc:themeAuto" content="Auto">
+      <meta name="loc:changeTheme" content="Change theme">
+      <meta name="loc:copy" content="Copy">
+      <meta name="loc:downloadPdf" content="Download PDF">
+
+      <script type="module" src="./../public/docfx.min.js"></script>
+
+      <script>
+        const theme = localStorage.getItem('theme') || 'auto'
+        document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
+      </script>
+
+  </head>
+
+  <body class="tex2jax_ignore" data-layout="" data-yaml-mime="ManagedReference">
+    <header class="bg-body border-bottom">
+      <nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
+        <div class="container-xxl flex-nowrap">
+          <a class="navbar-brand" href="../index.html">
+            <img id="logo" class="svg" src="../images/logo-small.svg" alt="Apq.Cfg">
+            Apq.Cfg
+          </a>
+          <button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
+            <i class="bi bi-three-dots"></i>
+          </button>
+          <div class="collapse navbar-collapse" id="navpanel">
+            <div id="navbar">
+              <form class="search" role="search" id="search">
+                <i class="bi bi-search"></i>
+                <input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
+              </form>
+            </div>
+          </div>
+        </div>
+      </nav>
+    </header>
+
+    <main class="container-xxl">
+      <div class="toc-offcanvas">
+        <div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
+          <div class="offcanvas-header">
+            <h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
+            <button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
+          </div>
+          <div class="offcanvas-body">
+            <nav class="toc" id="toc"></nav>
+          </div>
+        </div>
+      </div>
+
+      <div class="content">
+        <div class="actionbar">
+          <button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
+            <i class="bi bi-list"></i>
+          </button>
+
+          <nav id="breadcrumb"></nav>
+        </div>
+
+        <article data-uid="Apq.Cfg.Template">
+
+  <h1 id="Apq_Cfg_Template" data-uid="Apq.Cfg.Template" class="text-break">Namespace Apq.Cfg.Template</h1>
+  <div class="markdown level0 summary"></div>
+  <div class="markdown level0 conceptual"></div>
+  <div class="markdown level0 remarks"></div>
+
+    <h3 id="classes">
+Classes
+</h3>
+    <dl class="jumplist">
+      <dt><a class="xref" href="Apq.Cfg.Template.TemplateEngine.html">TemplateEngine</a></dt>
+      <dd><p>模板解析引擎</p>
+</dd>
+    </dl>
+    <dl class="jumplist">
+      <dt><a class="xref" href="Apq.Cfg.Template.VariableResolutionOptions.html">VariableResolutionOptions</a></dt>
+      <dd><p>变量解析选项</p>
+</dd>
+    </dl>
+    <dl class="jumplist">
+      <dt><a class="xref" href="Apq.Cfg.Template.VariableResolvers.html">VariableResolvers</a></dt>
+      <dd><p>内置变量解析器</p>
+</dd>
+    </dl>
+    <h3 id="interfaces">
+Interfaces
+</h3>
+    <dl class="jumplist">
+      <dt><a class="xref" href="Apq.Cfg.Template.IVariableResolver.html">IVariableResolver</a></dt>
+      <dd><p>变量解析器接口</p>
+</dd>
+    </dl>
+    <h3 id="enums">
+Enums
+</h3>
+    <dl class="jumplist">
+      <dt><a class="xref" href="Apq.Cfg.Template.UnresolvedVariableBehavior.html">UnresolvedVariableBehavior</a></dt>
+      <dd><p>未解析变量的处理方式</p>
+</dd>
+    </dl>
+
+
+</article>
+
+
+
+      </div>
+
+      <div class="affix">
+        <nav id="affix"></nav>
+      </div>
+    </main>
+
+    <div class="container-xxl search-results" id="search-results"></div>
+
+    <footer class="border-top text-secondary">
+      <div class="container-xxl">
+        <div class="flex-fill">
+          Apq.Cfg - .NET 统一配置组件库 (基于 .NET 10.0,兼容 .NET 8.0)
+        </div>
+      </div>
+    </footer>
+  </body>
+</html>

+ 547 - 0
docs/site/public/api-reference/api/Apq.Cfg.TemplateExtensions.html

@@ -0,0 +1,547 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8">
+      <title>Class TemplateExtensions | Apq.Cfg API </title>
+      <meta name="viewport" content="width=device-width, initial-scale=1.0">
+      <meta name="title" content="Class TemplateExtensions | Apq.Cfg API ">
+      
+      <meta name="description" content="配置模板扩展方法">
+      <link rel="icon" href="../favicon.svg">
+      <link rel="stylesheet" href="../public/docfx.min.css">
+      <link rel="stylesheet" href="../public/main.css">
+      <meta name="docfx:navrel" content="../toc.html">
+      <meta name="docfx:tocrel" content="toc.html">
+      
+      <meta name="docfx:rel" content="../">
+      
+      
+      
+      <meta name="loc:inThisArticle" content="In this article">
+      <meta name="loc:searchResultsCount" content="{count} results for &quot;{query}&quot;">
+      <meta name="loc:searchNoResults" content="No results for &quot;{query}&quot;">
+      <meta name="loc:tocFilter" content="Filter by title">
+      <meta name="loc:nextArticle" content="Next">
+      <meta name="loc:prevArticle" content="Previous">
+      <meta name="loc:themeLight" content="Light">
+      <meta name="loc:themeDark" content="Dark">
+      <meta name="loc:themeAuto" content="Auto">
+      <meta name="loc:changeTheme" content="Change theme">
+      <meta name="loc:copy" content="Copy">
+      <meta name="loc:downloadPdf" content="Download PDF">
+
+      <script type="module" src="./../public/docfx.min.js"></script>
+
+      <script>
+        const theme = localStorage.getItem('theme') || 'auto'
+        document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
+      </script>
+
+  </head>
+
+  <body class="tex2jax_ignore" data-layout="" data-yaml-mime="ManagedReference">
+    <header class="bg-body border-bottom">
+      <nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
+        <div class="container-xxl flex-nowrap">
+          <a class="navbar-brand" href="../index.html">
+            <img id="logo" class="svg" src="../images/logo-small.svg" alt="Apq.Cfg">
+            Apq.Cfg
+          </a>
+          <button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
+            <i class="bi bi-three-dots"></i>
+          </button>
+          <div class="collapse navbar-collapse" id="navpanel">
+            <div id="navbar">
+              <form class="search" role="search" id="search">
+                <i class="bi bi-search"></i>
+                <input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
+              </form>
+            </div>
+          </div>
+        </div>
+      </nav>
+    </header>
+
+    <main class="container-xxl">
+      <div class="toc-offcanvas">
+        <div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
+          <div class="offcanvas-header">
+            <h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
+            <button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
+          </div>
+          <div class="offcanvas-body">
+            <nav class="toc" id="toc"></nav>
+          </div>
+        </div>
+      </div>
+
+      <div class="content">
+        <div class="actionbar">
+          <button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
+            <i class="bi bi-list"></i>
+          </button>
+
+          <nav id="breadcrumb"></nav>
+        </div>
+
+        <article data-uid="Apq.Cfg.TemplateExtensions">
+
+
+
+  <h1 id="Apq_Cfg_TemplateExtensions" data-uid="Apq.Cfg.TemplateExtensions" class="text-break">
+Class TemplateExtensions  
+  </h1>
+
+  <div class="facts text-secondary">
+    <dl><dt>Namespace</dt><dd><a class="xref" href="Apq.html">Apq</a>.<a class="xref" href="Apq.Cfg.html">Cfg</a></dd></dl>
+  <dl><dt>Assembly</dt><dd>Apq.Cfg.dll</dd></dl>
+  </div>
+
+  <div class="markdown summary"><p>配置模板扩展方法</p>
+</div>
+  <div class="markdown conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public static class TemplateExtensions</code></pre>
+  </div>
+
+
+
+
+  <dl class="typelist inheritance">
+    <dt>Inheritance</dt>
+    <dd>
+      <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
+      <div><span class="xref">TemplateExtensions</span></div>
+    </dd>
+  </dl>
+
+
+
+  <dl class="typelist inheritedMembers">
+    <dt>Inherited Members</dt>
+    <dd>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object)</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object, object)</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone">object.MemberwiseClone()</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object, object)</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>
+    </div>
+  </dd></dl>
+
+
+
+
+
+
+  <h2 class="section" id="methods">Methods
+</h2>
+
+
+  <a id="Apq_Cfg_TemplateExtensions_GetManyResolved_" data-uid="Apq.Cfg.TemplateExtensions.GetManyResolved*"></a>
+
+  <h3 id="Apq_Cfg_TemplateExtensions_GetManyResolved_Apq_Cfg_ICfgRoot_System_Collections_Generic_IEnumerable_System_String__" data-uid="Apq.Cfg.TemplateExtensions.GetManyResolved(Apq.Cfg.ICfgRoot,System.Collections.Generic.IEnumerable{System.String})">
+  GetManyResolved(ICfgRoot, IEnumerable&lt;string&gt;)
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>批量获取解析变量后的配置值</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public static IReadOnlyDictionary&lt;string, string?&gt; GetManyResolved(this ICfgRoot cfg, IEnumerable&lt;string&gt; keys)</code></pre>
+  </div>
+
+  <h4 class="section">Parameters</h4>
+  <dl class="parameters">
+    <dt><code>cfg</code> <a class="xref" href="Apq.Cfg.ICfgRoot.html">ICfgRoot</a></dt>
+    <dd><p>配置根</p>
+</dd>
+    <dt><code>keys</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1">IEnumerable</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a>&gt;</dt>
+    <dd><p>配置键列表</p>
+</dd>
+  </dl>
+
+  <h4 class="section">Returns</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ireadonlydictionary-2">IReadOnlyDictionary</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a>, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a>&gt;</dt>
+    <dd><p>解析后的键值对字典</p>
+</dd>
+  </dl>
+
+
+
+
+
+
+
+
+
+
+
+  <a id="Apq_Cfg_TemplateExtensions_GetResolved_" data-uid="Apq.Cfg.TemplateExtensions.GetResolved*"></a>
+
+  <h3 id="Apq_Cfg_TemplateExtensions_GetResolved_Apq_Cfg_ICfgRoot_System_String_" data-uid="Apq.Cfg.TemplateExtensions.GetResolved(Apq.Cfg.ICfgRoot,System.String)">
+  GetResolved(ICfgRoot, string)
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>获取解析变量后的配置值</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public static string? GetResolved(this ICfgRoot cfg, string key)</code></pre>
+  </div>
+
+  <h4 class="section">Parameters</h4>
+  <dl class="parameters">
+    <dt><code>cfg</code> <a class="xref" href="Apq.Cfg.ICfgRoot.html">ICfgRoot</a></dt>
+    <dd><p>配置根</p>
+</dd>
+    <dt><code>key</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd><p>配置键</p>
+</dd>
+  </dl>
+
+  <h4 class="section">Returns</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd><p>解析后的值</p>
+</dd>
+  </dl>
+
+
+
+
+
+
+  <h4 class="section" id="Apq_Cfg_TemplateExtensions_GetResolved_Apq_Cfg_ICfgRoot_System_String__examples">Examples</h4>
+  <pre><code class="lang-csharp">// 配置: { "App:Name": "MyApp", "App:LogPath": "${App:Name}/logs" }
+var logPath = cfg.GetResolved("App:LogPath");
+// 返回: "MyApp/logs"</code></pre>
+
+
+
+
+
+
+  <a id="Apq_Cfg_TemplateExtensions_GetResolved_" data-uid="Apq.Cfg.TemplateExtensions.GetResolved*"></a>
+
+  <h3 id="Apq_Cfg_TemplateExtensions_GetResolved_Apq_Cfg_ICfgRoot_System_String_Apq_Cfg_Template_VariableResolutionOptions_" data-uid="Apq.Cfg.TemplateExtensions.GetResolved(Apq.Cfg.ICfgRoot,System.String,Apq.Cfg.Template.VariableResolutionOptions)">
+  GetResolved(ICfgRoot, string, VariableResolutionOptions)
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>获取解析变量后的配置值</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public static string? GetResolved(this ICfgRoot cfg, string key, VariableResolutionOptions options)</code></pre>
+  </div>
+
+  <h4 class="section">Parameters</h4>
+  <dl class="parameters">
+    <dt><code>cfg</code> <a class="xref" href="Apq.Cfg.ICfgRoot.html">ICfgRoot</a></dt>
+    <dd><p>配置根</p>
+</dd>
+    <dt><code>key</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd><p>配置键</p>
+</dd>
+    <dt><code>options</code> <a class="xref" href="Apq.Cfg.Template.VariableResolutionOptions.html">VariableResolutionOptions</a></dt>
+    <dd><p>解析选项</p>
+</dd>
+  </dl>
+
+  <h4 class="section">Returns</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd><p>解析后的值</p>
+</dd>
+  </dl>
+
+
+
+
+
+
+
+
+
+
+
+  <a id="Apq_Cfg_TemplateExtensions_GetResolved_" data-uid="Apq.Cfg.TemplateExtensions.GetResolved*"></a>
+
+  <h3 id="Apq_Cfg_TemplateExtensions_GetResolved__1_Apq_Cfg_ICfgRoot_System_String_" data-uid="Apq.Cfg.TemplateExtensions.GetResolved``1(Apq.Cfg.ICfgRoot,System.String)">
+  GetResolved&lt;T&gt;(ICfgRoot, string)
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>获取解析变量后的配置值,并转换为指定类型</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public static T? GetResolved&lt;T&gt;(this ICfgRoot cfg, string key)</code></pre>
+  </div>
+
+  <h4 class="section">Parameters</h4>
+  <dl class="parameters">
+    <dt><code>cfg</code> <a class="xref" href="Apq.Cfg.ICfgRoot.html">ICfgRoot</a></dt>
+    <dd><p>配置根</p>
+</dd>
+    <dt><code>key</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd><p>配置键</p>
+</dd>
+  </dl>
+
+  <h4 class="section">Returns</h4>
+  <dl class="parameters">
+    <dt><span class="xref">T</span></dt>
+    <dd><p>解析并转换后的值</p>
+</dd>
+  </dl>
+
+  <h4 class="section">Type Parameters</h4>
+  <dl class="parameters">
+    <dt><code>T</code></dt>
+    <dd><p>目标类型</p>
+</dd>
+  </dl>
+
+
+
+
+
+
+
+
+
+
+  <a id="Apq_Cfg_TemplateExtensions_ResolveVariables_" data-uid="Apq.Cfg.TemplateExtensions.ResolveVariables*"></a>
+
+  <h3 id="Apq_Cfg_TemplateExtensions_ResolveVariables_Apq_Cfg_ICfgRoot_System_String_" data-uid="Apq.Cfg.TemplateExtensions.ResolveVariables(Apq.Cfg.ICfgRoot,System.String)">
+  ResolveVariables(ICfgRoot, string?)
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>解析字符串中的变量</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public static string? ResolveVariables(this ICfgRoot cfg, string? template)</code></pre>
+  </div>
+
+  <h4 class="section">Parameters</h4>
+  <dl class="parameters">
+    <dt><code>cfg</code> <a class="xref" href="Apq.Cfg.ICfgRoot.html">ICfgRoot</a></dt>
+    <dd><p>配置根</p>
+</dd>
+    <dt><code>template</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd><p>模板字符串</p>
+</dd>
+  </dl>
+
+  <h4 class="section">Returns</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd><p>解析后的字符串</p>
+</dd>
+  </dl>
+
+
+
+
+
+
+  <h4 class="section" id="Apq_Cfg_TemplateExtensions_ResolveVariables_Apq_Cfg_ICfgRoot_System_String__examples">Examples</h4>
+  <pre><code class="lang-csharp">var message = cfg.ResolveVariables("Application ${App:Name} is running on ${SYS:MachineName}");
+// 返回: "Application MyApp is running on SERVER01"</code></pre>
+
+
+
+
+
+
+  <a id="Apq_Cfg_TemplateExtensions_ResolveVariables_" data-uid="Apq.Cfg.TemplateExtensions.ResolveVariables*"></a>
+
+  <h3 id="Apq_Cfg_TemplateExtensions_ResolveVariables_Apq_Cfg_ICfgRoot_System_String_Apq_Cfg_Template_VariableResolutionOptions_" data-uid="Apq.Cfg.TemplateExtensions.ResolveVariables(Apq.Cfg.ICfgRoot,System.String,Apq.Cfg.Template.VariableResolutionOptions)">
+  ResolveVariables(ICfgRoot, string?, VariableResolutionOptions)
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>解析字符串中的变量</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public static string? ResolveVariables(this ICfgRoot cfg, string? template, VariableResolutionOptions options)</code></pre>
+  </div>
+
+  <h4 class="section">Parameters</h4>
+  <dl class="parameters">
+    <dt><code>cfg</code> <a class="xref" href="Apq.Cfg.ICfgRoot.html">ICfgRoot</a></dt>
+    <dd><p>配置根</p>
+</dd>
+    <dt><code>template</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd><p>模板字符串</p>
+</dd>
+    <dt><code>options</code> <a class="xref" href="Apq.Cfg.Template.VariableResolutionOptions.html">VariableResolutionOptions</a></dt>
+    <dd><p>解析选项</p>
+</dd>
+  </dl>
+
+  <h4 class="section">Returns</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd><p>解析后的字符串</p>
+</dd>
+  </dl>
+
+
+
+
+
+
+
+
+
+
+
+  <a id="Apq_Cfg_TemplateExtensions_TryGetResolved_" data-uid="Apq.Cfg.TemplateExtensions.TryGetResolved*"></a>
+
+  <h3 id="Apq_Cfg_TemplateExtensions_TryGetResolved_Apq_Cfg_ICfgRoot_System_String_System_String__" data-uid="Apq.Cfg.TemplateExtensions.TryGetResolved(Apq.Cfg.ICfgRoot,System.String,System.String@)">
+  TryGetResolved(ICfgRoot, string, out string?)
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>尝试获取解析变量后的配置值</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public static bool TryGetResolved(this ICfgRoot cfg, string key, out string? value)</code></pre>
+  </div>
+
+  <h4 class="section">Parameters</h4>
+  <dl class="parameters">
+    <dt><code>cfg</code> <a class="xref" href="Apq.Cfg.ICfgRoot.html">ICfgRoot</a></dt>
+    <dd><p>配置根</p>
+</dd>
+    <dt><code>key</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd><p>配置键</p>
+</dd>
+    <dt><code>value</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd><p>解析后的值</p>
+</dd>
+  </dl>
+
+  <h4 class="section">Returns</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
+    <dd><p>是否成功获取</p>
+</dd>
+  </dl>
+
+
+
+
+
+
+
+
+
+
+
+  <a id="Apq_Cfg_TemplateExtensions_TryGetResolved_" data-uid="Apq.Cfg.TemplateExtensions.TryGetResolved*"></a>
+
+  <h3 id="Apq_Cfg_TemplateExtensions_TryGetResolved__1_Apq_Cfg_ICfgRoot_System_String___0__" data-uid="Apq.Cfg.TemplateExtensions.TryGetResolved``1(Apq.Cfg.ICfgRoot,System.String,``0@)">
+  TryGetResolved&lt;T&gt;(ICfgRoot, string, out T?)
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>尝试获取解析变量后的配置值,并转换为指定类型</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public static bool TryGetResolved&lt;T&gt;(this ICfgRoot cfg, string key, out T? value)</code></pre>
+  </div>
+
+  <h4 class="section">Parameters</h4>
+  <dl class="parameters">
+    <dt><code>cfg</code> <a class="xref" href="Apq.Cfg.ICfgRoot.html">ICfgRoot</a></dt>
+    <dd><p>配置根</p>
+</dd>
+    <dt><code>key</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd><p>配置键</p>
+</dd>
+    <dt><code>value</code> <span class="xref">T</span></dt>
+    <dd><p>解析并转换后的值</p>
+</dd>
+  </dl>
+
+  <h4 class="section">Returns</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
+    <dd><p>是否成功获取</p>
+</dd>
+  </dl>
+
+  <h4 class="section">Type Parameters</h4>
+  <dl class="parameters">
+    <dt><code>T</code></dt>
+    <dd><p>目标类型</p>
+</dd>
+  </dl>
+
+
+
+
+
+
+
+
+
+
+
+</article>
+
+
+
+      </div>
+
+      <div class="affix">
+        <nav id="affix"></nav>
+      </div>
+    </main>
+
+    <div class="container-xxl search-results" id="search-results"></div>
+
+    <footer class="border-top text-secondary">
+      <div class="container-xxl">
+        <div class="flex-fill">
+          Apq.Cfg - .NET 统一配置组件库 (基于 .NET 10.0,兼容 .NET 8.0)
+        </div>
+      </div>
+    </footer>
+  </body>
+</html>

+ 17 - 9
docs/site/public/api-reference/api/Apq.Cfg.Toml.CfgBuilderExtensions.html

@@ -165,31 +165,39 @@ Class CfgBuilderExtensions
   <div class="markdown level1 conceptual"></div>
 
   <div class="codewrapper">
-    <pre><code class="lang-csharp hljs">public static CfgBuilder AddToml(this CfgBuilder builder, string path, int level, bool writeable = false, bool optional = true, bool reloadOnChange = true, bool isPrimaryWriter = false)</code></pre>
+    <pre><code class="lang-csharp hljs">public static CfgBuilder AddToml(this CfgBuilder builder, string path, int level = 0, bool writeable = false, bool optional = true, bool reloadOnChange = true, bool isPrimaryWriter = false)</code></pre>
   </div>
 
   <h4 class="section">Parameters</h4>
   <dl class="parameters">
     <dt><code>builder</code> <a class="xref" href="Apq.Cfg.CfgBuilder.html">CfgBuilder</a></dt>
-    <dd></dd>
+    <dd><p>配置构建器</p>
+</dd>
     <dt><code>path</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
-    <dd></dd>
+    <dd><p>TOML 文件路径</p>
+</dd>
     <dt><code>level</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
-    <dd></dd>
+    <dd><p>配置层级,数值越大优先级越高,默认为 <a class="xref" href="Apq.Cfg.CfgSourceLevels.html#Apq_Cfg_CfgSourceLevels_Toml">Toml</a> (0)</p>
+</dd>
     <dt><code>writeable</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
-    <dd></dd>
+    <dd><p>是否可写,默认为false</p>
+</dd>
     <dt><code>optional</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
-    <dd></dd>
+    <dd><p>是否为可选文件,默认为true</p>
+</dd>
     <dt><code>reloadOnChange</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
-    <dd></dd>
+    <dd><p>文件变更时是否自动重载,默认为true</p>
+</dd>
     <dt><code>isPrimaryWriter</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
-    <dd></dd>
+    <dd><p>是否为主要写入器,默认为false</p>
+</dd>
   </dl>
 
   <h4 class="section">Returns</h4>
   <dl class="parameters">
     <dt><a class="xref" href="Apq.Cfg.CfgBuilder.html">CfgBuilder</a></dt>
-    <dd></dd>
+    <dd><p>配置构建器实例,支持链式调用</p>
+</dd>
   </dl>
 
 

+ 507 - 0
docs/site/public/api-reference/api/Apq.Cfg.Validation.CfgRootValidationExtensions.html

@@ -0,0 +1,507 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8">
+      <title>Class CfgRootValidationExtensions | Apq.Cfg API </title>
+      <meta name="viewport" content="width=device-width, initial-scale=1.0">
+      <meta name="title" content="Class CfgRootValidationExtensions | Apq.Cfg API ">
+      
+      <meta name="description" content="ICfgRoot 验证扩展方法">
+      <link rel="icon" href="../favicon.svg">
+      <link rel="stylesheet" href="../public/docfx.min.css">
+      <link rel="stylesheet" href="../public/main.css">
+      <meta name="docfx:navrel" content="../toc.html">
+      <meta name="docfx:tocrel" content="toc.html">
+      
+      <meta name="docfx:rel" content="../">
+      
+      
+      
+      <meta name="loc:inThisArticle" content="In this article">
+      <meta name="loc:searchResultsCount" content="{count} results for &quot;{query}&quot;">
+      <meta name="loc:searchNoResults" content="No results for &quot;{query}&quot;">
+      <meta name="loc:tocFilter" content="Filter by title">
+      <meta name="loc:nextArticle" content="Next">
+      <meta name="loc:prevArticle" content="Previous">
+      <meta name="loc:themeLight" content="Light">
+      <meta name="loc:themeDark" content="Dark">
+      <meta name="loc:themeAuto" content="Auto">
+      <meta name="loc:changeTheme" content="Change theme">
+      <meta name="loc:copy" content="Copy">
+      <meta name="loc:downloadPdf" content="Download PDF">
+
+      <script type="module" src="./../public/docfx.min.js"></script>
+
+      <script>
+        const theme = localStorage.getItem('theme') || 'auto'
+        document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
+      </script>
+
+  </head>
+
+  <body class="tex2jax_ignore" data-layout="" data-yaml-mime="ManagedReference">
+    <header class="bg-body border-bottom">
+      <nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
+        <div class="container-xxl flex-nowrap">
+          <a class="navbar-brand" href="../index.html">
+            <img id="logo" class="svg" src="../images/logo-small.svg" alt="Apq.Cfg">
+            Apq.Cfg
+          </a>
+          <button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
+            <i class="bi bi-three-dots"></i>
+          </button>
+          <div class="collapse navbar-collapse" id="navpanel">
+            <div id="navbar">
+              <form class="search" role="search" id="search">
+                <i class="bi bi-search"></i>
+                <input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
+              </form>
+            </div>
+          </div>
+        </div>
+      </nav>
+    </header>
+
+    <main class="container-xxl">
+      <div class="toc-offcanvas">
+        <div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
+          <div class="offcanvas-header">
+            <h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
+            <button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
+          </div>
+          <div class="offcanvas-body">
+            <nav class="toc" id="toc"></nav>
+          </div>
+        </div>
+      </div>
+
+      <div class="content">
+        <div class="actionbar">
+          <button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
+            <i class="bi bi-list"></i>
+          </button>
+
+          <nav id="breadcrumb"></nav>
+        </div>
+
+        <article data-uid="Apq.Cfg.Validation.CfgRootValidationExtensions">
+
+
+
+  <h1 id="Apq_Cfg_Validation_CfgRootValidationExtensions" data-uid="Apq.Cfg.Validation.CfgRootValidationExtensions" class="text-break">
+Class CfgRootValidationExtensions  
+  </h1>
+
+  <div class="facts text-secondary">
+    <dl><dt>Namespace</dt><dd><a class="xref" href="Apq.html">Apq</a>.<a class="xref" href="Apq.Cfg.html">Cfg</a>.<a class="xref" href="Apq.Cfg.Validation.html">Validation</a></dd></dl>
+  <dl><dt>Assembly</dt><dd>Apq.Cfg.dll</dd></dl>
+  </div>
+
+  <div class="markdown summary"><p>ICfgRoot 验证扩展方法</p>
+</div>
+  <div class="markdown conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public static class CfgRootValidationExtensions</code></pre>
+  </div>
+
+
+
+
+  <dl class="typelist inheritance">
+    <dt>Inheritance</dt>
+    <dd>
+      <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
+      <div><span class="xref">CfgRootValidationExtensions</span></div>
+    </dd>
+  </dl>
+
+
+
+  <dl class="typelist inheritedMembers">
+    <dt>Inherited Members</dt>
+    <dd>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object)</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object, object)</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone">object.MemberwiseClone()</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object, object)</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>
+    </div>
+  </dd></dl>
+
+
+
+
+
+
+  <h2 class="section" id="methods">Methods
+</h2>
+
+
+  <a id="Apq_Cfg_Validation_CfgRootValidationExtensions_TryValidate_" data-uid="Apq.Cfg.Validation.CfgRootValidationExtensions.TryValidate*"></a>
+
+  <h3 id="Apq_Cfg_Validation_CfgRootValidationExtensions_TryValidate_Apq_Cfg_ICfgRoot_Apq_Cfg_Validation_IConfigValidator_Apq_Cfg_Validation_ValidationResult__" data-uid="Apq.Cfg.Validation.CfgRootValidationExtensions.TryValidate(Apq.Cfg.ICfgRoot,Apq.Cfg.Validation.IConfigValidator,Apq.Cfg.Validation.ValidationResult@)">
+  TryValidate(ICfgRoot, IConfigValidator, out ValidationResult)
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>尝试验证配置</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public static bool TryValidate(this ICfgRoot cfg, IConfigValidator validator, out ValidationResult result)</code></pre>
+  </div>
+
+  <h4 class="section">Parameters</h4>
+  <dl class="parameters">
+    <dt><code>cfg</code> <a class="xref" href="Apq.Cfg.ICfgRoot.html">ICfgRoot</a></dt>
+    <dd><p>配置根</p>
+</dd>
+    <dt><code>validator</code> <a class="xref" href="Apq.Cfg.Validation.IConfigValidator.html">IConfigValidator</a></dt>
+    <dd><p>验证器</p>
+</dd>
+    <dt><code>result</code> <a class="xref" href="Apq.Cfg.Validation.ValidationResult.html">ValidationResult</a></dt>
+    <dd><p>验证结果</p>
+</dd>
+  </dl>
+
+  <h4 class="section">Returns</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
+    <dd><p>验证是否通过</p>
+</dd>
+  </dl>
+
+
+
+
+
+
+  <h4 class="section" id="Apq_Cfg_Validation_CfgRootValidationExtensions_TryValidate_Apq_Cfg_ICfgRoot_Apq_Cfg_Validation_IConfigValidator_Apq_Cfg_Validation_ValidationResult___examples">Examples</h4>
+  <pre><code class="lang-csharp">if (cfg.TryValidate(validator, out var result))
+{
+    Console.WriteLine("配置验证通过");
+}
+else
+{
+    Console.WriteLine($"配置验证失败,共 {result.ErrorCount} 个错误");
+}</code></pre>
+
+
+
+
+
+
+  <a id="Apq_Cfg_Validation_CfgRootValidationExtensions_TryValidate_" data-uid="Apq.Cfg.Validation.CfgRootValidationExtensions.TryValidate*"></a>
+
+  <h3 id="Apq_Cfg_Validation_CfgRootValidationExtensions_TryValidate_Apq_Cfg_ICfgRoot_System_Action_Apq_Cfg_Validation_ConfigValidationBuilder__Apq_Cfg_Validation_ValidationResult__" data-uid="Apq.Cfg.Validation.CfgRootValidationExtensions.TryValidate(Apq.Cfg.ICfgRoot,System.Action{Apq.Cfg.Validation.ConfigValidationBuilder},Apq.Cfg.Validation.ValidationResult@)">
+  TryValidate(ICfgRoot, Action&lt;ConfigValidationBuilder&gt;, out ValidationResult)
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>尝试验证配置</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public static bool TryValidate(this ICfgRoot cfg, Action&lt;ConfigValidationBuilder&gt; configure, out ValidationResult result)</code></pre>
+  </div>
+
+  <h4 class="section">Parameters</h4>
+  <dl class="parameters">
+    <dt><code>cfg</code> <a class="xref" href="Apq.Cfg.ICfgRoot.html">ICfgRoot</a></dt>
+    <dd><p>配置根</p>
+</dd>
+    <dt><code>configure</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.action-1">Action</a>&lt;<a class="xref" href="Apq.Cfg.Validation.ConfigValidationBuilder.html">ConfigValidationBuilder</a>&gt;</dt>
+    <dd><p>验证规则配置委托</p>
+</dd>
+    <dt><code>result</code> <a class="xref" href="Apq.Cfg.Validation.ValidationResult.html">ValidationResult</a></dt>
+    <dd><p>验证结果</p>
+</dd>
+  </dl>
+
+  <h4 class="section">Returns</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
+    <dd><p>验证是否通过</p>
+</dd>
+  </dl>
+
+
+
+
+
+
+  <h4 class="section" id="Apq_Cfg_Validation_CfgRootValidationExtensions_TryValidate_Apq_Cfg_ICfgRoot_System_Action_Apq_Cfg_Validation_ConfigValidationBuilder__Apq_Cfg_Validation_ValidationResult___examples">Examples</h4>
+  <pre><code class="lang-csharp">if (cfg.TryValidate(v =&gt; v.Required("Database:ConnectionString"), out var result))
+{
+    Console.WriteLine("配置验证通过");
+}
+else
+{
+    Console.WriteLine($"配置验证失败,共 {result.ErrorCount} 个错误");
+}</code></pre>
+
+
+
+
+
+
+  <a id="Apq_Cfg_Validation_CfgRootValidationExtensions_Validate_" data-uid="Apq.Cfg.Validation.CfgRootValidationExtensions.Validate*"></a>
+
+  <h3 id="Apq_Cfg_Validation_CfgRootValidationExtensions_Validate_Apq_Cfg_ICfgRoot_Apq_Cfg_Validation_IConfigValidator_" data-uid="Apq.Cfg.Validation.CfgRootValidationExtensions.Validate(Apq.Cfg.ICfgRoot,Apq.Cfg.Validation.IConfigValidator)">
+  Validate(ICfgRoot, IConfigValidator)
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>使用指定的验证器验证配置</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public static ValidationResult Validate(this ICfgRoot cfg, IConfigValidator validator)</code></pre>
+  </div>
+
+  <h4 class="section">Parameters</h4>
+  <dl class="parameters">
+    <dt><code>cfg</code> <a class="xref" href="Apq.Cfg.ICfgRoot.html">ICfgRoot</a></dt>
+    <dd><p>配置根</p>
+</dd>
+    <dt><code>validator</code> <a class="xref" href="Apq.Cfg.Validation.IConfigValidator.html">IConfigValidator</a></dt>
+    <dd><p>验证器</p>
+</dd>
+  </dl>
+
+  <h4 class="section">Returns</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="Apq.Cfg.Validation.ValidationResult.html">ValidationResult</a></dt>
+    <dd><p>验证结果</p>
+</dd>
+  </dl>
+
+
+
+
+
+
+  <h4 class="section" id="Apq_Cfg_Validation_CfgRootValidationExtensions_Validate_Apq_Cfg_ICfgRoot_Apq_Cfg_Validation_IConfigValidator__examples">Examples</h4>
+  <pre><code class="lang-csharp">var validator = new ConfigValidationBuilder()
+    .Required("Database:ConnectionString")
+    .Range("Database:Port", 1, 65535)
+    .Build();
+
+var result = cfg.Validate(validator);
+if (!result.IsValid)
+{
+    foreach (var error in result.Errors)
+    {
+        Console.WriteLine($"配置错误: {error}");
+    }
+}</code></pre>
+
+
+
+
+
+
+  <a id="Apq_Cfg_Validation_CfgRootValidationExtensions_Validate_" data-uid="Apq.Cfg.Validation.CfgRootValidationExtensions.Validate*"></a>
+
+  <h3 id="Apq_Cfg_Validation_CfgRootValidationExtensions_Validate_Apq_Cfg_ICfgRoot_System_Action_Apq_Cfg_Validation_ConfigValidationBuilder__" data-uid="Apq.Cfg.Validation.CfgRootValidationExtensions.Validate(Apq.Cfg.ICfgRoot,System.Action{Apq.Cfg.Validation.ConfigValidationBuilder})">
+  Validate(ICfgRoot, Action&lt;ConfigValidationBuilder&gt;)
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>使用配置委托验证配置</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public static ValidationResult Validate(this ICfgRoot cfg, Action&lt;ConfigValidationBuilder&gt; configure)</code></pre>
+  </div>
+
+  <h4 class="section">Parameters</h4>
+  <dl class="parameters">
+    <dt><code>cfg</code> <a class="xref" href="Apq.Cfg.ICfgRoot.html">ICfgRoot</a></dt>
+    <dd><p>配置根</p>
+</dd>
+    <dt><code>configure</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.action-1">Action</a>&lt;<a class="xref" href="Apq.Cfg.Validation.ConfigValidationBuilder.html">ConfigValidationBuilder</a>&gt;</dt>
+    <dd><p>验证规则配置委托</p>
+</dd>
+  </dl>
+
+  <h4 class="section">Returns</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="Apq.Cfg.Validation.ValidationResult.html">ValidationResult</a></dt>
+    <dd><p>验证结果</p>
+</dd>
+  </dl>
+
+
+
+
+
+
+  <h4 class="section" id="Apq_Cfg_Validation_CfgRootValidationExtensions_Validate_Apq_Cfg_ICfgRoot_System_Action_Apq_Cfg_Validation_ConfigValidationBuilder___examples">Examples</h4>
+  <pre><code class="lang-csharp">var result = cfg.Validate(v =&gt; v
+    .Required("Database:ConnectionString")
+    .Range("Database:Port", 1, 65535)
+    .Regex("App:Email", @"^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$"));
+
+if (!result.IsValid)
+{
+    foreach (var error in result.Errors)
+    {
+        Console.WriteLine($"配置错误: {error}");
+    }
+}</code></pre>
+
+
+
+
+
+
+  <a id="Apq_Cfg_Validation_CfgRootValidationExtensions_ValidateAndThrow_" data-uid="Apq.Cfg.Validation.CfgRootValidationExtensions.ValidateAndThrow*"></a>
+
+  <h3 id="Apq_Cfg_Validation_CfgRootValidationExtensions_ValidateAndThrow_Apq_Cfg_ICfgRoot_Apq_Cfg_Validation_IConfigValidator_" data-uid="Apq.Cfg.Validation.CfgRootValidationExtensions.ValidateAndThrow(Apq.Cfg.ICfgRoot,Apq.Cfg.Validation.IConfigValidator)">
+  ValidateAndThrow(ICfgRoot, IConfigValidator)
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>验证配置并在失败时抛出异常</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public static void ValidateAndThrow(this ICfgRoot cfg, IConfigValidator validator)</code></pre>
+  </div>
+
+  <h4 class="section">Parameters</h4>
+  <dl class="parameters">
+    <dt><code>cfg</code> <a class="xref" href="Apq.Cfg.ICfgRoot.html">ICfgRoot</a></dt>
+    <dd><p>配置根</p>
+</dd>
+    <dt><code>validator</code> <a class="xref" href="Apq.Cfg.Validation.IConfigValidator.html">IConfigValidator</a></dt>
+    <dd><p>验证器</p>
+</dd>
+  </dl>
+
+
+
+
+
+
+
+  <h4 class="section" id="Apq_Cfg_Validation_CfgRootValidationExtensions_ValidateAndThrow_Apq_Cfg_ICfgRoot_Apq_Cfg_Validation_IConfigValidator__examples">Examples</h4>
+  <pre><code class="lang-csharp">try
+{
+    cfg.ValidateAndThrow(validator);
+}
+catch (ConfigValidationException ex)
+{
+    Console.WriteLine($"配置验证失败: {ex.Message}");
+}</code></pre>
+
+
+
+  <h4 class="section">Exceptions</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="Apq.Cfg.Validation.ConfigValidationException.html">ConfigValidationException</a></dt>
+    <dd><p>验证失败时抛出</p>
+</dd>
+  </dl>
+
+
+
+  <a id="Apq_Cfg_Validation_CfgRootValidationExtensions_ValidateAndThrow_" data-uid="Apq.Cfg.Validation.CfgRootValidationExtensions.ValidateAndThrow*"></a>
+
+  <h3 id="Apq_Cfg_Validation_CfgRootValidationExtensions_ValidateAndThrow_Apq_Cfg_ICfgRoot_System_Action_Apq_Cfg_Validation_ConfigValidationBuilder__" data-uid="Apq.Cfg.Validation.CfgRootValidationExtensions.ValidateAndThrow(Apq.Cfg.ICfgRoot,System.Action{Apq.Cfg.Validation.ConfigValidationBuilder})">
+  ValidateAndThrow(ICfgRoot, Action&lt;ConfigValidationBuilder&gt;)
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>验证配置并在失败时抛出异常</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public static void ValidateAndThrow(this ICfgRoot cfg, Action&lt;ConfigValidationBuilder&gt; configure)</code></pre>
+  </div>
+
+  <h4 class="section">Parameters</h4>
+  <dl class="parameters">
+    <dt><code>cfg</code> <a class="xref" href="Apq.Cfg.ICfgRoot.html">ICfgRoot</a></dt>
+    <dd><p>配置根</p>
+</dd>
+    <dt><code>configure</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.action-1">Action</a>&lt;<a class="xref" href="Apq.Cfg.Validation.ConfigValidationBuilder.html">ConfigValidationBuilder</a>&gt;</dt>
+    <dd><p>验证规则配置委托</p>
+</dd>
+  </dl>
+
+
+
+
+
+
+
+  <h4 class="section" id="Apq_Cfg_Validation_CfgRootValidationExtensions_ValidateAndThrow_Apq_Cfg_ICfgRoot_System_Action_Apq_Cfg_Validation_ConfigValidationBuilder___examples">Examples</h4>
+  <pre><code class="lang-csharp">try
+{
+    cfg.ValidateAndThrow(v =&gt; v
+        .Required("Database:ConnectionString")
+        .Range("Database:Port", 1, 65535));
+}
+catch (ConfigValidationException ex)
+{
+    Console.WriteLine($"配置验证失败: {ex.Message}");
+}</code></pre>
+
+
+
+  <h4 class="section">Exceptions</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="Apq.Cfg.Validation.ConfigValidationException.html">ConfigValidationException</a></dt>
+    <dd><p>验证失败时抛出</p>
+</dd>
+  </dl>
+
+
+
+
+</article>
+
+
+
+      </div>
+
+      <div class="affix">
+        <nav id="affix"></nav>
+      </div>
+    </main>
+
+    <div class="container-xxl search-results" id="search-results"></div>
+
+    <footer class="border-top text-secondary">
+      <div class="container-xxl">
+        <div class="flex-fill">
+          Apq.Cfg - .NET 统一配置组件库 (基于 .NET 10.0,兼容 .NET 8.0)
+        </div>
+      </div>
+    </footer>
+  </body>
+</html>

+ 976 - 0
docs/site/public/api-reference/api/Apq.Cfg.Validation.ConfigValidationBuilder.html

@@ -0,0 +1,976 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8">
+      <title>Class ConfigValidationBuilder | Apq.Cfg API </title>
+      <meta name="viewport" content="width=device-width, initial-scale=1.0">
+      <meta name="title" content="Class ConfigValidationBuilder | Apq.Cfg API ">
+      
+      <meta name="description" content="配置验证构建器,提供流式 API 构建验证规则">
+      <link rel="icon" href="../favicon.svg">
+      <link rel="stylesheet" href="../public/docfx.min.css">
+      <link rel="stylesheet" href="../public/main.css">
+      <meta name="docfx:navrel" content="../toc.html">
+      <meta name="docfx:tocrel" content="toc.html">
+      
+      <meta name="docfx:rel" content="../">
+      
+      
+      
+      <meta name="loc:inThisArticle" content="In this article">
+      <meta name="loc:searchResultsCount" content="{count} results for &quot;{query}&quot;">
+      <meta name="loc:searchNoResults" content="No results for &quot;{query}&quot;">
+      <meta name="loc:tocFilter" content="Filter by title">
+      <meta name="loc:nextArticle" content="Next">
+      <meta name="loc:prevArticle" content="Previous">
+      <meta name="loc:themeLight" content="Light">
+      <meta name="loc:themeDark" content="Dark">
+      <meta name="loc:themeAuto" content="Auto">
+      <meta name="loc:changeTheme" content="Change theme">
+      <meta name="loc:copy" content="Copy">
+      <meta name="loc:downloadPdf" content="Download PDF">
+
+      <script type="module" src="./../public/docfx.min.js"></script>
+
+      <script>
+        const theme = localStorage.getItem('theme') || 'auto'
+        document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
+      </script>
+
+  </head>
+
+  <body class="tex2jax_ignore" data-layout="" data-yaml-mime="ManagedReference">
+    <header class="bg-body border-bottom">
+      <nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
+        <div class="container-xxl flex-nowrap">
+          <a class="navbar-brand" href="../index.html">
+            <img id="logo" class="svg" src="../images/logo-small.svg" alt="Apq.Cfg">
+            Apq.Cfg
+          </a>
+          <button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
+            <i class="bi bi-three-dots"></i>
+          </button>
+          <div class="collapse navbar-collapse" id="navpanel">
+            <div id="navbar">
+              <form class="search" role="search" id="search">
+                <i class="bi bi-search"></i>
+                <input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
+              </form>
+            </div>
+          </div>
+        </div>
+      </nav>
+    </header>
+
+    <main class="container-xxl">
+      <div class="toc-offcanvas">
+        <div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
+          <div class="offcanvas-header">
+            <h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
+            <button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
+          </div>
+          <div class="offcanvas-body">
+            <nav class="toc" id="toc"></nav>
+          </div>
+        </div>
+      </div>
+
+      <div class="content">
+        <div class="actionbar">
+          <button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
+            <i class="bi bi-list"></i>
+          </button>
+
+          <nav id="breadcrumb"></nav>
+        </div>
+
+        <article data-uid="Apq.Cfg.Validation.ConfigValidationBuilder">
+
+
+
+  <h1 id="Apq_Cfg_Validation_ConfigValidationBuilder" data-uid="Apq.Cfg.Validation.ConfigValidationBuilder" class="text-break">
+Class ConfigValidationBuilder  
+  </h1>
+
+  <div class="facts text-secondary">
+    <dl><dt>Namespace</dt><dd><a class="xref" href="Apq.html">Apq</a>.<a class="xref" href="Apq.Cfg.html">Cfg</a>.<a class="xref" href="Apq.Cfg.Validation.html">Validation</a></dd></dl>
+  <dl><dt>Assembly</dt><dd>Apq.Cfg.dll</dd></dl>
+  </div>
+
+  <div class="markdown summary"><p>配置验证构建器,提供流式 API 构建验证规则</p>
+</div>
+  <div class="markdown conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public sealed class ConfigValidationBuilder</code></pre>
+  </div>
+
+
+
+
+  <dl class="typelist inheritance">
+    <dt>Inheritance</dt>
+    <dd>
+      <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
+      <div><span class="xref">ConfigValidationBuilder</span></div>
+    </dd>
+  </dl>
+
+
+
+  <dl class="typelist inheritedMembers">
+    <dt>Inherited Members</dt>
+    <dd>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object)</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object, object)</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object, object)</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>
+    </div>
+  </dd></dl>
+
+
+
+
+
+
+  <h2 class="section" id="methods">Methods
+</h2>
+
+
+  <a id="Apq_Cfg_Validation_ConfigValidationBuilder_AddRule_" data-uid="Apq.Cfg.Validation.ConfigValidationBuilder.AddRule*"></a>
+
+  <h3 id="Apq_Cfg_Validation_ConfigValidationBuilder_AddRule_Apq_Cfg_Validation_IValidationRule_" data-uid="Apq.Cfg.Validation.ConfigValidationBuilder.AddRule(Apq.Cfg.Validation.IValidationRule)">
+  AddRule(IValidationRule)
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>添加自定义验证规则</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public ConfigValidationBuilder AddRule(IValidationRule rule)</code></pre>
+  </div>
+
+  <h4 class="section">Parameters</h4>
+  <dl class="parameters">
+    <dt><code>rule</code> <a class="xref" href="Apq.Cfg.Validation.IValidationRule.html">IValidationRule</a></dt>
+    <dd><p>验证规则</p>
+</dd>
+  </dl>
+
+  <h4 class="section">Returns</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="Apq.Cfg.Validation.ConfigValidationBuilder.html">ConfigValidationBuilder</a></dt>
+    <dd><p>构建器实例,支持链式调用</p>
+</dd>
+  </dl>
+
+
+
+
+
+
+
+
+
+
+
+  <a id="Apq_Cfg_Validation_ConfigValidationBuilder_AddRules_" data-uid="Apq.Cfg.Validation.ConfigValidationBuilder.AddRules*"></a>
+
+  <h3 id="Apq_Cfg_Validation_ConfigValidationBuilder_AddRules_System_Collections_Generic_IEnumerable_Apq_Cfg_Validation_IValidationRule__" data-uid="Apq.Cfg.Validation.ConfigValidationBuilder.AddRules(System.Collections.Generic.IEnumerable{Apq.Cfg.Validation.IValidationRule})">
+  AddRules(IEnumerable&lt;IValidationRule&gt;)
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>添加多个自定义验证规则</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public ConfigValidationBuilder AddRules(IEnumerable&lt;IValidationRule&gt; rules)</code></pre>
+  </div>
+
+  <h4 class="section">Parameters</h4>
+  <dl class="parameters">
+    <dt><code>rules</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1">IEnumerable</a>&lt;<a class="xref" href="Apq.Cfg.Validation.IValidationRule.html">IValidationRule</a>&gt;</dt>
+    <dd><p>验证规则列表</p>
+</dd>
+  </dl>
+
+  <h4 class="section">Returns</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="Apq.Cfg.Validation.ConfigValidationBuilder.html">ConfigValidationBuilder</a></dt>
+    <dd><p>构建器实例,支持链式调用</p>
+</dd>
+  </dl>
+
+
+
+
+
+
+
+
+
+
+
+  <a id="Apq_Cfg_Validation_ConfigValidationBuilder_Build_" data-uid="Apq.Cfg.Validation.ConfigValidationBuilder.Build*"></a>
+
+  <h3 id="Apq_Cfg_Validation_ConfigValidationBuilder_Build" data-uid="Apq.Cfg.Validation.ConfigValidationBuilder.Build">
+  Build()
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>构建配置验证器</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public IConfigValidator Build()</code></pre>
+  </div>
+
+
+  <h4 class="section">Returns</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="Apq.Cfg.Validation.IConfigValidator.html">IConfigValidator</a></dt>
+    <dd><p>配置验证器</p>
+</dd>
+  </dl>
+
+
+
+
+
+
+
+
+
+
+
+  <a id="Apq_Cfg_Validation_ConfigValidationBuilder_Custom_" data-uid="Apq.Cfg.Validation.ConfigValidationBuilder.Custom*"></a>
+
+  <h3 id="Apq_Cfg_Validation_ConfigValidationBuilder_Custom_System_String_System_Func_System_String_System_Boolean__System_String_System_String_" data-uid="Apq.Cfg.Validation.ConfigValidationBuilder.Custom(System.String,System.Func{System.String,System.Boolean},System.String,System.String)">
+  Custom(string, Func&lt;string?, bool&gt;, string, string?)
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>添加自定义验证规则</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public ConfigValidationBuilder Custom(string key, Func&lt;string?, bool&gt; validator, string errorMessage, string? ruleName = null)</code></pre>
+  </div>
+
+  <h4 class="section">Parameters</h4>
+  <dl class="parameters">
+    <dt><code>key</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd><p>配置键</p>
+</dd>
+    <dt><code>validator</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.func-2">Func</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a>, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a>&gt;</dt>
+    <dd><p>验证函数,返回 true 表示验证通过</p>
+</dd>
+    <dt><code>errorMessage</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd><p>错误消息</p>
+</dd>
+    <dt><code>ruleName</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd><p>规则名称</p>
+</dd>
+  </dl>
+
+  <h4 class="section">Returns</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="Apq.Cfg.Validation.ConfigValidationBuilder.html">ConfigValidationBuilder</a></dt>
+    <dd><p>构建器实例,支持链式调用</p>
+</dd>
+  </dl>
+
+
+
+
+
+
+
+
+
+
+
+  <a id="Apq_Cfg_Validation_ConfigValidationBuilder_DependsOn_" data-uid="Apq.Cfg.Validation.ConfigValidationBuilder.DependsOn*"></a>
+
+  <h3 id="Apq_Cfg_Validation_ConfigValidationBuilder_DependsOn_System_String_System_String_System_String_" data-uid="Apq.Cfg.Validation.ConfigValidationBuilder.DependsOn(System.String,System.String,System.String)">
+  DependsOn(string, string, string?)
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>添加依赖验证规则</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public ConfigValidationBuilder DependsOn(string key, string dependencyKey, string? errorMessage = null)</code></pre>
+  </div>
+
+  <h4 class="section">Parameters</h4>
+  <dl class="parameters">
+    <dt><code>key</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd><p>配置键</p>
+</dd>
+    <dt><code>dependencyKey</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd><p>依赖的配置键</p>
+</dd>
+    <dt><code>errorMessage</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd><p>自定义错误消息</p>
+</dd>
+  </dl>
+
+  <h4 class="section">Returns</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="Apq.Cfg.Validation.ConfigValidationBuilder.html">ConfigValidationBuilder</a></dt>
+    <dd><p>构建器实例,支持链式调用</p>
+</dd>
+  </dl>
+
+
+
+
+
+
+
+
+
+
+
+  <a id="Apq_Cfg_Validation_ConfigValidationBuilder_Length_" data-uid="Apq.Cfg.Validation.ConfigValidationBuilder.Length*"></a>
+
+  <h3 id="Apq_Cfg_Validation_ConfigValidationBuilder_Length_System_String_System_Nullable_System_Int32__System_Nullable_System_Int32__System_String_" data-uid="Apq.Cfg.Validation.ConfigValidationBuilder.Length(System.String,System.Nullable{System.Int32},System.Nullable{System.Int32},System.String)">
+  Length(string, int?, int?, string?)
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>添加字符串长度验证规则</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public ConfigValidationBuilder Length(string key, int? minLength = null, int? maxLength = null, string? errorMessage = null)</code></pre>
+  </div>
+
+  <h4 class="section">Parameters</h4>
+  <dl class="parameters">
+    <dt><code>key</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd><p>配置键</p>
+</dd>
+    <dt><code>minLength</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a>?</dt>
+    <dd><p>最小长度(null 表示不限制)</p>
+</dd>
+    <dt><code>maxLength</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a>?</dt>
+    <dd><p>最大长度(null 表示不限制)</p>
+</dd>
+    <dt><code>errorMessage</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd><p>自定义错误消息</p>
+</dd>
+  </dl>
+
+  <h4 class="section">Returns</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="Apq.Cfg.Validation.ConfigValidationBuilder.html">ConfigValidationBuilder</a></dt>
+    <dd><p>构建器实例,支持链式调用</p>
+</dd>
+  </dl>
+
+
+
+
+
+
+
+
+
+
+
+  <a id="Apq_Cfg_Validation_ConfigValidationBuilder_MaxLength_" data-uid="Apq.Cfg.Validation.ConfigValidationBuilder.MaxLength*"></a>
+
+  <h3 id="Apq_Cfg_Validation_ConfigValidationBuilder_MaxLength_System_String_System_Int32_System_String_" data-uid="Apq.Cfg.Validation.ConfigValidationBuilder.MaxLength(System.String,System.Int32,System.String)">
+  MaxLength(string, int, string?)
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>添加最大长度验证规则</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public ConfigValidationBuilder MaxLength(string key, int maxLength, string? errorMessage = null)</code></pre>
+  </div>
+
+  <h4 class="section">Parameters</h4>
+  <dl class="parameters">
+    <dt><code>key</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd><p>配置键</p>
+</dd>
+    <dt><code>maxLength</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
+    <dd><p>最大长度</p>
+</dd>
+    <dt><code>errorMessage</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd><p>自定义错误消息</p>
+</dd>
+  </dl>
+
+  <h4 class="section">Returns</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="Apq.Cfg.Validation.ConfigValidationBuilder.html">ConfigValidationBuilder</a></dt>
+    <dd><p>构建器实例,支持链式调用</p>
+</dd>
+  </dl>
+
+
+
+
+
+
+
+
+
+
+
+  <a id="Apq_Cfg_Validation_ConfigValidationBuilder_MinLength_" data-uid="Apq.Cfg.Validation.ConfigValidationBuilder.MinLength*"></a>
+
+  <h3 id="Apq_Cfg_Validation_ConfigValidationBuilder_MinLength_System_String_System_Int32_System_String_" data-uid="Apq.Cfg.Validation.ConfigValidationBuilder.MinLength(System.String,System.Int32,System.String)">
+  MinLength(string, int, string?)
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>添加最小长度验证规则</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public ConfigValidationBuilder MinLength(string key, int minLength, string? errorMessage = null)</code></pre>
+  </div>
+
+  <h4 class="section">Parameters</h4>
+  <dl class="parameters">
+    <dt><code>key</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd><p>配置键</p>
+</dd>
+    <dt><code>minLength</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
+    <dd><p>最小长度</p>
+</dd>
+    <dt><code>errorMessage</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd><p>自定义错误消息</p>
+</dd>
+  </dl>
+
+  <h4 class="section">Returns</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="Apq.Cfg.Validation.ConfigValidationBuilder.html">ConfigValidationBuilder</a></dt>
+    <dd><p>构建器实例,支持链式调用</p>
+</dd>
+  </dl>
+
+
+
+
+
+
+
+
+
+
+
+  <a id="Apq_Cfg_Validation_ConfigValidationBuilder_OneOf_" data-uid="Apq.Cfg.Validation.ConfigValidationBuilder.OneOf*"></a>
+
+  <h3 id="Apq_Cfg_Validation_ConfigValidationBuilder_OneOf_System_String_System_Collections_Generic_IEnumerable_System_String__System_Boolean_System_String_" data-uid="Apq.Cfg.Validation.ConfigValidationBuilder.OneOf(System.String,System.Collections.Generic.IEnumerable{System.String},System.Boolean,System.String)">
+  OneOf(string, IEnumerable&lt;string&gt;, bool, string?)
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>添加枚举值验证规则</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public ConfigValidationBuilder OneOf(string key, IEnumerable&lt;string&gt; allowedValues, bool ignoreCase = false, string? errorMessage = null)</code></pre>
+  </div>
+
+  <h4 class="section">Parameters</h4>
+  <dl class="parameters">
+    <dt><code>key</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd><p>配置键</p>
+</dd>
+    <dt><code>allowedValues</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1">IEnumerable</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a>&gt;</dt>
+    <dd><p>允许的值列表</p>
+</dd>
+    <dt><code>ignoreCase</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
+    <dd><p>是否忽略大小写</p>
+</dd>
+    <dt><code>errorMessage</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd><p>自定义错误消息</p>
+</dd>
+  </dl>
+
+  <h4 class="section">Returns</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="Apq.Cfg.Validation.ConfigValidationBuilder.html">ConfigValidationBuilder</a></dt>
+    <dd><p>构建器实例,支持链式调用</p>
+</dd>
+  </dl>
+
+
+
+
+
+
+
+
+
+
+
+  <a id="Apq_Cfg_Validation_ConfigValidationBuilder_OneOf_" data-uid="Apq.Cfg.Validation.ConfigValidationBuilder.OneOf*"></a>
+
+  <h3 id="Apq_Cfg_Validation_ConfigValidationBuilder_OneOf_System_String_System_String___" data-uid="Apq.Cfg.Validation.ConfigValidationBuilder.OneOf(System.String,System.String[])">
+  OneOf(string, params string[])
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>添加枚举值验证规则</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public ConfigValidationBuilder OneOf(string key, params string[] allowedValues)</code></pre>
+  </div>
+
+  <h4 class="section">Parameters</h4>
+  <dl class="parameters">
+    <dt><code>key</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd><p>配置键</p>
+</dd>
+    <dt><code>allowedValues</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a>[]</dt>
+    <dd><p>允许的值列表</p>
+</dd>
+  </dl>
+
+  <h4 class="section">Returns</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="Apq.Cfg.Validation.ConfigValidationBuilder.html">ConfigValidationBuilder</a></dt>
+    <dd><p>构建器实例,支持链式调用</p>
+</dd>
+  </dl>
+
+
+
+
+
+
+
+
+
+
+
+  <a id="Apq_Cfg_Validation_ConfigValidationBuilder_Range_" data-uid="Apq.Cfg.Validation.ConfigValidationBuilder.Range*"></a>
+
+  <h3 id="Apq_Cfg_Validation_ConfigValidationBuilder_Range_System_String_System_DateTime_System_DateTime_System_String_" data-uid="Apq.Cfg.Validation.ConfigValidationBuilder.Range(System.String,System.DateTime,System.DateTime,System.String)">
+  Range(string, DateTime, DateTime, string?)
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>添加日期时间范围验证规则</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public ConfigValidationBuilder Range(string key, DateTime min, DateTime max, string? errorMessage = null)</code></pre>
+  </div>
+
+  <h4 class="section">Parameters</h4>
+  <dl class="parameters">
+    <dt><code>key</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd><p>配置键</p>
+</dd>
+    <dt><code>min</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.datetime">DateTime</a></dt>
+    <dd><p>最小值</p>
+</dd>
+    <dt><code>max</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.datetime">DateTime</a></dt>
+    <dd><p>最大值</p>
+</dd>
+    <dt><code>errorMessage</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd><p>自定义错误消息</p>
+</dd>
+  </dl>
+
+  <h4 class="section">Returns</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="Apq.Cfg.Validation.ConfigValidationBuilder.html">ConfigValidationBuilder</a></dt>
+    <dd><p>构建器实例,支持链式调用</p>
+</dd>
+  </dl>
+
+
+
+
+
+
+
+
+
+
+
+  <a id="Apq_Cfg_Validation_ConfigValidationBuilder_Range_" data-uid="Apq.Cfg.Validation.ConfigValidationBuilder.Range*"></a>
+
+  <h3 id="Apq_Cfg_Validation_ConfigValidationBuilder_Range_System_String_System_Decimal_System_Decimal_System_String_" data-uid="Apq.Cfg.Validation.ConfigValidationBuilder.Range(System.String,System.Decimal,System.Decimal,System.String)">
+  Range(string, decimal, decimal, string?)
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>添加十进制数范围验证规则</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public ConfigValidationBuilder Range(string key, decimal min, decimal max, string? errorMessage = null)</code></pre>
+  </div>
+
+  <h4 class="section">Parameters</h4>
+  <dl class="parameters">
+    <dt><code>key</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd><p>配置键</p>
+</dd>
+    <dt><code>min</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.decimal">decimal</a></dt>
+    <dd><p>最小值</p>
+</dd>
+    <dt><code>max</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.decimal">decimal</a></dt>
+    <dd><p>最大值</p>
+</dd>
+    <dt><code>errorMessage</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd><p>自定义错误消息</p>
+</dd>
+  </dl>
+
+  <h4 class="section">Returns</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="Apq.Cfg.Validation.ConfigValidationBuilder.html">ConfigValidationBuilder</a></dt>
+    <dd><p>构建器实例,支持链式调用</p>
+</dd>
+  </dl>
+
+
+
+
+
+
+
+
+
+
+
+  <a id="Apq_Cfg_Validation_ConfigValidationBuilder_Range_" data-uid="Apq.Cfg.Validation.ConfigValidationBuilder.Range*"></a>
+
+  <h3 id="Apq_Cfg_Validation_ConfigValidationBuilder_Range_System_String_System_Double_System_Double_System_String_" data-uid="Apq.Cfg.Validation.ConfigValidationBuilder.Range(System.String,System.Double,System.Double,System.String)">
+  Range(string, double, double, string?)
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>添加双精度浮点数范围验证规则</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public ConfigValidationBuilder Range(string key, double min, double max, string? errorMessage = null)</code></pre>
+  </div>
+
+  <h4 class="section">Parameters</h4>
+  <dl class="parameters">
+    <dt><code>key</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd><p>配置键</p>
+</dd>
+    <dt><code>min</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a></dt>
+    <dd><p>最小值</p>
+</dd>
+    <dt><code>max</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a></dt>
+    <dd><p>最大值</p>
+</dd>
+    <dt><code>errorMessage</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd><p>自定义错误消息</p>
+</dd>
+  </dl>
+
+  <h4 class="section">Returns</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="Apq.Cfg.Validation.ConfigValidationBuilder.html">ConfigValidationBuilder</a></dt>
+    <dd><p>构建器实例,支持链式调用</p>
+</dd>
+  </dl>
+
+
+
+
+
+
+
+
+
+
+
+  <a id="Apq_Cfg_Validation_ConfigValidationBuilder_Range_" data-uid="Apq.Cfg.Validation.ConfigValidationBuilder.Range*"></a>
+
+  <h3 id="Apq_Cfg_Validation_ConfigValidationBuilder_Range_System_String_System_Int32_System_Int32_System_String_" data-uid="Apq.Cfg.Validation.ConfigValidationBuilder.Range(System.String,System.Int32,System.Int32,System.String)">
+  Range(string, int, int, string?)
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>添加整数范围验证规则</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public ConfigValidationBuilder Range(string key, int min, int max, string? errorMessage = null)</code></pre>
+  </div>
+
+  <h4 class="section">Parameters</h4>
+  <dl class="parameters">
+    <dt><code>key</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd><p>配置键</p>
+</dd>
+    <dt><code>min</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
+    <dd><p>最小值</p>
+</dd>
+    <dt><code>max</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
+    <dd><p>最大值</p>
+</dd>
+    <dt><code>errorMessage</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd><p>自定义错误消息</p>
+</dd>
+  </dl>
+
+  <h4 class="section">Returns</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="Apq.Cfg.Validation.ConfigValidationBuilder.html">ConfigValidationBuilder</a></dt>
+    <dd><p>构建器实例,支持链式调用</p>
+</dd>
+  </dl>
+
+
+
+
+
+
+
+
+
+
+
+  <a id="Apq_Cfg_Validation_ConfigValidationBuilder_Range_" data-uid="Apq.Cfg.Validation.ConfigValidationBuilder.Range*"></a>
+
+  <h3 id="Apq_Cfg_Validation_ConfigValidationBuilder_Range_System_String_System_Int64_System_Int64_System_String_" data-uid="Apq.Cfg.Validation.ConfigValidationBuilder.Range(System.String,System.Int64,System.Int64,System.String)">
+  Range(string, long, long, string?)
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>添加长整数范围验证规则</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public ConfigValidationBuilder Range(string key, long min, long max, string? errorMessage = null)</code></pre>
+  </div>
+
+  <h4 class="section">Parameters</h4>
+  <dl class="parameters">
+    <dt><code>key</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd><p>配置键</p>
+</dd>
+    <dt><code>min</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int64">long</a></dt>
+    <dd><p>最小值</p>
+</dd>
+    <dt><code>max</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int64">long</a></dt>
+    <dd><p>最大值</p>
+</dd>
+    <dt><code>errorMessage</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd><p>自定义错误消息</p>
+</dd>
+  </dl>
+
+  <h4 class="section">Returns</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="Apq.Cfg.Validation.ConfigValidationBuilder.html">ConfigValidationBuilder</a></dt>
+    <dd><p>构建器实例,支持链式调用</p>
+</dd>
+  </dl>
+
+
+
+
+
+
+
+
+
+
+
+  <a id="Apq_Cfg_Validation_ConfigValidationBuilder_Regex_" data-uid="Apq.Cfg.Validation.ConfigValidationBuilder.Regex*"></a>
+
+  <h3 id="Apq_Cfg_Validation_ConfigValidationBuilder_Regex_System_String_System_String_System_String_System_Text_RegularExpressions_RegexOptions_" data-uid="Apq.Cfg.Validation.ConfigValidationBuilder.Regex(System.String,System.String,System.String,System.Text.RegularExpressions.RegexOptions)">
+  Regex(string, string, string?, RegexOptions)
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>添加正则表达式验证规则</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public ConfigValidationBuilder Regex(string key, string pattern, string? errorMessage = null, RegexOptions options = RegexOptions.None)</code></pre>
+  </div>
+
+  <h4 class="section">Parameters</h4>
+  <dl class="parameters">
+    <dt><code>key</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd><p>配置键</p>
+</dd>
+    <dt><code>pattern</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd><p>正则表达式模式</p>
+</dd>
+    <dt><code>errorMessage</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd><p>自定义错误消息</p>
+</dd>
+    <dt><code>options</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.text.regularexpressions.regexoptions">RegexOptions</a></dt>
+    <dd><p>正则表达式选项</p>
+</dd>
+  </dl>
+
+  <h4 class="section">Returns</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="Apq.Cfg.Validation.ConfigValidationBuilder.html">ConfigValidationBuilder</a></dt>
+    <dd><p>构建器实例,支持链式调用</p>
+</dd>
+  </dl>
+
+
+
+
+
+
+
+
+
+
+
+  <a id="Apq_Cfg_Validation_ConfigValidationBuilder_Required_" data-uid="Apq.Cfg.Validation.ConfigValidationBuilder.Required*"></a>
+
+  <h3 id="Apq_Cfg_Validation_ConfigValidationBuilder_Required_System_String_System_String_" data-uid="Apq.Cfg.Validation.ConfigValidationBuilder.Required(System.String,System.String)">
+  Required(string, string?)
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>添加必填验证规则</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public ConfigValidationBuilder Required(string key, string? errorMessage = null)</code></pre>
+  </div>
+
+  <h4 class="section">Parameters</h4>
+  <dl class="parameters">
+    <dt><code>key</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd><p>配置键</p>
+</dd>
+    <dt><code>errorMessage</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd><p>自定义错误消息</p>
+</dd>
+  </dl>
+
+  <h4 class="section">Returns</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="Apq.Cfg.Validation.ConfigValidationBuilder.html">ConfigValidationBuilder</a></dt>
+    <dd><p>构建器实例,支持链式调用</p>
+</dd>
+  </dl>
+
+
+
+
+
+
+
+
+
+
+
+  <a id="Apq_Cfg_Validation_ConfigValidationBuilder_Required_" data-uid="Apq.Cfg.Validation.ConfigValidationBuilder.Required*"></a>
+
+  <h3 id="Apq_Cfg_Validation_ConfigValidationBuilder_Required_System_String___" data-uid="Apq.Cfg.Validation.ConfigValidationBuilder.Required(System.String[])">
+  Required(params string[])
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>添加多个必填验证规则</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public ConfigValidationBuilder Required(params string[] keys)</code></pre>
+  </div>
+
+  <h4 class="section">Parameters</h4>
+  <dl class="parameters">
+    <dt><code>keys</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a>[]</dt>
+    <dd><p>配置键列表</p>
+</dd>
+  </dl>
+
+  <h4 class="section">Returns</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="Apq.Cfg.Validation.ConfigValidationBuilder.html">ConfigValidationBuilder</a></dt>
+    <dd><p>构建器实例,支持链式调用</p>
+</dd>
+  </dl>
+
+
+
+
+
+
+
+
+
+
+
+
+</article>
+
+
+
+      </div>
+
+      <div class="affix">
+        <nav id="affix"></nav>
+      </div>
+    </main>
+
+    <div class="container-xxl search-results" id="search-results"></div>
+
+    <footer class="border-top text-secondary">
+      <div class="container-xxl">
+        <div class="flex-fill">
+          Apq.Cfg - .NET 统一配置组件库 (基于 .NET 10.0,兼容 .NET 8.0)
+        </div>
+      </div>
+    </footer>
+  </body>
+</html>

+ 346 - 0
docs/site/public/api-reference/api/Apq.Cfg.Validation.ConfigValidationException.html

@@ -0,0 +1,346 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8">
+      <title>Class ConfigValidationException | Apq.Cfg API </title>
+      <meta name="viewport" content="width=device-width, initial-scale=1.0">
+      <meta name="title" content="Class ConfigValidationException | Apq.Cfg API ">
+      
+      <meta name="description" content="配置验证异常">
+      <link rel="icon" href="../favicon.svg">
+      <link rel="stylesheet" href="../public/docfx.min.css">
+      <link rel="stylesheet" href="../public/main.css">
+      <meta name="docfx:navrel" content="../toc.html">
+      <meta name="docfx:tocrel" content="toc.html">
+      
+      <meta name="docfx:rel" content="../">
+      
+      
+      
+      <meta name="loc:inThisArticle" content="In this article">
+      <meta name="loc:searchResultsCount" content="{count} results for &quot;{query}&quot;">
+      <meta name="loc:searchNoResults" content="No results for &quot;{query}&quot;">
+      <meta name="loc:tocFilter" content="Filter by title">
+      <meta name="loc:nextArticle" content="Next">
+      <meta name="loc:prevArticle" content="Previous">
+      <meta name="loc:themeLight" content="Light">
+      <meta name="loc:themeDark" content="Dark">
+      <meta name="loc:themeAuto" content="Auto">
+      <meta name="loc:changeTheme" content="Change theme">
+      <meta name="loc:copy" content="Copy">
+      <meta name="loc:downloadPdf" content="Download PDF">
+
+      <script type="module" src="./../public/docfx.min.js"></script>
+
+      <script>
+        const theme = localStorage.getItem('theme') || 'auto'
+        document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
+      </script>
+
+  </head>
+
+  <body class="tex2jax_ignore" data-layout="" data-yaml-mime="ManagedReference">
+    <header class="bg-body border-bottom">
+      <nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
+        <div class="container-xxl flex-nowrap">
+          <a class="navbar-brand" href="../index.html">
+            <img id="logo" class="svg" src="../images/logo-small.svg" alt="Apq.Cfg">
+            Apq.Cfg
+          </a>
+          <button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
+            <i class="bi bi-three-dots"></i>
+          </button>
+          <div class="collapse navbar-collapse" id="navpanel">
+            <div id="navbar">
+              <form class="search" role="search" id="search">
+                <i class="bi bi-search"></i>
+                <input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
+              </form>
+            </div>
+          </div>
+        </div>
+      </nav>
+    </header>
+
+    <main class="container-xxl">
+      <div class="toc-offcanvas">
+        <div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
+          <div class="offcanvas-header">
+            <h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
+            <button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
+          </div>
+          <div class="offcanvas-body">
+            <nav class="toc" id="toc"></nav>
+          </div>
+        </div>
+      </div>
+
+      <div class="content">
+        <div class="actionbar">
+          <button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
+            <i class="bi bi-list"></i>
+          </button>
+
+          <nav id="breadcrumb"></nav>
+        </div>
+
+        <article data-uid="Apq.Cfg.Validation.ConfigValidationException">
+
+
+
+  <h1 id="Apq_Cfg_Validation_ConfigValidationException" data-uid="Apq.Cfg.Validation.ConfigValidationException" class="text-break">
+Class ConfigValidationException  
+  </h1>
+
+  <div class="facts text-secondary">
+    <dl><dt>Namespace</dt><dd><a class="xref" href="Apq.html">Apq</a>.<a class="xref" href="Apq.Cfg.html">Cfg</a>.<a class="xref" href="Apq.Cfg.Validation.html">Validation</a></dd></dl>
+  <dl><dt>Assembly</dt><dd>Apq.Cfg.dll</dd></dl>
+  </div>
+
+  <div class="markdown summary"><p>配置验证异常</p>
+</div>
+  <div class="markdown conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public sealed class ConfigValidationException : Exception, ISerializable</code></pre>
+  </div>
+
+
+
+
+  <dl class="typelist inheritance">
+    <dt>Inheritance</dt>
+    <dd>
+      <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
+      <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.exception">Exception</a></div>
+      <div><span class="xref">ConfigValidationException</span></div>
+    </dd>
+  </dl>
+
+  <dl class="typelist implements">
+    <dt>Implements</dt>
+    <dd>
+      <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.runtime.serialization.iserializable">ISerializable</a></div>
+    </dd>
+  </dl>
+
+
+  <dl class="typelist inheritedMembers">
+    <dt>Inherited Members</dt>
+    <dd>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.exception.getbaseexception">Exception.GetBaseException()</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.exception.gettype">Exception.GetType()</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.exception.tostring">Exception.ToString()</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.exception.data">Exception.Data</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.exception.helplink">Exception.HelpLink</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.exception.hresult">Exception.HResult</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.exception.innerexception">Exception.InnerException</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.exception.message">Exception.Message</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.exception.source">Exception.Source</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.exception.stacktrace">Exception.StackTrace</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.exception.targetsite">Exception.TargetSite</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object)</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object, object)</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object, object)</a>
+    </div>
+  </dd></dl>
+
+
+
+
+
+
+  <h2 class="section" id="constructors">Constructors
+</h2>
+
+
+  <a id="Apq_Cfg_Validation_ConfigValidationException__ctor_" data-uid="Apq.Cfg.Validation.ConfigValidationException.#ctor*"></a>
+
+  <h3 id="Apq_Cfg_Validation_ConfigValidationException__ctor_Apq_Cfg_Validation_ValidationResult_" data-uid="Apq.Cfg.Validation.ConfigValidationException.#ctor(Apq.Cfg.Validation.ValidationResult)">
+  ConfigValidationException(ValidationResult)
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>创建配置验证异常</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public ConfigValidationException(ValidationResult result)</code></pre>
+  </div>
+
+  <h4 class="section">Parameters</h4>
+  <dl class="parameters">
+    <dt><code>result</code> <a class="xref" href="Apq.Cfg.Validation.ValidationResult.html">ValidationResult</a></dt>
+    <dd><p>验证结果</p>
+</dd>
+  </dl>
+
+
+
+
+
+
+
+
+
+
+
+
+  <a id="Apq_Cfg_Validation_ConfigValidationException__ctor_" data-uid="Apq.Cfg.Validation.ConfigValidationException.#ctor*"></a>
+
+  <h3 id="Apq_Cfg_Validation_ConfigValidationException__ctor_Apq_Cfg_Validation_ValidationResult_System_String_" data-uid="Apq.Cfg.Validation.ConfigValidationException.#ctor(Apq.Cfg.Validation.ValidationResult,System.String)">
+  ConfigValidationException(ValidationResult, string)
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>创建配置验证异常</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public ConfigValidationException(ValidationResult result, string message)</code></pre>
+  </div>
+
+  <h4 class="section">Parameters</h4>
+  <dl class="parameters">
+    <dt><code>result</code> <a class="xref" href="Apq.Cfg.Validation.ValidationResult.html">ValidationResult</a></dt>
+    <dd><p>验证结果</p>
+</dd>
+    <dt><code>message</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd><p>自定义消息</p>
+</dd>
+  </dl>
+
+
+
+
+
+
+
+
+
+
+
+
+  <h2 class="section" id="properties">Properties
+</h2>
+
+
+  <a id="Apq_Cfg_Validation_ConfigValidationException_Errors_" data-uid="Apq.Cfg.Validation.ConfigValidationException.Errors*"></a>
+
+  <h3 id="Apq_Cfg_Validation_ConfigValidationException_Errors" data-uid="Apq.Cfg.Validation.ConfigValidationException.Errors">
+  Errors
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>验证错误列表</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public IReadOnlyList&lt;ValidationError&gt; Errors { get; }</code></pre>
+  </div>
+
+
+
+
+
+  <h4 class="section">Property Value</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ireadonlylist-1">IReadOnlyList</a>&lt;<a class="xref" href="Apq.Cfg.Validation.ValidationError.html">ValidationError</a>&gt;</dt>
+    <dd></dd>
+  </dl>
+
+
+
+
+
+
+
+
+  <a id="Apq_Cfg_Validation_ConfigValidationException_ValidationResult_" data-uid="Apq.Cfg.Validation.ConfigValidationException.ValidationResult*"></a>
+
+  <h3 id="Apq_Cfg_Validation_ConfigValidationException_ValidationResult" data-uid="Apq.Cfg.Validation.ConfigValidationException.ValidationResult">
+  ValidationResult
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>验证结果</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public ValidationResult ValidationResult { get; }</code></pre>
+  </div>
+
+
+
+
+
+  <h4 class="section">Property Value</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="Apq.Cfg.Validation.ValidationResult.html">ValidationResult</a></dt>
+    <dd></dd>
+  </dl>
+
+
+
+
+
+
+
+
+
+</article>
+
+
+
+      </div>
+
+      <div class="affix">
+        <nav id="affix"></nav>
+      </div>
+    </main>
+
+    <div class="container-xxl search-results" id="search-results"></div>
+
+    <footer class="border-top text-secondary">
+      <div class="container-xxl">
+        <div class="flex-fill">
+          Apq.Cfg - .NET 统一配置组件库 (基于 .NET 10.0,兼容 .NET 8.0)
+        </div>
+      </div>
+    </footer>
+  </body>
+</html>

+ 293 - 0
docs/site/public/api-reference/api/Apq.Cfg.Validation.ConfigValidator.html

@@ -0,0 +1,293 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8">
+      <title>Class ConfigValidator | Apq.Cfg API </title>
+      <meta name="viewport" content="width=device-width, initial-scale=1.0">
+      <meta name="title" content="Class ConfigValidator | Apq.Cfg API ">
+      
+      <meta name="description" content="配置验证器实现">
+      <link rel="icon" href="../favicon.svg">
+      <link rel="stylesheet" href="../public/docfx.min.css">
+      <link rel="stylesheet" href="../public/main.css">
+      <meta name="docfx:navrel" content="../toc.html">
+      <meta name="docfx:tocrel" content="toc.html">
+      
+      <meta name="docfx:rel" content="../">
+      
+      
+      
+      <meta name="loc:inThisArticle" content="In this article">
+      <meta name="loc:searchResultsCount" content="{count} results for &quot;{query}&quot;">
+      <meta name="loc:searchNoResults" content="No results for &quot;{query}&quot;">
+      <meta name="loc:tocFilter" content="Filter by title">
+      <meta name="loc:nextArticle" content="Next">
+      <meta name="loc:prevArticle" content="Previous">
+      <meta name="loc:themeLight" content="Light">
+      <meta name="loc:themeDark" content="Dark">
+      <meta name="loc:themeAuto" content="Auto">
+      <meta name="loc:changeTheme" content="Change theme">
+      <meta name="loc:copy" content="Copy">
+      <meta name="loc:downloadPdf" content="Download PDF">
+
+      <script type="module" src="./../public/docfx.min.js"></script>
+
+      <script>
+        const theme = localStorage.getItem('theme') || 'auto'
+        document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
+      </script>
+
+  </head>
+
+  <body class="tex2jax_ignore" data-layout="" data-yaml-mime="ManagedReference">
+    <header class="bg-body border-bottom">
+      <nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
+        <div class="container-xxl flex-nowrap">
+          <a class="navbar-brand" href="../index.html">
+            <img id="logo" class="svg" src="../images/logo-small.svg" alt="Apq.Cfg">
+            Apq.Cfg
+          </a>
+          <button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
+            <i class="bi bi-three-dots"></i>
+          </button>
+          <div class="collapse navbar-collapse" id="navpanel">
+            <div id="navbar">
+              <form class="search" role="search" id="search">
+                <i class="bi bi-search"></i>
+                <input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
+              </form>
+            </div>
+          </div>
+        </div>
+      </nav>
+    </header>
+
+    <main class="container-xxl">
+      <div class="toc-offcanvas">
+        <div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
+          <div class="offcanvas-header">
+            <h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
+            <button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
+          </div>
+          <div class="offcanvas-body">
+            <nav class="toc" id="toc"></nav>
+          </div>
+        </div>
+      </div>
+
+      <div class="content">
+        <div class="actionbar">
+          <button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
+            <i class="bi bi-list"></i>
+          </button>
+
+          <nav id="breadcrumb"></nav>
+        </div>
+
+        <article data-uid="Apq.Cfg.Validation.ConfigValidator">
+
+
+
+  <h1 id="Apq_Cfg_Validation_ConfigValidator" data-uid="Apq.Cfg.Validation.ConfigValidator" class="text-break">
+Class ConfigValidator  
+  </h1>
+
+  <div class="facts text-secondary">
+    <dl><dt>Namespace</dt><dd><a class="xref" href="Apq.html">Apq</a>.<a class="xref" href="Apq.Cfg.html">Cfg</a>.<a class="xref" href="Apq.Cfg.Validation.html">Validation</a></dd></dl>
+  <dl><dt>Assembly</dt><dd>Apq.Cfg.dll</dd></dl>
+  </div>
+
+  <div class="markdown summary"><p>配置验证器实现</p>
+</div>
+  <div class="markdown conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public sealed class ConfigValidator : IConfigValidator</code></pre>
+  </div>
+
+
+
+
+  <dl class="typelist inheritance">
+    <dt>Inheritance</dt>
+    <dd>
+      <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
+      <div><span class="xref">ConfigValidator</span></div>
+    </dd>
+  </dl>
+
+  <dl class="typelist implements">
+    <dt>Implements</dt>
+    <dd>
+      <div><a class="xref" href="Apq.Cfg.Validation.IConfigValidator.html">IConfigValidator</a></div>
+    </dd>
+  </dl>
+
+
+  <dl class="typelist inheritedMembers">
+    <dt>Inherited Members</dt>
+    <dd>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object)</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object, object)</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object, object)</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>
+    </div>
+  </dd></dl>
+
+
+
+
+
+
+  <h2 class="section" id="constructors">Constructors
+</h2>
+
+
+  <a id="Apq_Cfg_Validation_ConfigValidator__ctor_" data-uid="Apq.Cfg.Validation.ConfigValidator.#ctor*"></a>
+
+  <h3 id="Apq_Cfg_Validation_ConfigValidator__ctor_System_Collections_Generic_IEnumerable_Apq_Cfg_Validation_IValidationRule__" data-uid="Apq.Cfg.Validation.ConfigValidator.#ctor(System.Collections.Generic.IEnumerable{Apq.Cfg.Validation.IValidationRule})">
+  ConfigValidator(IEnumerable&lt;IValidationRule&gt;)
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>创建配置验证器</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public ConfigValidator(IEnumerable&lt;IValidationRule&gt; rules)</code></pre>
+  </div>
+
+  <h4 class="section">Parameters</h4>
+  <dl class="parameters">
+    <dt><code>rules</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1">IEnumerable</a>&lt;<a class="xref" href="Apq.Cfg.Validation.IValidationRule.html">IValidationRule</a>&gt;</dt>
+    <dd><p>验证规则列表</p>
+</dd>
+  </dl>
+
+
+
+
+
+
+
+
+
+
+
+
+  <h2 class="section" id="properties">Properties
+</h2>
+
+
+  <a id="Apq_Cfg_Validation_ConfigValidator_Rules_" data-uid="Apq.Cfg.Validation.ConfigValidator.Rules*"></a>
+
+  <h3 id="Apq_Cfg_Validation_ConfigValidator_Rules" data-uid="Apq.Cfg.Validation.ConfigValidator.Rules">
+  Rules
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>获取所有验证规则</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public IReadOnlyList&lt;IValidationRule&gt; Rules { get; }</code></pre>
+  </div>
+
+
+
+
+
+  <h4 class="section">Property Value</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ireadonlylist-1">IReadOnlyList</a>&lt;<a class="xref" href="Apq.Cfg.Validation.IValidationRule.html">IValidationRule</a>&gt;</dt>
+    <dd></dd>
+  </dl>
+
+
+
+
+
+
+
+
+  <h2 class="section" id="methods">Methods
+</h2>
+
+
+  <a id="Apq_Cfg_Validation_ConfigValidator_Validate_" data-uid="Apq.Cfg.Validation.ConfigValidator.Validate*"></a>
+
+  <h3 id="Apq_Cfg_Validation_ConfigValidator_Validate_Apq_Cfg_ICfgRoot_" data-uid="Apq.Cfg.Validation.ConfigValidator.Validate(Apq.Cfg.ICfgRoot)">
+  Validate(ICfgRoot)
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>验证配置</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public ValidationResult Validate(ICfgRoot cfg)</code></pre>
+  </div>
+
+  <h4 class="section">Parameters</h4>
+  <dl class="parameters">
+    <dt><code>cfg</code> <a class="xref" href="Apq.Cfg.ICfgRoot.html">ICfgRoot</a></dt>
+    <dd><p>配置根</p>
+</dd>
+  </dl>
+
+  <h4 class="section">Returns</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="Apq.Cfg.Validation.ValidationResult.html">ValidationResult</a></dt>
+    <dd><p>验证结果</p>
+</dd>
+  </dl>
+
+
+
+
+
+
+
+
+
+
+
+
+</article>
+
+
+
+      </div>
+
+      <div class="affix">
+        <nav id="affix"></nav>
+      </div>
+    </main>
+
+    <div class="container-xxl search-results" id="search-results"></div>
+
+    <footer class="border-top text-secondary">
+      <div class="container-xxl">
+        <div class="flex-fill">
+          Apq.Cfg - .NET 统一配置组件库 (基于 .NET 10.0,兼容 .NET 8.0)
+        </div>
+      </div>
+    </footer>
+  </body>
+</html>

+ 221 - 0
docs/site/public/api-reference/api/Apq.Cfg.Validation.IConfigValidator.html

@@ -0,0 +1,221 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8">
+      <title>Interface IConfigValidator | Apq.Cfg API </title>
+      <meta name="viewport" content="width=device-width, initial-scale=1.0">
+      <meta name="title" content="Interface IConfigValidator | Apq.Cfg API ">
+      
+      <meta name="description" content="配置验证器接口">
+      <link rel="icon" href="../favicon.svg">
+      <link rel="stylesheet" href="../public/docfx.min.css">
+      <link rel="stylesheet" href="../public/main.css">
+      <meta name="docfx:navrel" content="../toc.html">
+      <meta name="docfx:tocrel" content="toc.html">
+      
+      <meta name="docfx:rel" content="../">
+      
+      
+      
+      <meta name="loc:inThisArticle" content="In this article">
+      <meta name="loc:searchResultsCount" content="{count} results for &quot;{query}&quot;">
+      <meta name="loc:searchNoResults" content="No results for &quot;{query}&quot;">
+      <meta name="loc:tocFilter" content="Filter by title">
+      <meta name="loc:nextArticle" content="Next">
+      <meta name="loc:prevArticle" content="Previous">
+      <meta name="loc:themeLight" content="Light">
+      <meta name="loc:themeDark" content="Dark">
+      <meta name="loc:themeAuto" content="Auto">
+      <meta name="loc:changeTheme" content="Change theme">
+      <meta name="loc:copy" content="Copy">
+      <meta name="loc:downloadPdf" content="Download PDF">
+
+      <script type="module" src="./../public/docfx.min.js"></script>
+
+      <script>
+        const theme = localStorage.getItem('theme') || 'auto'
+        document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
+      </script>
+
+  </head>
+
+  <body class="tex2jax_ignore" data-layout="" data-yaml-mime="ManagedReference">
+    <header class="bg-body border-bottom">
+      <nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
+        <div class="container-xxl flex-nowrap">
+          <a class="navbar-brand" href="../index.html">
+            <img id="logo" class="svg" src="../images/logo-small.svg" alt="Apq.Cfg">
+            Apq.Cfg
+          </a>
+          <button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
+            <i class="bi bi-three-dots"></i>
+          </button>
+          <div class="collapse navbar-collapse" id="navpanel">
+            <div id="navbar">
+              <form class="search" role="search" id="search">
+                <i class="bi bi-search"></i>
+                <input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
+              </form>
+            </div>
+          </div>
+        </div>
+      </nav>
+    </header>
+
+    <main class="container-xxl">
+      <div class="toc-offcanvas">
+        <div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
+          <div class="offcanvas-header">
+            <h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
+            <button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
+          </div>
+          <div class="offcanvas-body">
+            <nav class="toc" id="toc"></nav>
+          </div>
+        </div>
+      </div>
+
+      <div class="content">
+        <div class="actionbar">
+          <button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
+            <i class="bi bi-list"></i>
+          </button>
+
+          <nav id="breadcrumb"></nav>
+        </div>
+
+        <article data-uid="Apq.Cfg.Validation.IConfigValidator">
+
+
+
+  <h1 id="Apq_Cfg_Validation_IConfigValidator" data-uid="Apq.Cfg.Validation.IConfigValidator" class="text-break">
+Interface IConfigValidator  
+  </h1>
+
+  <div class="facts text-secondary">
+    <dl><dt>Namespace</dt><dd><a class="xref" href="Apq.html">Apq</a>.<a class="xref" href="Apq.Cfg.html">Cfg</a>.<a class="xref" href="Apq.Cfg.Validation.html">Validation</a></dd></dl>
+  <dl><dt>Assembly</dt><dd>Apq.Cfg.dll</dd></dl>
+  </div>
+
+  <div class="markdown summary"><p>配置验证器接口</p>
+</div>
+  <div class="markdown conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public interface IConfigValidator</code></pre>
+  </div>
+
+
+
+
+
+
+
+
+
+
+
+
+
+  <h2 class="section" id="properties">Properties
+</h2>
+
+
+  <a id="Apq_Cfg_Validation_IConfigValidator_Rules_" data-uid="Apq.Cfg.Validation.IConfigValidator.Rules*"></a>
+
+  <h3 id="Apq_Cfg_Validation_IConfigValidator_Rules" data-uid="Apq.Cfg.Validation.IConfigValidator.Rules">
+  Rules
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>获取所有验证规则</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">IReadOnlyList&lt;IValidationRule&gt; Rules { get; }</code></pre>
+  </div>
+
+
+
+
+
+  <h4 class="section">Property Value</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ireadonlylist-1">IReadOnlyList</a>&lt;<a class="xref" href="Apq.Cfg.Validation.IValidationRule.html">IValidationRule</a>&gt;</dt>
+    <dd></dd>
+  </dl>
+
+
+
+
+
+
+
+
+  <h2 class="section" id="methods">Methods
+</h2>
+
+
+  <a id="Apq_Cfg_Validation_IConfigValidator_Validate_" data-uid="Apq.Cfg.Validation.IConfigValidator.Validate*"></a>
+
+  <h3 id="Apq_Cfg_Validation_IConfigValidator_Validate_Apq_Cfg_ICfgRoot_" data-uid="Apq.Cfg.Validation.IConfigValidator.Validate(Apq.Cfg.ICfgRoot)">
+  Validate(ICfgRoot)
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>验证配置</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">ValidationResult Validate(ICfgRoot cfg)</code></pre>
+  </div>
+
+  <h4 class="section">Parameters</h4>
+  <dl class="parameters">
+    <dt><code>cfg</code> <a class="xref" href="Apq.Cfg.ICfgRoot.html">ICfgRoot</a></dt>
+    <dd><p>配置根</p>
+</dd>
+  </dl>
+
+  <h4 class="section">Returns</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="Apq.Cfg.Validation.ValidationResult.html">ValidationResult</a></dt>
+    <dd><p>验证结果</p>
+</dd>
+  </dl>
+
+
+
+
+
+
+
+
+
+
+
+
+</article>
+
+
+
+      </div>
+
+      <div class="affix">
+        <nav id="affix"></nav>
+      </div>
+    </main>
+
+    <div class="container-xxl search-results" id="search-results"></div>
+
+    <footer class="border-top text-secondary">
+      <div class="container-xxl">
+        <div class="flex-fill">
+          Apq.Cfg - .NET 统一配置组件库 (基于 .NET 10.0,兼容 .NET 8.0)
+        </div>
+      </div>
+    </footer>
+  </body>
+</html>

+ 253 - 0
docs/site/public/api-reference/api/Apq.Cfg.Validation.IValidationRule.html

@@ -0,0 +1,253 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8">
+      <title>Interface IValidationRule | Apq.Cfg API </title>
+      <meta name="viewport" content="width=device-width, initial-scale=1.0">
+      <meta name="title" content="Interface IValidationRule | Apq.Cfg API ">
+      
+      <meta name="description" content="配置验证规则接口">
+      <link rel="icon" href="../favicon.svg">
+      <link rel="stylesheet" href="../public/docfx.min.css">
+      <link rel="stylesheet" href="../public/main.css">
+      <meta name="docfx:navrel" content="../toc.html">
+      <meta name="docfx:tocrel" content="toc.html">
+      
+      <meta name="docfx:rel" content="../">
+      
+      
+      
+      <meta name="loc:inThisArticle" content="In this article">
+      <meta name="loc:searchResultsCount" content="{count} results for &quot;{query}&quot;">
+      <meta name="loc:searchNoResults" content="No results for &quot;{query}&quot;">
+      <meta name="loc:tocFilter" content="Filter by title">
+      <meta name="loc:nextArticle" content="Next">
+      <meta name="loc:prevArticle" content="Previous">
+      <meta name="loc:themeLight" content="Light">
+      <meta name="loc:themeDark" content="Dark">
+      <meta name="loc:themeAuto" content="Auto">
+      <meta name="loc:changeTheme" content="Change theme">
+      <meta name="loc:copy" content="Copy">
+      <meta name="loc:downloadPdf" content="Download PDF">
+
+      <script type="module" src="./../public/docfx.min.js"></script>
+
+      <script>
+        const theme = localStorage.getItem('theme') || 'auto'
+        document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
+      </script>
+
+  </head>
+
+  <body class="tex2jax_ignore" data-layout="" data-yaml-mime="ManagedReference">
+    <header class="bg-body border-bottom">
+      <nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
+        <div class="container-xxl flex-nowrap">
+          <a class="navbar-brand" href="../index.html">
+            <img id="logo" class="svg" src="../images/logo-small.svg" alt="Apq.Cfg">
+            Apq.Cfg
+          </a>
+          <button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
+            <i class="bi bi-three-dots"></i>
+          </button>
+          <div class="collapse navbar-collapse" id="navpanel">
+            <div id="navbar">
+              <form class="search" role="search" id="search">
+                <i class="bi bi-search"></i>
+                <input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
+              </form>
+            </div>
+          </div>
+        </div>
+      </nav>
+    </header>
+
+    <main class="container-xxl">
+      <div class="toc-offcanvas">
+        <div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
+          <div class="offcanvas-header">
+            <h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
+            <button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
+          </div>
+          <div class="offcanvas-body">
+            <nav class="toc" id="toc"></nav>
+          </div>
+        </div>
+      </div>
+
+      <div class="content">
+        <div class="actionbar">
+          <button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
+            <i class="bi bi-list"></i>
+          </button>
+
+          <nav id="breadcrumb"></nav>
+        </div>
+
+        <article data-uid="Apq.Cfg.Validation.IValidationRule">
+
+
+
+  <h1 id="Apq_Cfg_Validation_IValidationRule" data-uid="Apq.Cfg.Validation.IValidationRule" class="text-break">
+Interface IValidationRule  
+  </h1>
+
+  <div class="facts text-secondary">
+    <dl><dt>Namespace</dt><dd><a class="xref" href="Apq.html">Apq</a>.<a class="xref" href="Apq.Cfg.html">Cfg</a>.<a class="xref" href="Apq.Cfg.Validation.html">Validation</a></dd></dl>
+  <dl><dt>Assembly</dt><dd>Apq.Cfg.dll</dd></dl>
+  </div>
+
+  <div class="markdown summary"><p>配置验证规则接口</p>
+</div>
+  <div class="markdown conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public interface IValidationRule</code></pre>
+  </div>
+
+
+
+
+
+
+
+
+
+
+
+
+
+  <h2 class="section" id="properties">Properties
+</h2>
+
+
+  <a id="Apq_Cfg_Validation_IValidationRule_Key_" data-uid="Apq.Cfg.Validation.IValidationRule.Key*"></a>
+
+  <h3 id="Apq_Cfg_Validation_IValidationRule_Key" data-uid="Apq.Cfg.Validation.IValidationRule.Key">
+  Key
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>要验证的配置键</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">string Key { get; }</code></pre>
+  </div>
+
+
+
+
+
+  <h4 class="section">Property Value</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd></dd>
+  </dl>
+
+
+
+
+
+
+
+
+  <a id="Apq_Cfg_Validation_IValidationRule_Name_" data-uid="Apq.Cfg.Validation.IValidationRule.Name*"></a>
+
+  <h3 id="Apq_Cfg_Validation_IValidationRule_Name" data-uid="Apq.Cfg.Validation.IValidationRule.Name">
+  Name
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>规则名称</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">string Name { get; }</code></pre>
+  </div>
+
+
+
+
+
+  <h4 class="section">Property Value</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd></dd>
+  </dl>
+
+
+
+
+
+
+
+
+  <h2 class="section" id="methods">Methods
+</h2>
+
+
+  <a id="Apq_Cfg_Validation_IValidationRule_Validate_" data-uid="Apq.Cfg.Validation.IValidationRule.Validate*"></a>
+
+  <h3 id="Apq_Cfg_Validation_IValidationRule_Validate_System_String_" data-uid="Apq.Cfg.Validation.IValidationRule.Validate(System.String)">
+  Validate(string?)
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>验证配置值</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">ValidationError? Validate(string? value)</code></pre>
+  </div>
+
+  <h4 class="section">Parameters</h4>
+  <dl class="parameters">
+    <dt><code>value</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd><p>配置值</p>
+</dd>
+  </dl>
+
+  <h4 class="section">Returns</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="Apq.Cfg.Validation.ValidationError.html">ValidationError</a></dt>
+    <dd><p>验证错误,如果验证通过返回 null</p>
+</dd>
+  </dl>
+
+
+
+
+
+
+
+
+
+
+
+
+</article>
+
+
+
+      </div>
+
+      <div class="affix">
+        <nav id="affix"></nav>
+      </div>
+    </main>
+
+    <div class="container-xxl search-results" id="search-results"></div>
+
+    <footer class="border-top text-secondary">
+      <div class="container-xxl">
+        <div class="flex-fill">
+          Apq.Cfg - .NET 统一配置组件库 (基于 .NET 10.0,兼容 .NET 8.0)
+        </div>
+      </div>
+    </footer>
+  </body>
+</html>

+ 366 - 0
docs/site/public/api-reference/api/Apq.Cfg.Validation.Rules.CustomRule.html

@@ -0,0 +1,366 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8">
+      <title>Class CustomRule | Apq.Cfg API </title>
+      <meta name="viewport" content="width=device-width, initial-scale=1.0">
+      <meta name="title" content="Class CustomRule | Apq.Cfg API ">
+      
+      <meta name="description" content="自定义验证规则">
+      <link rel="icon" href="../favicon.svg">
+      <link rel="stylesheet" href="../public/docfx.min.css">
+      <link rel="stylesheet" href="../public/main.css">
+      <meta name="docfx:navrel" content="../toc.html">
+      <meta name="docfx:tocrel" content="toc.html">
+      
+      <meta name="docfx:rel" content="../">
+      
+      
+      
+      <meta name="loc:inThisArticle" content="In this article">
+      <meta name="loc:searchResultsCount" content="{count} results for &quot;{query}&quot;">
+      <meta name="loc:searchNoResults" content="No results for &quot;{query}&quot;">
+      <meta name="loc:tocFilter" content="Filter by title">
+      <meta name="loc:nextArticle" content="Next">
+      <meta name="loc:prevArticle" content="Previous">
+      <meta name="loc:themeLight" content="Light">
+      <meta name="loc:themeDark" content="Dark">
+      <meta name="loc:themeAuto" content="Auto">
+      <meta name="loc:changeTheme" content="Change theme">
+      <meta name="loc:copy" content="Copy">
+      <meta name="loc:downloadPdf" content="Download PDF">
+
+      <script type="module" src="./../public/docfx.min.js"></script>
+
+      <script>
+        const theme = localStorage.getItem('theme') || 'auto'
+        document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
+      </script>
+
+  </head>
+
+  <body class="tex2jax_ignore" data-layout="" data-yaml-mime="ManagedReference">
+    <header class="bg-body border-bottom">
+      <nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
+        <div class="container-xxl flex-nowrap">
+          <a class="navbar-brand" href="../index.html">
+            <img id="logo" class="svg" src="../images/logo-small.svg" alt="Apq.Cfg">
+            Apq.Cfg
+          </a>
+          <button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
+            <i class="bi bi-three-dots"></i>
+          </button>
+          <div class="collapse navbar-collapse" id="navpanel">
+            <div id="navbar">
+              <form class="search" role="search" id="search">
+                <i class="bi bi-search"></i>
+                <input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
+              </form>
+            </div>
+          </div>
+        </div>
+      </nav>
+    </header>
+
+    <main class="container-xxl">
+      <div class="toc-offcanvas">
+        <div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
+          <div class="offcanvas-header">
+            <h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
+            <button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
+          </div>
+          <div class="offcanvas-body">
+            <nav class="toc" id="toc"></nav>
+          </div>
+        </div>
+      </div>
+
+      <div class="content">
+        <div class="actionbar">
+          <button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
+            <i class="bi bi-list"></i>
+          </button>
+
+          <nav id="breadcrumb"></nav>
+        </div>
+
+        <article data-uid="Apq.Cfg.Validation.Rules.CustomRule">
+
+
+
+  <h1 id="Apq_Cfg_Validation_Rules_CustomRule" data-uid="Apq.Cfg.Validation.Rules.CustomRule" class="text-break">
+Class CustomRule  
+  </h1>
+
+  <div class="facts text-secondary">
+    <dl><dt>Namespace</dt><dd><a class="xref" href="Apq.html">Apq</a>.<a class="xref" href="Apq.Cfg.html">Cfg</a>.<a class="xref" href="Apq.Cfg.Validation.html">Validation</a>.<a class="xref" href="Apq.Cfg.Validation.Rules.html">Rules</a></dd></dl>
+  <dl><dt>Assembly</dt><dd>Apq.Cfg.dll</dd></dl>
+  </div>
+
+  <div class="markdown summary"><p>自定义验证规则</p>
+</div>
+  <div class="markdown conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public sealed class CustomRule : IValidationRule</code></pre>
+  </div>
+
+
+
+
+  <dl class="typelist inheritance">
+    <dt>Inheritance</dt>
+    <dd>
+      <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
+      <div><span class="xref">CustomRule</span></div>
+    </dd>
+  </dl>
+
+  <dl class="typelist implements">
+    <dt>Implements</dt>
+    <dd>
+      <div><a class="xref" href="Apq.Cfg.Validation.IValidationRule.html">IValidationRule</a></div>
+    </dd>
+  </dl>
+
+
+  <dl class="typelist inheritedMembers">
+    <dt>Inherited Members</dt>
+    <dd>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object)</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object, object)</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object, object)</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>
+    </div>
+  </dd></dl>
+
+
+
+
+
+
+  <h2 class="section" id="constructors">Constructors
+</h2>
+
+
+  <a id="Apq_Cfg_Validation_Rules_CustomRule__ctor_" data-uid="Apq.Cfg.Validation.Rules.CustomRule.#ctor*"></a>
+
+  <h3 id="Apq_Cfg_Validation_Rules_CustomRule__ctor_System_String_System_Func_System_String_System_Boolean__System_String_System_String_" data-uid="Apq.Cfg.Validation.Rules.CustomRule.#ctor(System.String,System.Func{System.String,System.Boolean},System.String,System.String)">
+  CustomRule(string, Func&lt;string?, bool&gt;, string, string?)
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>创建自定义验证规则</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public CustomRule(string key, Func&lt;string?, bool&gt; validator, string errorMessage, string? ruleName = null)</code></pre>
+  </div>
+
+  <h4 class="section">Parameters</h4>
+  <dl class="parameters">
+    <dt><code>key</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd><p>配置键</p>
+</dd>
+    <dt><code>validator</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.func-2">Func</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a>, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a>&gt;</dt>
+    <dd><p>验证函数,返回 true 表示验证通过</p>
+</dd>
+    <dt><code>errorMessage</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd><p>错误消息</p>
+</dd>
+    <dt><code>ruleName</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd><p>规则名称</p>
+</dd>
+  </dl>
+
+
+
+
+
+
+
+
+
+
+
+
+  <h2 class="section" id="properties">Properties
+</h2>
+
+
+  <a id="Apq_Cfg_Validation_Rules_CustomRule_ErrorMessage_" data-uid="Apq.Cfg.Validation.Rules.CustomRule.ErrorMessage*"></a>
+
+  <h3 id="Apq_Cfg_Validation_Rules_CustomRule_ErrorMessage" data-uid="Apq.Cfg.Validation.Rules.CustomRule.ErrorMessage">
+  ErrorMessage
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>错误消息</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public string ErrorMessage { get; }</code></pre>
+  </div>
+
+
+
+
+
+  <h4 class="section">Property Value</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd></dd>
+  </dl>
+
+
+
+
+
+
+
+
+  <a id="Apq_Cfg_Validation_Rules_CustomRule_Key_" data-uid="Apq.Cfg.Validation.Rules.CustomRule.Key*"></a>
+
+  <h3 id="Apq_Cfg_Validation_Rules_CustomRule_Key" data-uid="Apq.Cfg.Validation.Rules.CustomRule.Key">
+  Key
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>要验证的配置键</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public string Key { get; }</code></pre>
+  </div>
+
+
+
+
+
+  <h4 class="section">Property Value</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd></dd>
+  </dl>
+
+
+
+
+
+
+
+
+  <a id="Apq_Cfg_Validation_Rules_CustomRule_Name_" data-uid="Apq.Cfg.Validation.Rules.CustomRule.Name*"></a>
+
+  <h3 id="Apq_Cfg_Validation_Rules_CustomRule_Name" data-uid="Apq.Cfg.Validation.Rules.CustomRule.Name">
+  Name
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>规则名称</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public string Name { get; }</code></pre>
+  </div>
+
+
+
+
+
+  <h4 class="section">Property Value</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd></dd>
+  </dl>
+
+
+
+
+
+
+
+
+  <h2 class="section" id="methods">Methods
+</h2>
+
+
+  <a id="Apq_Cfg_Validation_Rules_CustomRule_Validate_" data-uid="Apq.Cfg.Validation.Rules.CustomRule.Validate*"></a>
+
+  <h3 id="Apq_Cfg_Validation_Rules_CustomRule_Validate_System_String_" data-uid="Apq.Cfg.Validation.Rules.CustomRule.Validate(System.String)">
+  Validate(string?)
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>验证配置值</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public ValidationError? Validate(string? value)</code></pre>
+  </div>
+
+  <h4 class="section">Parameters</h4>
+  <dl class="parameters">
+    <dt><code>value</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd><p>配置值</p>
+</dd>
+  </dl>
+
+  <h4 class="section">Returns</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="Apq.Cfg.Validation.ValidationError.html">ValidationError</a></dt>
+    <dd><p>验证错误,如果验证通过返回 null</p>
+</dd>
+  </dl>
+
+
+
+
+
+
+
+
+
+
+
+
+</article>
+
+
+
+      </div>
+
+      <div class="affix">
+        <nav id="affix"></nav>
+      </div>
+    </main>
+
+    <div class="container-xxl search-results" id="search-results"></div>
+
+    <footer class="border-top text-secondary">
+      <div class="container-xxl">
+        <div class="flex-fill">
+          Apq.Cfg - .NET 统一配置组件库 (基于 .NET 10.0,兼容 .NET 8.0)
+        </div>
+      </div>
+    </footer>
+  </body>
+</html>

+ 395 - 0
docs/site/public/api-reference/api/Apq.Cfg.Validation.Rules.DependsOnRule.html

@@ -0,0 +1,395 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8">
+      <title>Class DependsOnRule | Apq.Cfg API </title>
+      <meta name="viewport" content="width=device-width, initial-scale=1.0">
+      <meta name="title" content="Class DependsOnRule | Apq.Cfg API ">
+      
+      <meta name="description" content="依赖验证规则 - 当依赖键存在时,当前键也必须存在">
+      <link rel="icon" href="../favicon.svg">
+      <link rel="stylesheet" href="../public/docfx.min.css">
+      <link rel="stylesheet" href="../public/main.css">
+      <meta name="docfx:navrel" content="../toc.html">
+      <meta name="docfx:tocrel" content="toc.html">
+      
+      <meta name="docfx:rel" content="../">
+      
+      
+      
+      <meta name="loc:inThisArticle" content="In this article">
+      <meta name="loc:searchResultsCount" content="{count} results for &quot;{query}&quot;">
+      <meta name="loc:searchNoResults" content="No results for &quot;{query}&quot;">
+      <meta name="loc:tocFilter" content="Filter by title">
+      <meta name="loc:nextArticle" content="Next">
+      <meta name="loc:prevArticle" content="Previous">
+      <meta name="loc:themeLight" content="Light">
+      <meta name="loc:themeDark" content="Dark">
+      <meta name="loc:themeAuto" content="Auto">
+      <meta name="loc:changeTheme" content="Change theme">
+      <meta name="loc:copy" content="Copy">
+      <meta name="loc:downloadPdf" content="Download PDF">
+
+      <script type="module" src="./../public/docfx.min.js"></script>
+
+      <script>
+        const theme = localStorage.getItem('theme') || 'auto'
+        document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
+      </script>
+
+  </head>
+
+  <body class="tex2jax_ignore" data-layout="" data-yaml-mime="ManagedReference">
+    <header class="bg-body border-bottom">
+      <nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
+        <div class="container-xxl flex-nowrap">
+          <a class="navbar-brand" href="../index.html">
+            <img id="logo" class="svg" src="../images/logo-small.svg" alt="Apq.Cfg">
+            Apq.Cfg
+          </a>
+          <button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
+            <i class="bi bi-three-dots"></i>
+          </button>
+          <div class="collapse navbar-collapse" id="navpanel">
+            <div id="navbar">
+              <form class="search" role="search" id="search">
+                <i class="bi bi-search"></i>
+                <input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
+              </form>
+            </div>
+          </div>
+        </div>
+      </nav>
+    </header>
+
+    <main class="container-xxl">
+      <div class="toc-offcanvas">
+        <div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
+          <div class="offcanvas-header">
+            <h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
+            <button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
+          </div>
+          <div class="offcanvas-body">
+            <nav class="toc" id="toc"></nav>
+          </div>
+        </div>
+      </div>
+
+      <div class="content">
+        <div class="actionbar">
+          <button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
+            <i class="bi bi-list"></i>
+          </button>
+
+          <nav id="breadcrumb"></nav>
+        </div>
+
+        <article data-uid="Apq.Cfg.Validation.Rules.DependsOnRule">
+
+
+
+  <h1 id="Apq_Cfg_Validation_Rules_DependsOnRule" data-uid="Apq.Cfg.Validation.Rules.DependsOnRule" class="text-break">
+Class DependsOnRule  
+  </h1>
+
+  <div class="facts text-secondary">
+    <dl><dt>Namespace</dt><dd><a class="xref" href="Apq.html">Apq</a>.<a class="xref" href="Apq.Cfg.html">Cfg</a>.<a class="xref" href="Apq.Cfg.Validation.html">Validation</a>.<a class="xref" href="Apq.Cfg.Validation.Rules.html">Rules</a></dd></dl>
+  <dl><dt>Assembly</dt><dd>Apq.Cfg.dll</dd></dl>
+  </div>
+
+  <div class="markdown summary"><p>依赖验证规则 - 当依赖键存在时,当前键也必须存在</p>
+</div>
+  <div class="markdown conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public sealed class DependsOnRule : IValidationRule</code></pre>
+  </div>
+
+
+
+
+  <dl class="typelist inheritance">
+    <dt>Inheritance</dt>
+    <dd>
+      <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
+      <div><span class="xref">DependsOnRule</span></div>
+    </dd>
+  </dl>
+
+  <dl class="typelist implements">
+    <dt>Implements</dt>
+    <dd>
+      <div><a class="xref" href="Apq.Cfg.Validation.IValidationRule.html">IValidationRule</a></div>
+    </dd>
+  </dl>
+
+
+  <dl class="typelist inheritedMembers">
+    <dt>Inherited Members</dt>
+    <dd>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object)</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object, object)</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object, object)</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>
+    </div>
+  </dd></dl>
+
+
+
+
+
+
+  <h2 class="section" id="constructors">Constructors
+</h2>
+
+
+  <a id="Apq_Cfg_Validation_Rules_DependsOnRule__ctor_" data-uid="Apq.Cfg.Validation.Rules.DependsOnRule.#ctor*"></a>
+
+  <h3 id="Apq_Cfg_Validation_Rules_DependsOnRule__ctor_System_String_System_String_System_String_" data-uid="Apq.Cfg.Validation.Rules.DependsOnRule.#ctor(System.String,System.String,System.String)">
+  DependsOnRule(string, string, string?)
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>创建依赖验证规则</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public DependsOnRule(string key, string dependencyKey, string? errorMessage = null)</code></pre>
+  </div>
+
+  <h4 class="section">Parameters</h4>
+  <dl class="parameters">
+    <dt><code>key</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd><p>配置键</p>
+</dd>
+    <dt><code>dependencyKey</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd><p>依赖的配置键</p>
+</dd>
+    <dt><code>errorMessage</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd><p>自定义错误消息</p>
+</dd>
+  </dl>
+
+
+
+
+
+
+
+
+
+
+
+
+  <h2 class="section" id="properties">Properties
+</h2>
+
+
+  <a id="Apq_Cfg_Validation_Rules_DependsOnRule_DependencyKey_" data-uid="Apq.Cfg.Validation.Rules.DependsOnRule.DependencyKey*"></a>
+
+  <h3 id="Apq_Cfg_Validation_Rules_DependsOnRule_DependencyKey" data-uid="Apq.Cfg.Validation.Rules.DependsOnRule.DependencyKey">
+  DependencyKey
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>依赖的配置键</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public string DependencyKey { get; }</code></pre>
+  </div>
+
+
+
+
+
+  <h4 class="section">Property Value</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd></dd>
+  </dl>
+
+
+
+
+
+
+
+
+  <a id="Apq_Cfg_Validation_Rules_DependsOnRule_ErrorMessage_" data-uid="Apq.Cfg.Validation.Rules.DependsOnRule.ErrorMessage*"></a>
+
+  <h3 id="Apq_Cfg_Validation_Rules_DependsOnRule_ErrorMessage" data-uid="Apq.Cfg.Validation.Rules.DependsOnRule.ErrorMessage">
+  ErrorMessage
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>自定义错误消息</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public string? ErrorMessage { get; }</code></pre>
+  </div>
+
+
+
+
+
+  <h4 class="section">Property Value</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd></dd>
+  </dl>
+
+
+
+
+
+
+
+
+  <a id="Apq_Cfg_Validation_Rules_DependsOnRule_Key_" data-uid="Apq.Cfg.Validation.Rules.DependsOnRule.Key*"></a>
+
+  <h3 id="Apq_Cfg_Validation_Rules_DependsOnRule_Key" data-uid="Apq.Cfg.Validation.Rules.DependsOnRule.Key">
+  Key
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>要验证的配置键</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public string Key { get; }</code></pre>
+  </div>
+
+
+
+
+
+  <h4 class="section">Property Value</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd></dd>
+  </dl>
+
+
+
+
+
+
+
+
+  <a id="Apq_Cfg_Validation_Rules_DependsOnRule_Name_" data-uid="Apq.Cfg.Validation.Rules.DependsOnRule.Name*"></a>
+
+  <h3 id="Apq_Cfg_Validation_Rules_DependsOnRule_Name" data-uid="Apq.Cfg.Validation.Rules.DependsOnRule.Name">
+  Name
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>规则名称</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public string Name { get; }</code></pre>
+  </div>
+
+
+
+
+
+  <h4 class="section">Property Value</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd></dd>
+  </dl>
+
+
+
+
+
+
+
+
+  <h2 class="section" id="methods">Methods
+</h2>
+
+
+  <a id="Apq_Cfg_Validation_Rules_DependsOnRule_Validate_" data-uid="Apq.Cfg.Validation.Rules.DependsOnRule.Validate*"></a>
+
+  <h3 id="Apq_Cfg_Validation_Rules_DependsOnRule_Validate_System_String_" data-uid="Apq.Cfg.Validation.Rules.DependsOnRule.Validate(System.String)">
+  Validate(string?)
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>验证配置值</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public ValidationError? Validate(string? value)</code></pre>
+  </div>
+
+  <h4 class="section">Parameters</h4>
+  <dl class="parameters">
+    <dt><code>value</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd><p>配置值</p>
+</dd>
+  </dl>
+
+  <h4 class="section">Returns</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="Apq.Cfg.Validation.ValidationError.html">ValidationError</a></dt>
+    <dd><p>验证错误,如果验证通过返回 null</p>
+</dd>
+  </dl>
+
+
+
+
+
+
+
+
+
+
+
+
+</article>
+
+
+
+      </div>
+
+      <div class="affix">
+        <nav id="affix"></nav>
+      </div>
+    </main>
+
+    <div class="container-xxl search-results" id="search-results"></div>
+
+    <footer class="border-top text-secondary">
+      <div class="container-xxl">
+        <div class="flex-fill">
+          Apq.Cfg - .NET 统一配置组件库 (基于 .NET 10.0,兼容 .NET 8.0)
+        </div>
+      </div>
+    </footer>
+  </body>
+</html>

+ 366 - 0
docs/site/public/api-reference/api/Apq.Cfg.Validation.Rules.EnumValuesRule.html

@@ -0,0 +1,366 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8">
+      <title>Class EnumValuesRule | Apq.Cfg API </title>
+      <meta name="viewport" content="width=device-width, initial-scale=1.0">
+      <meta name="title" content="Class EnumValuesRule | Apq.Cfg API ">
+      
+      <meta name="description" content="枚举值验证规则 - 验证值是否在允许的值列表中">
+      <link rel="icon" href="../favicon.svg">
+      <link rel="stylesheet" href="../public/docfx.min.css">
+      <link rel="stylesheet" href="../public/main.css">
+      <meta name="docfx:navrel" content="../toc.html">
+      <meta name="docfx:tocrel" content="toc.html">
+      
+      <meta name="docfx:rel" content="../">
+      
+      
+      
+      <meta name="loc:inThisArticle" content="In this article">
+      <meta name="loc:searchResultsCount" content="{count} results for &quot;{query}&quot;">
+      <meta name="loc:searchNoResults" content="No results for &quot;{query}&quot;">
+      <meta name="loc:tocFilter" content="Filter by title">
+      <meta name="loc:nextArticle" content="Next">
+      <meta name="loc:prevArticle" content="Previous">
+      <meta name="loc:themeLight" content="Light">
+      <meta name="loc:themeDark" content="Dark">
+      <meta name="loc:themeAuto" content="Auto">
+      <meta name="loc:changeTheme" content="Change theme">
+      <meta name="loc:copy" content="Copy">
+      <meta name="loc:downloadPdf" content="Download PDF">
+
+      <script type="module" src="./../public/docfx.min.js"></script>
+
+      <script>
+        const theme = localStorage.getItem('theme') || 'auto'
+        document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
+      </script>
+
+  </head>
+
+  <body class="tex2jax_ignore" data-layout="" data-yaml-mime="ManagedReference">
+    <header class="bg-body border-bottom">
+      <nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
+        <div class="container-xxl flex-nowrap">
+          <a class="navbar-brand" href="../index.html">
+            <img id="logo" class="svg" src="../images/logo-small.svg" alt="Apq.Cfg">
+            Apq.Cfg
+          </a>
+          <button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
+            <i class="bi bi-three-dots"></i>
+          </button>
+          <div class="collapse navbar-collapse" id="navpanel">
+            <div id="navbar">
+              <form class="search" role="search" id="search">
+                <i class="bi bi-search"></i>
+                <input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
+              </form>
+            </div>
+          </div>
+        </div>
+      </nav>
+    </header>
+
+    <main class="container-xxl">
+      <div class="toc-offcanvas">
+        <div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
+          <div class="offcanvas-header">
+            <h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
+            <button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
+          </div>
+          <div class="offcanvas-body">
+            <nav class="toc" id="toc"></nav>
+          </div>
+        </div>
+      </div>
+
+      <div class="content">
+        <div class="actionbar">
+          <button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
+            <i class="bi bi-list"></i>
+          </button>
+
+          <nav id="breadcrumb"></nav>
+        </div>
+
+        <article data-uid="Apq.Cfg.Validation.Rules.EnumValuesRule">
+
+
+
+  <h1 id="Apq_Cfg_Validation_Rules_EnumValuesRule" data-uid="Apq.Cfg.Validation.Rules.EnumValuesRule" class="text-break">
+Class EnumValuesRule  
+  </h1>
+
+  <div class="facts text-secondary">
+    <dl><dt>Namespace</dt><dd><a class="xref" href="Apq.html">Apq</a>.<a class="xref" href="Apq.Cfg.html">Cfg</a>.<a class="xref" href="Apq.Cfg.Validation.html">Validation</a>.<a class="xref" href="Apq.Cfg.Validation.Rules.html">Rules</a></dd></dl>
+  <dl><dt>Assembly</dt><dd>Apq.Cfg.dll</dd></dl>
+  </div>
+
+  <div class="markdown summary"><p>枚举值验证规则 - 验证值是否在允许的值列表中</p>
+</div>
+  <div class="markdown conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public sealed class EnumValuesRule : IValidationRule</code></pre>
+  </div>
+
+
+
+
+  <dl class="typelist inheritance">
+    <dt>Inheritance</dt>
+    <dd>
+      <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
+      <div><span class="xref">EnumValuesRule</span></div>
+    </dd>
+  </dl>
+
+  <dl class="typelist implements">
+    <dt>Implements</dt>
+    <dd>
+      <div><a class="xref" href="Apq.Cfg.Validation.IValidationRule.html">IValidationRule</a></div>
+    </dd>
+  </dl>
+
+
+  <dl class="typelist inheritedMembers">
+    <dt>Inherited Members</dt>
+    <dd>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object)</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object, object)</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object, object)</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>
+    </div>
+  </dd></dl>
+
+
+
+
+
+
+  <h2 class="section" id="constructors">Constructors
+</h2>
+
+
+  <a id="Apq_Cfg_Validation_Rules_EnumValuesRule__ctor_" data-uid="Apq.Cfg.Validation.Rules.EnumValuesRule.#ctor*"></a>
+
+  <h3 id="Apq_Cfg_Validation_Rules_EnumValuesRule__ctor_System_String_System_Collections_Generic_IEnumerable_System_String__System_Boolean_System_String_" data-uid="Apq.Cfg.Validation.Rules.EnumValuesRule.#ctor(System.String,System.Collections.Generic.IEnumerable{System.String},System.Boolean,System.String)">
+  EnumValuesRule(string, IEnumerable&lt;string&gt;, bool, string?)
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>创建枚举值验证规则</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public EnumValuesRule(string key, IEnumerable&lt;string&gt; allowedValues, bool ignoreCase = false, string? errorMessage = null)</code></pre>
+  </div>
+
+  <h4 class="section">Parameters</h4>
+  <dl class="parameters">
+    <dt><code>key</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd><p>配置键</p>
+</dd>
+    <dt><code>allowedValues</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1">IEnumerable</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a>&gt;</dt>
+    <dd><p>允许的值列表</p>
+</dd>
+    <dt><code>ignoreCase</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
+    <dd><p>是否忽略大小写</p>
+</dd>
+    <dt><code>errorMessage</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd><p>自定义错误消息</p>
+</dd>
+  </dl>
+
+
+
+
+
+
+
+
+
+
+
+
+  <h2 class="section" id="properties">Properties
+</h2>
+
+
+  <a id="Apq_Cfg_Validation_Rules_EnumValuesRule_ErrorMessage_" data-uid="Apq.Cfg.Validation.Rules.EnumValuesRule.ErrorMessage*"></a>
+
+  <h3 id="Apq_Cfg_Validation_Rules_EnumValuesRule_ErrorMessage" data-uid="Apq.Cfg.Validation.Rules.EnumValuesRule.ErrorMessage">
+  ErrorMessage
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>自定义错误消息</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public string? ErrorMessage { get; }</code></pre>
+  </div>
+
+
+
+
+
+  <h4 class="section">Property Value</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd></dd>
+  </dl>
+
+
+
+
+
+
+
+
+  <a id="Apq_Cfg_Validation_Rules_EnumValuesRule_Key_" data-uid="Apq.Cfg.Validation.Rules.EnumValuesRule.Key*"></a>
+
+  <h3 id="Apq_Cfg_Validation_Rules_EnumValuesRule_Key" data-uid="Apq.Cfg.Validation.Rules.EnumValuesRule.Key">
+  Key
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>要验证的配置键</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public string Key { get; }</code></pre>
+  </div>
+
+
+
+
+
+  <h4 class="section">Property Value</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd></dd>
+  </dl>
+
+
+
+
+
+
+
+
+  <a id="Apq_Cfg_Validation_Rules_EnumValuesRule_Name_" data-uid="Apq.Cfg.Validation.Rules.EnumValuesRule.Name*"></a>
+
+  <h3 id="Apq_Cfg_Validation_Rules_EnumValuesRule_Name" data-uid="Apq.Cfg.Validation.Rules.EnumValuesRule.Name">
+  Name
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>规则名称</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public string Name { get; }</code></pre>
+  </div>
+
+
+
+
+
+  <h4 class="section">Property Value</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd></dd>
+  </dl>
+
+
+
+
+
+
+
+
+  <h2 class="section" id="methods">Methods
+</h2>
+
+
+  <a id="Apq_Cfg_Validation_Rules_EnumValuesRule_Validate_" data-uid="Apq.Cfg.Validation.Rules.EnumValuesRule.Validate*"></a>
+
+  <h3 id="Apq_Cfg_Validation_Rules_EnumValuesRule_Validate_System_String_" data-uid="Apq.Cfg.Validation.Rules.EnumValuesRule.Validate(System.String)">
+  Validate(string?)
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>验证配置值</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public ValidationError? Validate(string? value)</code></pre>
+  </div>
+
+  <h4 class="section">Parameters</h4>
+  <dl class="parameters">
+    <dt><code>value</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd><p>配置值</p>
+</dd>
+  </dl>
+
+  <h4 class="section">Returns</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="Apq.Cfg.Validation.ValidationError.html">ValidationError</a></dt>
+    <dd><p>验证错误,如果验证通过返回 null</p>
+</dd>
+  </dl>
+
+
+
+
+
+
+
+
+
+
+
+
+</article>
+
+
+
+      </div>
+
+      <div class="affix">
+        <nav id="affix"></nav>
+      </div>
+    </main>
+
+    <div class="container-xxl search-results" id="search-results"></div>
+
+    <footer class="border-top text-secondary">
+      <div class="container-xxl">
+        <div class="flex-fill">
+          Apq.Cfg - .NET 统一配置组件库 (基于 .NET 10.0,兼容 .NET 8.0)
+        </div>
+      </div>
+    </footer>
+  </body>
+</html>

+ 366 - 0
docs/site/public/api-reference/api/Apq.Cfg.Validation.Rules.LengthRule.html

@@ -0,0 +1,366 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8">
+      <title>Class LengthRule | Apq.Cfg API </title>
+      <meta name="viewport" content="width=device-width, initial-scale=1.0">
+      <meta name="title" content="Class LengthRule | Apq.Cfg API ">
+      
+      <meta name="description" content="字符串长度验证规则">
+      <link rel="icon" href="../favicon.svg">
+      <link rel="stylesheet" href="../public/docfx.min.css">
+      <link rel="stylesheet" href="../public/main.css">
+      <meta name="docfx:navrel" content="../toc.html">
+      <meta name="docfx:tocrel" content="toc.html">
+      
+      <meta name="docfx:rel" content="../">
+      
+      
+      
+      <meta name="loc:inThisArticle" content="In this article">
+      <meta name="loc:searchResultsCount" content="{count} results for &quot;{query}&quot;">
+      <meta name="loc:searchNoResults" content="No results for &quot;{query}&quot;">
+      <meta name="loc:tocFilter" content="Filter by title">
+      <meta name="loc:nextArticle" content="Next">
+      <meta name="loc:prevArticle" content="Previous">
+      <meta name="loc:themeLight" content="Light">
+      <meta name="loc:themeDark" content="Dark">
+      <meta name="loc:themeAuto" content="Auto">
+      <meta name="loc:changeTheme" content="Change theme">
+      <meta name="loc:copy" content="Copy">
+      <meta name="loc:downloadPdf" content="Download PDF">
+
+      <script type="module" src="./../public/docfx.min.js"></script>
+
+      <script>
+        const theme = localStorage.getItem('theme') || 'auto'
+        document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
+      </script>
+
+  </head>
+
+  <body class="tex2jax_ignore" data-layout="" data-yaml-mime="ManagedReference">
+    <header class="bg-body border-bottom">
+      <nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
+        <div class="container-xxl flex-nowrap">
+          <a class="navbar-brand" href="../index.html">
+            <img id="logo" class="svg" src="../images/logo-small.svg" alt="Apq.Cfg">
+            Apq.Cfg
+          </a>
+          <button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
+            <i class="bi bi-three-dots"></i>
+          </button>
+          <div class="collapse navbar-collapse" id="navpanel">
+            <div id="navbar">
+              <form class="search" role="search" id="search">
+                <i class="bi bi-search"></i>
+                <input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
+              </form>
+            </div>
+          </div>
+        </div>
+      </nav>
+    </header>
+
+    <main class="container-xxl">
+      <div class="toc-offcanvas">
+        <div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
+          <div class="offcanvas-header">
+            <h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
+            <button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
+          </div>
+          <div class="offcanvas-body">
+            <nav class="toc" id="toc"></nav>
+          </div>
+        </div>
+      </div>
+
+      <div class="content">
+        <div class="actionbar">
+          <button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
+            <i class="bi bi-list"></i>
+          </button>
+
+          <nav id="breadcrumb"></nav>
+        </div>
+
+        <article data-uid="Apq.Cfg.Validation.Rules.LengthRule">
+
+
+
+  <h1 id="Apq_Cfg_Validation_Rules_LengthRule" data-uid="Apq.Cfg.Validation.Rules.LengthRule" class="text-break">
+Class LengthRule  
+  </h1>
+
+  <div class="facts text-secondary">
+    <dl><dt>Namespace</dt><dd><a class="xref" href="Apq.html">Apq</a>.<a class="xref" href="Apq.Cfg.html">Cfg</a>.<a class="xref" href="Apq.Cfg.Validation.html">Validation</a>.<a class="xref" href="Apq.Cfg.Validation.Rules.html">Rules</a></dd></dl>
+  <dl><dt>Assembly</dt><dd>Apq.Cfg.dll</dd></dl>
+  </div>
+
+  <div class="markdown summary"><p>字符串长度验证规则</p>
+</div>
+  <div class="markdown conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public sealed class LengthRule : IValidationRule</code></pre>
+  </div>
+
+
+
+
+  <dl class="typelist inheritance">
+    <dt>Inheritance</dt>
+    <dd>
+      <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
+      <div><span class="xref">LengthRule</span></div>
+    </dd>
+  </dl>
+
+  <dl class="typelist implements">
+    <dt>Implements</dt>
+    <dd>
+      <div><a class="xref" href="Apq.Cfg.Validation.IValidationRule.html">IValidationRule</a></div>
+    </dd>
+  </dl>
+
+
+  <dl class="typelist inheritedMembers">
+    <dt>Inherited Members</dt>
+    <dd>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object)</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object, object)</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object, object)</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>
+    </div>
+  </dd></dl>
+
+
+
+
+
+
+  <h2 class="section" id="constructors">Constructors
+</h2>
+
+
+  <a id="Apq_Cfg_Validation_Rules_LengthRule__ctor_" data-uid="Apq.Cfg.Validation.Rules.LengthRule.#ctor*"></a>
+
+  <h3 id="Apq_Cfg_Validation_Rules_LengthRule__ctor_System_String_System_Nullable_System_Int32__System_Nullable_System_Int32__System_String_" data-uid="Apq.Cfg.Validation.Rules.LengthRule.#ctor(System.String,System.Nullable{System.Int32},System.Nullable{System.Int32},System.String)">
+  LengthRule(string, int?, int?, string?)
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>创建字符串长度验证规则</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public LengthRule(string key, int? minLength = null, int? maxLength = null, string? errorMessage = null)</code></pre>
+  </div>
+
+  <h4 class="section">Parameters</h4>
+  <dl class="parameters">
+    <dt><code>key</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd><p>配置键</p>
+</dd>
+    <dt><code>minLength</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a>?</dt>
+    <dd><p>最小长度(null 表示不限制)</p>
+</dd>
+    <dt><code>maxLength</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a>?</dt>
+    <dd><p>最大长度(null 表示不限制)</p>
+</dd>
+    <dt><code>errorMessage</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd><p>自定义错误消息</p>
+</dd>
+  </dl>
+
+
+
+
+
+
+
+
+
+
+
+
+  <h2 class="section" id="properties">Properties
+</h2>
+
+
+  <a id="Apq_Cfg_Validation_Rules_LengthRule_ErrorMessage_" data-uid="Apq.Cfg.Validation.Rules.LengthRule.ErrorMessage*"></a>
+
+  <h3 id="Apq_Cfg_Validation_Rules_LengthRule_ErrorMessage" data-uid="Apq.Cfg.Validation.Rules.LengthRule.ErrorMessage">
+  ErrorMessage
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>自定义错误消息</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public string? ErrorMessage { get; }</code></pre>
+  </div>
+
+
+
+
+
+  <h4 class="section">Property Value</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd></dd>
+  </dl>
+
+
+
+
+
+
+
+
+  <a id="Apq_Cfg_Validation_Rules_LengthRule_Key_" data-uid="Apq.Cfg.Validation.Rules.LengthRule.Key*"></a>
+
+  <h3 id="Apq_Cfg_Validation_Rules_LengthRule_Key" data-uid="Apq.Cfg.Validation.Rules.LengthRule.Key">
+  Key
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>要验证的配置键</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public string Key { get; }</code></pre>
+  </div>
+
+
+
+
+
+  <h4 class="section">Property Value</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd></dd>
+  </dl>
+
+
+
+
+
+
+
+
+  <a id="Apq_Cfg_Validation_Rules_LengthRule_Name_" data-uid="Apq.Cfg.Validation.Rules.LengthRule.Name*"></a>
+
+  <h3 id="Apq_Cfg_Validation_Rules_LengthRule_Name" data-uid="Apq.Cfg.Validation.Rules.LengthRule.Name">
+  Name
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>规则名称</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public string Name { get; }</code></pre>
+  </div>
+
+
+
+
+
+  <h4 class="section">Property Value</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd></dd>
+  </dl>
+
+
+
+
+
+
+
+
+  <h2 class="section" id="methods">Methods
+</h2>
+
+
+  <a id="Apq_Cfg_Validation_Rules_LengthRule_Validate_" data-uid="Apq.Cfg.Validation.Rules.LengthRule.Validate*"></a>
+
+  <h3 id="Apq_Cfg_Validation_Rules_LengthRule_Validate_System_String_" data-uid="Apq.Cfg.Validation.Rules.LengthRule.Validate(System.String)">
+  Validate(string?)
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>验证配置值</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public ValidationError? Validate(string? value)</code></pre>
+  </div>
+
+  <h4 class="section">Parameters</h4>
+  <dl class="parameters">
+    <dt><code>value</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd><p>配置值</p>
+</dd>
+  </dl>
+
+  <h4 class="section">Returns</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="Apq.Cfg.Validation.ValidationError.html">ValidationError</a></dt>
+    <dd><p>验证错误,如果验证通过返回 null</p>
+</dd>
+  </dl>
+
+
+
+
+
+
+
+
+
+
+
+
+</article>
+
+
+
+      </div>
+
+      <div class="affix">
+        <nav id="affix"></nav>
+      </div>
+    </main>
+
+    <div class="container-xxl search-results" id="search-results"></div>
+
+    <footer class="border-top text-secondary">
+      <div class="container-xxl">
+        <div class="flex-fill">
+          Apq.Cfg - .NET 统一配置组件库 (基于 .NET 10.0,兼容 .NET 8.0)
+        </div>
+      </div>
+    </footer>
+  </body>
+</html>

+ 375 - 0
docs/site/public/api-reference/api/Apq.Cfg.Validation.Rules.RangeRule-1.html

@@ -0,0 +1,375 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8">
+      <title>Class RangeRule&lt;T&gt; | Apq.Cfg API </title>
+      <meta name="viewport" content="width=device-width, initial-scale=1.0">
+      <meta name="title" content="Class RangeRule&lt;T&gt; | Apq.Cfg API ">
+      
+      <meta name="description" content="范围验证规则">
+      <link rel="icon" href="../favicon.svg">
+      <link rel="stylesheet" href="../public/docfx.min.css">
+      <link rel="stylesheet" href="../public/main.css">
+      <meta name="docfx:navrel" content="../toc.html">
+      <meta name="docfx:tocrel" content="toc.html">
+      
+      <meta name="docfx:rel" content="../">
+      
+      
+      
+      <meta name="loc:inThisArticle" content="In this article">
+      <meta name="loc:searchResultsCount" content="{count} results for &quot;{query}&quot;">
+      <meta name="loc:searchNoResults" content="No results for &quot;{query}&quot;">
+      <meta name="loc:tocFilter" content="Filter by title">
+      <meta name="loc:nextArticle" content="Next">
+      <meta name="loc:prevArticle" content="Previous">
+      <meta name="loc:themeLight" content="Light">
+      <meta name="loc:themeDark" content="Dark">
+      <meta name="loc:themeAuto" content="Auto">
+      <meta name="loc:changeTheme" content="Change theme">
+      <meta name="loc:copy" content="Copy">
+      <meta name="loc:downloadPdf" content="Download PDF">
+
+      <script type="module" src="./../public/docfx.min.js"></script>
+
+      <script>
+        const theme = localStorage.getItem('theme') || 'auto'
+        document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
+      </script>
+
+  </head>
+
+  <body class="tex2jax_ignore" data-layout="" data-yaml-mime="ManagedReference">
+    <header class="bg-body border-bottom">
+      <nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
+        <div class="container-xxl flex-nowrap">
+          <a class="navbar-brand" href="../index.html">
+            <img id="logo" class="svg" src="../images/logo-small.svg" alt="Apq.Cfg">
+            Apq.Cfg
+          </a>
+          <button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
+            <i class="bi bi-three-dots"></i>
+          </button>
+          <div class="collapse navbar-collapse" id="navpanel">
+            <div id="navbar">
+              <form class="search" role="search" id="search">
+                <i class="bi bi-search"></i>
+                <input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
+              </form>
+            </div>
+          </div>
+        </div>
+      </nav>
+    </header>
+
+    <main class="container-xxl">
+      <div class="toc-offcanvas">
+        <div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
+          <div class="offcanvas-header">
+            <h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
+            <button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
+          </div>
+          <div class="offcanvas-body">
+            <nav class="toc" id="toc"></nav>
+          </div>
+        </div>
+      </div>
+
+      <div class="content">
+        <div class="actionbar">
+          <button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
+            <i class="bi bi-list"></i>
+          </button>
+
+          <nav id="breadcrumb"></nav>
+        </div>
+
+        <article data-uid="Apq.Cfg.Validation.Rules.RangeRule`1">
+
+
+
+  <h1 id="Apq_Cfg_Validation_Rules_RangeRule_1" data-uid="Apq.Cfg.Validation.Rules.RangeRule`1" class="text-break">
+Class RangeRule&lt;T&gt;  
+  </h1>
+
+  <div class="facts text-secondary">
+    <dl><dt>Namespace</dt><dd><a class="xref" href="Apq.html">Apq</a>.<a class="xref" href="Apq.Cfg.html">Cfg</a>.<a class="xref" href="Apq.Cfg.Validation.html">Validation</a>.<a class="xref" href="Apq.Cfg.Validation.Rules.html">Rules</a></dd></dl>
+  <dl><dt>Assembly</dt><dd>Apq.Cfg.dll</dd></dl>
+  </div>
+
+  <div class="markdown summary"><p>范围验证规则</p>
+</div>
+  <div class="markdown conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public sealed class RangeRule&lt;T&gt; : IValidationRule where T : struct, IComparable&lt;T&gt;</code></pre>
+  </div>
+
+
+
+  <h4 class="section">Type Parameters</h4>
+  <dl class="parameters">
+    <dt><code>T</code></dt>
+    <dd><p>值类型,必须实现 IComparable</p>
+</dd>
+  </dl>
+
+  <dl class="typelist inheritance">
+    <dt>Inheritance</dt>
+    <dd>
+      <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
+      <div><span class="xref">RangeRule&lt;T&gt;</span></div>
+    </dd>
+  </dl>
+
+  <dl class="typelist implements">
+    <dt>Implements</dt>
+    <dd>
+      <div><a class="xref" href="Apq.Cfg.Validation.IValidationRule.html">IValidationRule</a></div>
+    </dd>
+  </dl>
+
+
+  <dl class="typelist inheritedMembers">
+    <dt>Inherited Members</dt>
+    <dd>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object)</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object, object)</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object, object)</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>
+    </div>
+  </dd></dl>
+
+
+
+
+
+
+  <h2 class="section" id="constructors">Constructors
+</h2>
+
+
+  <a id="Apq_Cfg_Validation_Rules_RangeRule_1__ctor_" data-uid="Apq.Cfg.Validation.Rules.RangeRule`1.#ctor*"></a>
+
+  <h3 id="Apq_Cfg_Validation_Rules_RangeRule_1__ctor_System_String__0__0_System_Func_System_String_System_Nullable__0___System_String_" data-uid="Apq.Cfg.Validation.Rules.RangeRule`1.#ctor(System.String,`0,`0,System.Func{System.String,System.Nullable{`0}},System.String)">
+  RangeRule(string, T, T, Func&lt;string, T?&gt;, string?)
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>创建范围验证规则</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public RangeRule(string key, T min, T max, Func&lt;string, T?&gt; converter, string? errorMessage = null)</code></pre>
+  </div>
+
+  <h4 class="section">Parameters</h4>
+  <dl class="parameters">
+    <dt><code>key</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd><p>配置键</p>
+</dd>
+    <dt><code>min</code> <span class="xref">T</span></dt>
+    <dd><p>最小值</p>
+</dd>
+    <dt><code>max</code> <span class="xref">T</span></dt>
+    <dd><p>最大值</p>
+</dd>
+    <dt><code>converter</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.func-2">Func</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a>, T?&gt;</dt>
+    <dd><p>字符串到类型 T 的转换器</p>
+</dd>
+    <dt><code>errorMessage</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd><p>自定义错误消息</p>
+</dd>
+  </dl>
+
+
+
+
+
+
+
+
+
+
+
+
+  <h2 class="section" id="properties">Properties
+</h2>
+
+
+  <a id="Apq_Cfg_Validation_Rules_RangeRule_1_ErrorMessage_" data-uid="Apq.Cfg.Validation.Rules.RangeRule`1.ErrorMessage*"></a>
+
+  <h3 id="Apq_Cfg_Validation_Rules_RangeRule_1_ErrorMessage" data-uid="Apq.Cfg.Validation.Rules.RangeRule`1.ErrorMessage">
+  ErrorMessage
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>自定义错误消息</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public string? ErrorMessage { get; }</code></pre>
+  </div>
+
+
+
+
+
+  <h4 class="section">Property Value</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd></dd>
+  </dl>
+
+
+
+
+
+
+
+
+  <a id="Apq_Cfg_Validation_Rules_RangeRule_1_Key_" data-uid="Apq.Cfg.Validation.Rules.RangeRule`1.Key*"></a>
+
+  <h3 id="Apq_Cfg_Validation_Rules_RangeRule_1_Key" data-uid="Apq.Cfg.Validation.Rules.RangeRule`1.Key">
+  Key
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>要验证的配置键</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public string Key { get; }</code></pre>
+  </div>
+
+
+
+
+
+  <h4 class="section">Property Value</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd></dd>
+  </dl>
+
+
+
+
+
+
+
+
+  <a id="Apq_Cfg_Validation_Rules_RangeRule_1_Name_" data-uid="Apq.Cfg.Validation.Rules.RangeRule`1.Name*"></a>
+
+  <h3 id="Apq_Cfg_Validation_Rules_RangeRule_1_Name" data-uid="Apq.Cfg.Validation.Rules.RangeRule`1.Name">
+  Name
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>规则名称</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public string Name { get; }</code></pre>
+  </div>
+
+
+
+
+
+  <h4 class="section">Property Value</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd></dd>
+  </dl>
+
+
+
+
+
+
+
+
+  <h2 class="section" id="methods">Methods
+</h2>
+
+
+  <a id="Apq_Cfg_Validation_Rules_RangeRule_1_Validate_" data-uid="Apq.Cfg.Validation.Rules.RangeRule`1.Validate*"></a>
+
+  <h3 id="Apq_Cfg_Validation_Rules_RangeRule_1_Validate_System_String_" data-uid="Apq.Cfg.Validation.Rules.RangeRule`1.Validate(System.String)">
+  Validate(string?)
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>验证配置值</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public ValidationError? Validate(string? value)</code></pre>
+  </div>
+
+  <h4 class="section">Parameters</h4>
+  <dl class="parameters">
+    <dt><code>value</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd><p>配置值</p>
+</dd>
+  </dl>
+
+  <h4 class="section">Returns</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="Apq.Cfg.Validation.ValidationError.html">ValidationError</a></dt>
+    <dd><p>验证错误,如果验证通过返回 null</p>
+</dd>
+  </dl>
+
+
+
+
+
+
+
+
+
+
+
+
+</article>
+
+
+
+      </div>
+
+      <div class="affix">
+        <nav id="affix"></nav>
+      </div>
+    </main>
+
+    <div class="container-xxl search-results" id="search-results"></div>
+
+    <footer class="border-top text-secondary">
+      <div class="container-xxl">
+        <div class="flex-fill">
+          Apq.Cfg - .NET 统一配置组件库 (基于 .NET 10.0,兼容 .NET 8.0)
+        </div>
+      </div>
+    </footer>
+  </body>
+</html>

+ 393 - 0
docs/site/public/api-reference/api/Apq.Cfg.Validation.Rules.RangeRule.html

@@ -0,0 +1,393 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8">
+      <title>Class RangeRule | Apq.Cfg API </title>
+      <meta name="viewport" content="width=device-width, initial-scale=1.0">
+      <meta name="title" content="Class RangeRule | Apq.Cfg API ">
+      
+      <meta name="description" content="范围验证规则工厂">
+      <link rel="icon" href="../favicon.svg">
+      <link rel="stylesheet" href="../public/docfx.min.css">
+      <link rel="stylesheet" href="../public/main.css">
+      <meta name="docfx:navrel" content="../toc.html">
+      <meta name="docfx:tocrel" content="toc.html">
+      
+      <meta name="docfx:rel" content="../">
+      
+      
+      
+      <meta name="loc:inThisArticle" content="In this article">
+      <meta name="loc:searchResultsCount" content="{count} results for &quot;{query}&quot;">
+      <meta name="loc:searchNoResults" content="No results for &quot;{query}&quot;">
+      <meta name="loc:tocFilter" content="Filter by title">
+      <meta name="loc:nextArticle" content="Next">
+      <meta name="loc:prevArticle" content="Previous">
+      <meta name="loc:themeLight" content="Light">
+      <meta name="loc:themeDark" content="Dark">
+      <meta name="loc:themeAuto" content="Auto">
+      <meta name="loc:changeTheme" content="Change theme">
+      <meta name="loc:copy" content="Copy">
+      <meta name="loc:downloadPdf" content="Download PDF">
+
+      <script type="module" src="./../public/docfx.min.js"></script>
+
+      <script>
+        const theme = localStorage.getItem('theme') || 'auto'
+        document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
+      </script>
+
+  </head>
+
+  <body class="tex2jax_ignore" data-layout="" data-yaml-mime="ManagedReference">
+    <header class="bg-body border-bottom">
+      <nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
+        <div class="container-xxl flex-nowrap">
+          <a class="navbar-brand" href="../index.html">
+            <img id="logo" class="svg" src="../images/logo-small.svg" alt="Apq.Cfg">
+            Apq.Cfg
+          </a>
+          <button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
+            <i class="bi bi-three-dots"></i>
+          </button>
+          <div class="collapse navbar-collapse" id="navpanel">
+            <div id="navbar">
+              <form class="search" role="search" id="search">
+                <i class="bi bi-search"></i>
+                <input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
+              </form>
+            </div>
+          </div>
+        </div>
+      </nav>
+    </header>
+
+    <main class="container-xxl">
+      <div class="toc-offcanvas">
+        <div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
+          <div class="offcanvas-header">
+            <h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
+            <button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
+          </div>
+          <div class="offcanvas-body">
+            <nav class="toc" id="toc"></nav>
+          </div>
+        </div>
+      </div>
+
+      <div class="content">
+        <div class="actionbar">
+          <button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
+            <i class="bi bi-list"></i>
+          </button>
+
+          <nav id="breadcrumb"></nav>
+        </div>
+
+        <article data-uid="Apq.Cfg.Validation.Rules.RangeRule">
+
+
+
+  <h1 id="Apq_Cfg_Validation_Rules_RangeRule" data-uid="Apq.Cfg.Validation.Rules.RangeRule" class="text-break">
+Class RangeRule  
+  </h1>
+
+  <div class="facts text-secondary">
+    <dl><dt>Namespace</dt><dd><a class="xref" href="Apq.html">Apq</a>.<a class="xref" href="Apq.Cfg.html">Cfg</a>.<a class="xref" href="Apq.Cfg.Validation.html">Validation</a>.<a class="xref" href="Apq.Cfg.Validation.Rules.html">Rules</a></dd></dl>
+  <dl><dt>Assembly</dt><dd>Apq.Cfg.dll</dd></dl>
+  </div>
+
+  <div class="markdown summary"><p>范围验证规则工厂</p>
+</div>
+  <div class="markdown conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public static class RangeRule</code></pre>
+  </div>
+
+
+
+
+  <dl class="typelist inheritance">
+    <dt>Inheritance</dt>
+    <dd>
+      <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
+      <div><span class="xref">RangeRule</span></div>
+    </dd>
+  </dl>
+
+
+
+  <dl class="typelist inheritedMembers">
+    <dt>Inherited Members</dt>
+    <dd>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object)</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object, object)</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone">object.MemberwiseClone()</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object, object)</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>
+    </div>
+  </dd></dl>
+
+
+
+
+
+
+  <h2 class="section" id="methods">Methods
+</h2>
+
+
+  <a id="Apq_Cfg_Validation_Rules_RangeRule_ForDateTime_" data-uid="Apq.Cfg.Validation.Rules.RangeRule.ForDateTime*"></a>
+
+  <h3 id="Apq_Cfg_Validation_Rules_RangeRule_ForDateTime_System_String_System_DateTime_System_DateTime_System_String_" data-uid="Apq.Cfg.Validation.Rules.RangeRule.ForDateTime(System.String,System.DateTime,System.DateTime,System.String)">
+  ForDateTime(string, DateTime, DateTime, string?)
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>创建日期时间范围验证规则</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public static RangeRule&lt;DateTime&gt; ForDateTime(string key, DateTime min, DateTime max, string? errorMessage = null)</code></pre>
+  </div>
+
+  <h4 class="section">Parameters</h4>
+  <dl class="parameters">
+    <dt><code>key</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd></dd>
+    <dt><code>min</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.datetime">DateTime</a></dt>
+    <dd></dd>
+    <dt><code>max</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.datetime">DateTime</a></dt>
+    <dd></dd>
+    <dt><code>errorMessage</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd></dd>
+  </dl>
+
+  <h4 class="section">Returns</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="Apq.Cfg.Validation.Rules.RangeRule-1.html">RangeRule</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.datetime">DateTime</a>&gt;</dt>
+    <dd></dd>
+  </dl>
+
+
+
+
+
+
+
+
+
+
+
+  <a id="Apq_Cfg_Validation_Rules_RangeRule_ForDecimal_" data-uid="Apq.Cfg.Validation.Rules.RangeRule.ForDecimal*"></a>
+
+  <h3 id="Apq_Cfg_Validation_Rules_RangeRule_ForDecimal_System_String_System_Decimal_System_Decimal_System_String_" data-uid="Apq.Cfg.Validation.Rules.RangeRule.ForDecimal(System.String,System.Decimal,System.Decimal,System.String)">
+  ForDecimal(string, decimal, decimal, string?)
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>创建十进制数范围验证规则</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public static RangeRule&lt;decimal&gt; ForDecimal(string key, decimal min, decimal max, string? errorMessage = null)</code></pre>
+  </div>
+
+  <h4 class="section">Parameters</h4>
+  <dl class="parameters">
+    <dt><code>key</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd></dd>
+    <dt><code>min</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.decimal">decimal</a></dt>
+    <dd></dd>
+    <dt><code>max</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.decimal">decimal</a></dt>
+    <dd></dd>
+    <dt><code>errorMessage</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd></dd>
+  </dl>
+
+  <h4 class="section">Returns</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="Apq.Cfg.Validation.Rules.RangeRule-1.html">RangeRule</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.decimal">decimal</a>&gt;</dt>
+    <dd></dd>
+  </dl>
+
+
+
+
+
+
+
+
+
+
+
+  <a id="Apq_Cfg_Validation_Rules_RangeRule_ForDouble_" data-uid="Apq.Cfg.Validation.Rules.RangeRule.ForDouble*"></a>
+
+  <h3 id="Apq_Cfg_Validation_Rules_RangeRule_ForDouble_System_String_System_Double_System_Double_System_String_" data-uid="Apq.Cfg.Validation.Rules.RangeRule.ForDouble(System.String,System.Double,System.Double,System.String)">
+  ForDouble(string, double, double, string?)
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>创建双精度浮点数范围验证规则</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public static RangeRule&lt;double&gt; ForDouble(string key, double min, double max, string? errorMessage = null)</code></pre>
+  </div>
+
+  <h4 class="section">Parameters</h4>
+  <dl class="parameters">
+    <dt><code>key</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd></dd>
+    <dt><code>min</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a></dt>
+    <dd></dd>
+    <dt><code>max</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a></dt>
+    <dd></dd>
+    <dt><code>errorMessage</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd></dd>
+  </dl>
+
+  <h4 class="section">Returns</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="Apq.Cfg.Validation.Rules.RangeRule-1.html">RangeRule</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a>&gt;</dt>
+    <dd></dd>
+  </dl>
+
+
+
+
+
+
+
+
+
+
+
+  <a id="Apq_Cfg_Validation_Rules_RangeRule_ForInt_" data-uid="Apq.Cfg.Validation.Rules.RangeRule.ForInt*"></a>
+
+  <h3 id="Apq_Cfg_Validation_Rules_RangeRule_ForInt_System_String_System_Int32_System_Int32_System_String_" data-uid="Apq.Cfg.Validation.Rules.RangeRule.ForInt(System.String,System.Int32,System.Int32,System.String)">
+  ForInt(string, int, int, string?)
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>创建整数范围验证规则</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public static RangeRule&lt;int&gt; ForInt(string key, int min, int max, string? errorMessage = null)</code></pre>
+  </div>
+
+  <h4 class="section">Parameters</h4>
+  <dl class="parameters">
+    <dt><code>key</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd></dd>
+    <dt><code>min</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
+    <dd></dd>
+    <dt><code>max</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
+    <dd></dd>
+    <dt><code>errorMessage</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd></dd>
+  </dl>
+
+  <h4 class="section">Returns</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="Apq.Cfg.Validation.Rules.RangeRule-1.html">RangeRule</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a>&gt;</dt>
+    <dd></dd>
+  </dl>
+
+
+
+
+
+
+
+
+
+
+
+  <a id="Apq_Cfg_Validation_Rules_RangeRule_ForLong_" data-uid="Apq.Cfg.Validation.Rules.RangeRule.ForLong*"></a>
+
+  <h3 id="Apq_Cfg_Validation_Rules_RangeRule_ForLong_System_String_System_Int64_System_Int64_System_String_" data-uid="Apq.Cfg.Validation.Rules.RangeRule.ForLong(System.String,System.Int64,System.Int64,System.String)">
+  ForLong(string, long, long, string?)
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>创建长整数范围验证规则</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public static RangeRule&lt;long&gt; ForLong(string key, long min, long max, string? errorMessage = null)</code></pre>
+  </div>
+
+  <h4 class="section">Parameters</h4>
+  <dl class="parameters">
+    <dt><code>key</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd></dd>
+    <dt><code>min</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int64">long</a></dt>
+    <dd></dd>
+    <dt><code>max</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int64">long</a></dt>
+    <dd></dd>
+    <dt><code>errorMessage</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd></dd>
+  </dl>
+
+  <h4 class="section">Returns</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="Apq.Cfg.Validation.Rules.RangeRule-1.html">RangeRule</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int64">long</a>&gt;</dt>
+    <dd></dd>
+  </dl>
+
+
+
+
+
+
+
+
+
+
+
+
+</article>
+
+
+
+      </div>
+
+      <div class="affix">
+        <nav id="affix"></nav>
+      </div>
+    </main>
+
+    <div class="container-xxl search-results" id="search-results"></div>
+
+    <footer class="border-top text-secondary">
+      <div class="container-xxl">
+        <div class="flex-fill">
+          Apq.Cfg - .NET 统一配置组件库 (基于 .NET 10.0,兼容 .NET 8.0)
+        </div>
+      </div>
+    </footer>
+  </body>
+</html>

+ 398 - 0
docs/site/public/api-reference/api/Apq.Cfg.Validation.Rules.RegexRule.html

@@ -0,0 +1,398 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8">
+      <title>Class RegexRule | Apq.Cfg API </title>
+      <meta name="viewport" content="width=device-width, initial-scale=1.0">
+      <meta name="title" content="Class RegexRule | Apq.Cfg API ">
+      
+      <meta name="description" content="正则表达式验证规则">
+      <link rel="icon" href="../favicon.svg">
+      <link rel="stylesheet" href="../public/docfx.min.css">
+      <link rel="stylesheet" href="../public/main.css">
+      <meta name="docfx:navrel" content="../toc.html">
+      <meta name="docfx:tocrel" content="toc.html">
+      
+      <meta name="docfx:rel" content="../">
+      
+      
+      
+      <meta name="loc:inThisArticle" content="In this article">
+      <meta name="loc:searchResultsCount" content="{count} results for &quot;{query}&quot;">
+      <meta name="loc:searchNoResults" content="No results for &quot;{query}&quot;">
+      <meta name="loc:tocFilter" content="Filter by title">
+      <meta name="loc:nextArticle" content="Next">
+      <meta name="loc:prevArticle" content="Previous">
+      <meta name="loc:themeLight" content="Light">
+      <meta name="loc:themeDark" content="Dark">
+      <meta name="loc:themeAuto" content="Auto">
+      <meta name="loc:changeTheme" content="Change theme">
+      <meta name="loc:copy" content="Copy">
+      <meta name="loc:downloadPdf" content="Download PDF">
+
+      <script type="module" src="./../public/docfx.min.js"></script>
+
+      <script>
+        const theme = localStorage.getItem('theme') || 'auto'
+        document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
+      </script>
+
+  </head>
+
+  <body class="tex2jax_ignore" data-layout="" data-yaml-mime="ManagedReference">
+    <header class="bg-body border-bottom">
+      <nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
+        <div class="container-xxl flex-nowrap">
+          <a class="navbar-brand" href="../index.html">
+            <img id="logo" class="svg" src="../images/logo-small.svg" alt="Apq.Cfg">
+            Apq.Cfg
+          </a>
+          <button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
+            <i class="bi bi-three-dots"></i>
+          </button>
+          <div class="collapse navbar-collapse" id="navpanel">
+            <div id="navbar">
+              <form class="search" role="search" id="search">
+                <i class="bi bi-search"></i>
+                <input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
+              </form>
+            </div>
+          </div>
+        </div>
+      </nav>
+    </header>
+
+    <main class="container-xxl">
+      <div class="toc-offcanvas">
+        <div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
+          <div class="offcanvas-header">
+            <h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
+            <button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
+          </div>
+          <div class="offcanvas-body">
+            <nav class="toc" id="toc"></nav>
+          </div>
+        </div>
+      </div>
+
+      <div class="content">
+        <div class="actionbar">
+          <button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
+            <i class="bi bi-list"></i>
+          </button>
+
+          <nav id="breadcrumb"></nav>
+        </div>
+
+        <article data-uid="Apq.Cfg.Validation.Rules.RegexRule">
+
+
+
+  <h1 id="Apq_Cfg_Validation_Rules_RegexRule" data-uid="Apq.Cfg.Validation.Rules.RegexRule" class="text-break">
+Class RegexRule  
+  </h1>
+
+  <div class="facts text-secondary">
+    <dl><dt>Namespace</dt><dd><a class="xref" href="Apq.html">Apq</a>.<a class="xref" href="Apq.Cfg.html">Cfg</a>.<a class="xref" href="Apq.Cfg.Validation.html">Validation</a>.<a class="xref" href="Apq.Cfg.Validation.Rules.html">Rules</a></dd></dl>
+  <dl><dt>Assembly</dt><dd>Apq.Cfg.dll</dd></dl>
+  </div>
+
+  <div class="markdown summary"><p>正则表达式验证规则</p>
+</div>
+  <div class="markdown conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public sealed class RegexRule : IValidationRule</code></pre>
+  </div>
+
+
+
+
+  <dl class="typelist inheritance">
+    <dt>Inheritance</dt>
+    <dd>
+      <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
+      <div><span class="xref">RegexRule</span></div>
+    </dd>
+  </dl>
+
+  <dl class="typelist implements">
+    <dt>Implements</dt>
+    <dd>
+      <div><a class="xref" href="Apq.Cfg.Validation.IValidationRule.html">IValidationRule</a></div>
+    </dd>
+  </dl>
+
+
+  <dl class="typelist inheritedMembers">
+    <dt>Inherited Members</dt>
+    <dd>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object)</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object, object)</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object, object)</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>
+    </div>
+  </dd></dl>
+
+
+
+
+
+
+  <h2 class="section" id="constructors">Constructors
+</h2>
+
+
+  <a id="Apq_Cfg_Validation_Rules_RegexRule__ctor_" data-uid="Apq.Cfg.Validation.Rules.RegexRule.#ctor*"></a>
+
+  <h3 id="Apq_Cfg_Validation_Rules_RegexRule__ctor_System_String_System_String_System_String_System_Text_RegularExpressions_RegexOptions_" data-uid="Apq.Cfg.Validation.Rules.RegexRule.#ctor(System.String,System.String,System.String,System.Text.RegularExpressions.RegexOptions)">
+  RegexRule(string, string, string?, RegexOptions)
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>创建正则表达式验证规则</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public RegexRule(string key, string pattern, string? errorMessage = null, RegexOptions options = RegexOptions.None)</code></pre>
+  </div>
+
+  <h4 class="section">Parameters</h4>
+  <dl class="parameters">
+    <dt><code>key</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd><p>配置键</p>
+</dd>
+    <dt><code>pattern</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd><p>正则表达式模式</p>
+</dd>
+    <dt><code>errorMessage</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd><p>自定义错误消息</p>
+</dd>
+    <dt><code>options</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.text.regularexpressions.regexoptions">RegexOptions</a></dt>
+    <dd><p>正则表达式选项</p>
+</dd>
+  </dl>
+
+
+
+
+
+
+
+
+
+
+
+
+  <h2 class="section" id="properties">Properties
+</h2>
+
+
+  <a id="Apq_Cfg_Validation_Rules_RegexRule_ErrorMessage_" data-uid="Apq.Cfg.Validation.Rules.RegexRule.ErrorMessage*"></a>
+
+  <h3 id="Apq_Cfg_Validation_Rules_RegexRule_ErrorMessage" data-uid="Apq.Cfg.Validation.Rules.RegexRule.ErrorMessage">
+  ErrorMessage
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>自定义错误消息</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public string? ErrorMessage { get; }</code></pre>
+  </div>
+
+
+
+
+
+  <h4 class="section">Property Value</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd></dd>
+  </dl>
+
+
+
+
+
+
+
+
+  <a id="Apq_Cfg_Validation_Rules_RegexRule_Key_" data-uid="Apq.Cfg.Validation.Rules.RegexRule.Key*"></a>
+
+  <h3 id="Apq_Cfg_Validation_Rules_RegexRule_Key" data-uid="Apq.Cfg.Validation.Rules.RegexRule.Key">
+  Key
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>要验证的配置键</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public string Key { get; }</code></pre>
+  </div>
+
+
+
+
+
+  <h4 class="section">Property Value</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd></dd>
+  </dl>
+
+
+
+
+
+
+
+
+  <a id="Apq_Cfg_Validation_Rules_RegexRule_Name_" data-uid="Apq.Cfg.Validation.Rules.RegexRule.Name*"></a>
+
+  <h3 id="Apq_Cfg_Validation_Rules_RegexRule_Name" data-uid="Apq.Cfg.Validation.Rules.RegexRule.Name">
+  Name
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>规则名称</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public string Name { get; }</code></pre>
+  </div>
+
+
+
+
+
+  <h4 class="section">Property Value</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd></dd>
+  </dl>
+
+
+
+
+
+
+
+
+  <a id="Apq_Cfg_Validation_Rules_RegexRule_Pattern_" data-uid="Apq.Cfg.Validation.Rules.RegexRule.Pattern*"></a>
+
+  <h3 id="Apq_Cfg_Validation_Rules_RegexRule_Pattern" data-uid="Apq.Cfg.Validation.Rules.RegexRule.Pattern">
+  Pattern
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>正则表达式模式</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public string Pattern { get; }</code></pre>
+  </div>
+
+
+
+
+
+  <h4 class="section">Property Value</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd></dd>
+  </dl>
+
+
+
+
+
+
+
+
+  <h2 class="section" id="methods">Methods
+</h2>
+
+
+  <a id="Apq_Cfg_Validation_Rules_RegexRule_Validate_" data-uid="Apq.Cfg.Validation.Rules.RegexRule.Validate*"></a>
+
+  <h3 id="Apq_Cfg_Validation_Rules_RegexRule_Validate_System_String_" data-uid="Apq.Cfg.Validation.Rules.RegexRule.Validate(System.String)">
+  Validate(string?)
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>验证配置值</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public ValidationError? Validate(string? value)</code></pre>
+  </div>
+
+  <h4 class="section">Parameters</h4>
+  <dl class="parameters">
+    <dt><code>value</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd><p>配置值</p>
+</dd>
+  </dl>
+
+  <h4 class="section">Returns</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="Apq.Cfg.Validation.ValidationError.html">ValidationError</a></dt>
+    <dd><p>验证错误,如果验证通过返回 null</p>
+</dd>
+  </dl>
+
+
+
+
+
+
+
+
+
+
+
+
+</article>
+
+
+
+      </div>
+
+      <div class="affix">
+        <nav id="affix"></nav>
+      </div>
+    </main>
+
+    <div class="container-xxl search-results" id="search-results"></div>
+
+    <footer class="border-top text-secondary">
+      <div class="container-xxl">
+        <div class="flex-fill">
+          Apq.Cfg - .NET 统一配置组件库 (基于 .NET 10.0,兼容 .NET 8.0)
+        </div>
+      </div>
+    </footer>
+  </body>
+</html>

+ 360 - 0
docs/site/public/api-reference/api/Apq.Cfg.Validation.Rules.RequiredRule.html

@@ -0,0 +1,360 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8">
+      <title>Class RequiredRule | Apq.Cfg API </title>
+      <meta name="viewport" content="width=device-width, initial-scale=1.0">
+      <meta name="title" content="Class RequiredRule | Apq.Cfg API ">
+      
+      <meta name="description" content="必填验证规则">
+      <link rel="icon" href="../favicon.svg">
+      <link rel="stylesheet" href="../public/docfx.min.css">
+      <link rel="stylesheet" href="../public/main.css">
+      <meta name="docfx:navrel" content="../toc.html">
+      <meta name="docfx:tocrel" content="toc.html">
+      
+      <meta name="docfx:rel" content="../">
+      
+      
+      
+      <meta name="loc:inThisArticle" content="In this article">
+      <meta name="loc:searchResultsCount" content="{count} results for &quot;{query}&quot;">
+      <meta name="loc:searchNoResults" content="No results for &quot;{query}&quot;">
+      <meta name="loc:tocFilter" content="Filter by title">
+      <meta name="loc:nextArticle" content="Next">
+      <meta name="loc:prevArticle" content="Previous">
+      <meta name="loc:themeLight" content="Light">
+      <meta name="loc:themeDark" content="Dark">
+      <meta name="loc:themeAuto" content="Auto">
+      <meta name="loc:changeTheme" content="Change theme">
+      <meta name="loc:copy" content="Copy">
+      <meta name="loc:downloadPdf" content="Download PDF">
+
+      <script type="module" src="./../public/docfx.min.js"></script>
+
+      <script>
+        const theme = localStorage.getItem('theme') || 'auto'
+        document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
+      </script>
+
+  </head>
+
+  <body class="tex2jax_ignore" data-layout="" data-yaml-mime="ManagedReference">
+    <header class="bg-body border-bottom">
+      <nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
+        <div class="container-xxl flex-nowrap">
+          <a class="navbar-brand" href="../index.html">
+            <img id="logo" class="svg" src="../images/logo-small.svg" alt="Apq.Cfg">
+            Apq.Cfg
+          </a>
+          <button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
+            <i class="bi bi-three-dots"></i>
+          </button>
+          <div class="collapse navbar-collapse" id="navpanel">
+            <div id="navbar">
+              <form class="search" role="search" id="search">
+                <i class="bi bi-search"></i>
+                <input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
+              </form>
+            </div>
+          </div>
+        </div>
+      </nav>
+    </header>
+
+    <main class="container-xxl">
+      <div class="toc-offcanvas">
+        <div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
+          <div class="offcanvas-header">
+            <h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
+            <button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
+          </div>
+          <div class="offcanvas-body">
+            <nav class="toc" id="toc"></nav>
+          </div>
+        </div>
+      </div>
+
+      <div class="content">
+        <div class="actionbar">
+          <button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
+            <i class="bi bi-list"></i>
+          </button>
+
+          <nav id="breadcrumb"></nav>
+        </div>
+
+        <article data-uid="Apq.Cfg.Validation.Rules.RequiredRule">
+
+
+
+  <h1 id="Apq_Cfg_Validation_Rules_RequiredRule" data-uid="Apq.Cfg.Validation.Rules.RequiredRule" class="text-break">
+Class RequiredRule  
+  </h1>
+
+  <div class="facts text-secondary">
+    <dl><dt>Namespace</dt><dd><a class="xref" href="Apq.html">Apq</a>.<a class="xref" href="Apq.Cfg.html">Cfg</a>.<a class="xref" href="Apq.Cfg.Validation.html">Validation</a>.<a class="xref" href="Apq.Cfg.Validation.Rules.html">Rules</a></dd></dl>
+  <dl><dt>Assembly</dt><dd>Apq.Cfg.dll</dd></dl>
+  </div>
+
+  <div class="markdown summary"><p>必填验证规则</p>
+</div>
+  <div class="markdown conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public sealed class RequiredRule : IValidationRule</code></pre>
+  </div>
+
+
+
+
+  <dl class="typelist inheritance">
+    <dt>Inheritance</dt>
+    <dd>
+      <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
+      <div><span class="xref">RequiredRule</span></div>
+    </dd>
+  </dl>
+
+  <dl class="typelist implements">
+    <dt>Implements</dt>
+    <dd>
+      <div><a class="xref" href="Apq.Cfg.Validation.IValidationRule.html">IValidationRule</a></div>
+    </dd>
+  </dl>
+
+
+  <dl class="typelist inheritedMembers">
+    <dt>Inherited Members</dt>
+    <dd>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object)</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object, object)</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object, object)</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>
+    </div>
+  </dd></dl>
+
+
+
+
+
+
+  <h2 class="section" id="constructors">Constructors
+</h2>
+
+
+  <a id="Apq_Cfg_Validation_Rules_RequiredRule__ctor_" data-uid="Apq.Cfg.Validation.Rules.RequiredRule.#ctor*"></a>
+
+  <h3 id="Apq_Cfg_Validation_Rules_RequiredRule__ctor_System_String_System_String_" data-uid="Apq.Cfg.Validation.Rules.RequiredRule.#ctor(System.String,System.String)">
+  RequiredRule(string, string?)
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>创建必填验证规则</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public RequiredRule(string key, string? errorMessage = null)</code></pre>
+  </div>
+
+  <h4 class="section">Parameters</h4>
+  <dl class="parameters">
+    <dt><code>key</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd><p>配置键</p>
+</dd>
+    <dt><code>errorMessage</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd><p>自定义错误消息</p>
+</dd>
+  </dl>
+
+
+
+
+
+
+
+
+
+
+
+
+  <h2 class="section" id="properties">Properties
+</h2>
+
+
+  <a id="Apq_Cfg_Validation_Rules_RequiredRule_ErrorMessage_" data-uid="Apq.Cfg.Validation.Rules.RequiredRule.ErrorMessage*"></a>
+
+  <h3 id="Apq_Cfg_Validation_Rules_RequiredRule_ErrorMessage" data-uid="Apq.Cfg.Validation.Rules.RequiredRule.ErrorMessage">
+  ErrorMessage
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>自定义错误消息</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public string? ErrorMessage { get; }</code></pre>
+  </div>
+
+
+
+
+
+  <h4 class="section">Property Value</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd></dd>
+  </dl>
+
+
+
+
+
+
+
+
+  <a id="Apq_Cfg_Validation_Rules_RequiredRule_Key_" data-uid="Apq.Cfg.Validation.Rules.RequiredRule.Key*"></a>
+
+  <h3 id="Apq_Cfg_Validation_Rules_RequiredRule_Key" data-uid="Apq.Cfg.Validation.Rules.RequiredRule.Key">
+  Key
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>要验证的配置键</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public string Key { get; }</code></pre>
+  </div>
+
+
+
+
+
+  <h4 class="section">Property Value</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd></dd>
+  </dl>
+
+
+
+
+
+
+
+
+  <a id="Apq_Cfg_Validation_Rules_RequiredRule_Name_" data-uid="Apq.Cfg.Validation.Rules.RequiredRule.Name*"></a>
+
+  <h3 id="Apq_Cfg_Validation_Rules_RequiredRule_Name" data-uid="Apq.Cfg.Validation.Rules.RequiredRule.Name">
+  Name
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>规则名称</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public string Name { get; }</code></pre>
+  </div>
+
+
+
+
+
+  <h4 class="section">Property Value</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd></dd>
+  </dl>
+
+
+
+
+
+
+
+
+  <h2 class="section" id="methods">Methods
+</h2>
+
+
+  <a id="Apq_Cfg_Validation_Rules_RequiredRule_Validate_" data-uid="Apq.Cfg.Validation.Rules.RequiredRule.Validate*"></a>
+
+  <h3 id="Apq_Cfg_Validation_Rules_RequiredRule_Validate_System_String_" data-uid="Apq.Cfg.Validation.Rules.RequiredRule.Validate(System.String)">
+  Validate(string?)
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>验证配置值</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public ValidationError? Validate(string? value)</code></pre>
+  </div>
+
+  <h4 class="section">Parameters</h4>
+  <dl class="parameters">
+    <dt><code>value</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd><p>配置值</p>
+</dd>
+  </dl>
+
+  <h4 class="section">Returns</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="Apq.Cfg.Validation.ValidationError.html">ValidationError</a></dt>
+    <dd><p>验证错误,如果验证通过返回 null</p>
+</dd>
+  </dl>
+
+
+
+
+
+
+
+
+
+
+
+
+</article>
+
+
+
+      </div>
+
+      <div class="affix">
+        <nav id="affix"></nav>
+      </div>
+    </main>
+
+    <div class="container-xxl search-results" id="search-results"></div>
+
+    <footer class="border-top text-secondary">
+      <div class="container-xxl">
+        <div class="flex-fill">
+          Apq.Cfg - .NET 统一配置组件库 (基于 .NET 10.0,兼容 .NET 8.0)
+        </div>
+      </div>
+    </footer>
+  </body>
+</html>

+ 160 - 0
docs/site/public/api-reference/api/Apq.Cfg.Validation.Rules.html

@@ -0,0 +1,160 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8">
+      <title>Namespace Apq.Cfg.Validation.Rules | Apq.Cfg API </title>
+      <meta name="viewport" content="width=device-width, initial-scale=1.0">
+      <meta name="title" content="Namespace Apq.Cfg.Validation.Rules | Apq.Cfg API ">
+      
+      
+      <link rel="icon" href="../favicon.svg">
+      <link rel="stylesheet" href="../public/docfx.min.css">
+      <link rel="stylesheet" href="../public/main.css">
+      <meta name="docfx:navrel" content="../toc.html">
+      <meta name="docfx:tocrel" content="toc.html">
+      
+      <meta name="docfx:rel" content="../">
+      
+      
+      
+      <meta name="loc:inThisArticle" content="In this article">
+      <meta name="loc:searchResultsCount" content="{count} results for &quot;{query}&quot;">
+      <meta name="loc:searchNoResults" content="No results for &quot;{query}&quot;">
+      <meta name="loc:tocFilter" content="Filter by title">
+      <meta name="loc:nextArticle" content="Next">
+      <meta name="loc:prevArticle" content="Previous">
+      <meta name="loc:themeLight" content="Light">
+      <meta name="loc:themeDark" content="Dark">
+      <meta name="loc:themeAuto" content="Auto">
+      <meta name="loc:changeTheme" content="Change theme">
+      <meta name="loc:copy" content="Copy">
+      <meta name="loc:downloadPdf" content="Download PDF">
+
+      <script type="module" src="./../public/docfx.min.js"></script>
+
+      <script>
+        const theme = localStorage.getItem('theme') || 'auto'
+        document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
+      </script>
+
+  </head>
+
+  <body class="tex2jax_ignore" data-layout="" data-yaml-mime="ManagedReference">
+    <header class="bg-body border-bottom">
+      <nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
+        <div class="container-xxl flex-nowrap">
+          <a class="navbar-brand" href="../index.html">
+            <img id="logo" class="svg" src="../images/logo-small.svg" alt="Apq.Cfg">
+            Apq.Cfg
+          </a>
+          <button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
+            <i class="bi bi-three-dots"></i>
+          </button>
+          <div class="collapse navbar-collapse" id="navpanel">
+            <div id="navbar">
+              <form class="search" role="search" id="search">
+                <i class="bi bi-search"></i>
+                <input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
+              </form>
+            </div>
+          </div>
+        </div>
+      </nav>
+    </header>
+
+    <main class="container-xxl">
+      <div class="toc-offcanvas">
+        <div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
+          <div class="offcanvas-header">
+            <h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
+            <button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
+          </div>
+          <div class="offcanvas-body">
+            <nav class="toc" id="toc"></nav>
+          </div>
+        </div>
+      </div>
+
+      <div class="content">
+        <div class="actionbar">
+          <button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
+            <i class="bi bi-list"></i>
+          </button>
+
+          <nav id="breadcrumb"></nav>
+        </div>
+
+        <article data-uid="Apq.Cfg.Validation.Rules">
+
+  <h1 id="Apq_Cfg_Validation_Rules" data-uid="Apq.Cfg.Validation.Rules" class="text-break">Namespace Apq.Cfg.Validation.Rules</h1>
+  <div class="markdown level0 summary"></div>
+  <div class="markdown level0 conceptual"></div>
+  <div class="markdown level0 remarks"></div>
+
+    <h3 id="classes">
+Classes
+</h3>
+    <dl class="jumplist">
+      <dt><a class="xref" href="Apq.Cfg.Validation.Rules.CustomRule.html">CustomRule</a></dt>
+      <dd><p>自定义验证规则</p>
+</dd>
+    </dl>
+    <dl class="jumplist">
+      <dt><a class="xref" href="Apq.Cfg.Validation.Rules.DependsOnRule.html">DependsOnRule</a></dt>
+      <dd><p>依赖验证规则 - 当依赖键存在时,当前键也必须存在</p>
+</dd>
+    </dl>
+    <dl class="jumplist">
+      <dt><a class="xref" href="Apq.Cfg.Validation.Rules.EnumValuesRule.html">EnumValuesRule</a></dt>
+      <dd><p>枚举值验证规则 - 验证值是否在允许的值列表中</p>
+</dd>
+    </dl>
+    <dl class="jumplist">
+      <dt><a class="xref" href="Apq.Cfg.Validation.Rules.LengthRule.html">LengthRule</a></dt>
+      <dd><p>字符串长度验证规则</p>
+</dd>
+    </dl>
+    <dl class="jumplist">
+      <dt><a class="xref" href="Apq.Cfg.Validation.Rules.RangeRule.html">RangeRule</a></dt>
+      <dd><p>范围验证规则工厂</p>
+</dd>
+    </dl>
+    <dl class="jumplist">
+      <dt><a class="xref" href="Apq.Cfg.Validation.Rules.RangeRule-1.html">RangeRule&lt;T&gt;</a></dt>
+      <dd><p>范围验证规则</p>
+</dd>
+    </dl>
+    <dl class="jumplist">
+      <dt><a class="xref" href="Apq.Cfg.Validation.Rules.RegexRule.html">RegexRule</a></dt>
+      <dd><p>正则表达式验证规则</p>
+</dd>
+    </dl>
+    <dl class="jumplist">
+      <dt><a class="xref" href="Apq.Cfg.Validation.Rules.RequiredRule.html">RequiredRule</a></dt>
+      <dd><p>必填验证规则</p>
+</dd>
+    </dl>
+
+
+</article>
+
+
+
+      </div>
+
+      <div class="affix">
+        <nav id="affix"></nav>
+      </div>
+    </main>
+
+    <div class="container-xxl search-results" id="search-results"></div>
+
+    <footer class="border-top text-secondary">
+      <div class="container-xxl">
+        <div class="flex-fill">
+          Apq.Cfg - .NET 统一配置组件库 (基于 .NET 10.0,兼容 .NET 8.0)
+        </div>
+      </div>
+    </footer>
+  </body>
+</html>

+ 382 - 0
docs/site/public/api-reference/api/Apq.Cfg.Validation.ValidationError.html

@@ -0,0 +1,382 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8">
+      <title>Class ValidationError | Apq.Cfg API </title>
+      <meta name="viewport" content="width=device-width, initial-scale=1.0">
+      <meta name="title" content="Class ValidationError | Apq.Cfg API ">
+      
+      <meta name="description" content="配置验证错误">
+      <link rel="icon" href="../favicon.svg">
+      <link rel="stylesheet" href="../public/docfx.min.css">
+      <link rel="stylesheet" href="../public/main.css">
+      <meta name="docfx:navrel" content="../toc.html">
+      <meta name="docfx:tocrel" content="toc.html">
+      
+      <meta name="docfx:rel" content="../">
+      
+      
+      
+      <meta name="loc:inThisArticle" content="In this article">
+      <meta name="loc:searchResultsCount" content="{count} results for &quot;{query}&quot;">
+      <meta name="loc:searchNoResults" content="No results for &quot;{query}&quot;">
+      <meta name="loc:tocFilter" content="Filter by title">
+      <meta name="loc:nextArticle" content="Next">
+      <meta name="loc:prevArticle" content="Previous">
+      <meta name="loc:themeLight" content="Light">
+      <meta name="loc:themeDark" content="Dark">
+      <meta name="loc:themeAuto" content="Auto">
+      <meta name="loc:changeTheme" content="Change theme">
+      <meta name="loc:copy" content="Copy">
+      <meta name="loc:downloadPdf" content="Download PDF">
+
+      <script type="module" src="./../public/docfx.min.js"></script>
+
+      <script>
+        const theme = localStorage.getItem('theme') || 'auto'
+        document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
+      </script>
+
+  </head>
+
+  <body class="tex2jax_ignore" data-layout="" data-yaml-mime="ManagedReference">
+    <header class="bg-body border-bottom">
+      <nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
+        <div class="container-xxl flex-nowrap">
+          <a class="navbar-brand" href="../index.html">
+            <img id="logo" class="svg" src="../images/logo-small.svg" alt="Apq.Cfg">
+            Apq.Cfg
+          </a>
+          <button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
+            <i class="bi bi-three-dots"></i>
+          </button>
+          <div class="collapse navbar-collapse" id="navpanel">
+            <div id="navbar">
+              <form class="search" role="search" id="search">
+                <i class="bi bi-search"></i>
+                <input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
+              </form>
+            </div>
+          </div>
+        </div>
+      </nav>
+    </header>
+
+    <main class="container-xxl">
+      <div class="toc-offcanvas">
+        <div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
+          <div class="offcanvas-header">
+            <h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
+            <button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
+          </div>
+          <div class="offcanvas-body">
+            <nav class="toc" id="toc"></nav>
+          </div>
+        </div>
+      </div>
+
+      <div class="content">
+        <div class="actionbar">
+          <button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
+            <i class="bi bi-list"></i>
+          </button>
+
+          <nav id="breadcrumb"></nav>
+        </div>
+
+        <article data-uid="Apq.Cfg.Validation.ValidationError">
+
+
+
+  <h1 id="Apq_Cfg_Validation_ValidationError" data-uid="Apq.Cfg.Validation.ValidationError" class="text-break">
+Class ValidationError  
+  </h1>
+
+  <div class="facts text-secondary">
+    <dl><dt>Namespace</dt><dd><a class="xref" href="Apq.html">Apq</a>.<a class="xref" href="Apq.Cfg.html">Cfg</a>.<a class="xref" href="Apq.Cfg.Validation.html">Validation</a></dd></dl>
+  <dl><dt>Assembly</dt><dd>Apq.Cfg.dll</dd></dl>
+  </div>
+
+  <div class="markdown summary"><p>配置验证错误</p>
+</div>
+  <div class="markdown conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public sealed class ValidationError</code></pre>
+  </div>
+
+
+
+
+  <dl class="typelist inheritance">
+    <dt>Inheritance</dt>
+    <dd>
+      <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
+      <div><span class="xref">ValidationError</span></div>
+    </dd>
+  </dl>
+
+
+
+  <dl class="typelist inheritedMembers">
+    <dt>Inherited Members</dt>
+    <dd>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object)</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object, object)</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object, object)</a>
+    </div>
+  </dd></dl>
+
+
+
+
+
+
+  <h2 class="section" id="constructors">Constructors
+</h2>
+
+
+  <a id="Apq_Cfg_Validation_ValidationError__ctor_" data-uid="Apq.Cfg.Validation.ValidationError.#ctor*"></a>
+
+  <h3 id="Apq_Cfg_Validation_ValidationError__ctor_System_String_System_String_System_String_System_String_" data-uid="Apq.Cfg.Validation.ValidationError.#ctor(System.String,System.String,System.String,System.String)">
+  ValidationError(string, string, string, string?)
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>创建验证错误</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public ValidationError(string key, string message, string ruleName, string? actualValue = null)</code></pre>
+  </div>
+
+  <h4 class="section">Parameters</h4>
+  <dl class="parameters">
+    <dt><code>key</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd><p>配置键</p>
+</dd>
+    <dt><code>message</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd><p>错误消息</p>
+</dd>
+    <dt><code>ruleName</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd><p>规则名称</p>
+</dd>
+    <dt><code>actualValue</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd><p>实际值</p>
+</dd>
+  </dl>
+
+
+
+
+
+
+
+
+
+
+
+
+  <h2 class="section" id="properties">Properties
+</h2>
+
+
+  <a id="Apq_Cfg_Validation_ValidationError_ActualValue_" data-uid="Apq.Cfg.Validation.ValidationError.ActualValue*"></a>
+
+  <h3 id="Apq_Cfg_Validation_ValidationError_ActualValue" data-uid="Apq.Cfg.Validation.ValidationError.ActualValue">
+  ActualValue
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>实际值(可能为 null 或脱敏后的值)</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public string? ActualValue { get; }</code></pre>
+  </div>
+
+
+
+
+
+  <h4 class="section">Property Value</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd></dd>
+  </dl>
+
+
+
+
+
+
+
+
+  <a id="Apq_Cfg_Validation_ValidationError_Key_" data-uid="Apq.Cfg.Validation.ValidationError.Key*"></a>
+
+  <h3 id="Apq_Cfg_Validation_ValidationError_Key" data-uid="Apq.Cfg.Validation.ValidationError.Key">
+  Key
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>配置键</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public string Key { get; }</code></pre>
+  </div>
+
+
+
+
+
+  <h4 class="section">Property Value</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd></dd>
+  </dl>
+
+
+
+
+
+
+
+
+  <a id="Apq_Cfg_Validation_ValidationError_Message_" data-uid="Apq.Cfg.Validation.ValidationError.Message*"></a>
+
+  <h3 id="Apq_Cfg_Validation_ValidationError_Message" data-uid="Apq.Cfg.Validation.ValidationError.Message">
+  Message
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>错误消息</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public string Message { get; }</code></pre>
+  </div>
+
+
+
+
+
+  <h4 class="section">Property Value</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd></dd>
+  </dl>
+
+
+
+
+
+
+
+
+  <a id="Apq_Cfg_Validation_ValidationError_RuleName_" data-uid="Apq.Cfg.Validation.ValidationError.RuleName*"></a>
+
+  <h3 id="Apq_Cfg_Validation_ValidationError_RuleName" data-uid="Apq.Cfg.Validation.ValidationError.RuleName">
+  RuleName
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>规则名称</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public string RuleName { get; }</code></pre>
+  </div>
+
+
+
+
+
+  <h4 class="section">Property Value</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd></dd>
+  </dl>
+
+
+
+
+
+
+
+
+  <h2 class="section" id="methods">Methods
+</h2>
+
+
+  <a id="Apq_Cfg_Validation_ValidationError_ToString_" data-uid="Apq.Cfg.Validation.ValidationError.ToString*"></a>
+
+  <h3 id="Apq_Cfg_Validation_ValidationError_ToString" data-uid="Apq.Cfg.Validation.ValidationError.ToString">
+  ToString()
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>返回错误的字符串表示</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public override string ToString()</code></pre>
+  </div>
+
+
+  <h4 class="section">Returns</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd></dd>
+  </dl>
+
+
+
+
+
+
+
+
+
+
+
+
+</article>
+
+
+
+      </div>
+
+      <div class="affix">
+        <nav id="affix"></nav>
+      </div>
+    </main>
+
+    <div class="container-xxl search-results" id="search-results"></div>
+
+    <footer class="border-top text-secondary">
+      <div class="container-xxl">
+        <div class="flex-fill">
+          Apq.Cfg - .NET 统一配置组件库 (基于 .NET 10.0,兼容 .NET 8.0)
+        </div>
+      </div>
+    </footer>
+  </body>
+</html>

+ 527 - 0
docs/site/public/api-reference/api/Apq.Cfg.Validation.ValidationResult.html

@@ -0,0 +1,527 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8">
+      <title>Class ValidationResult | Apq.Cfg API </title>
+      <meta name="viewport" content="width=device-width, initial-scale=1.0">
+      <meta name="title" content="Class ValidationResult | Apq.Cfg API ">
+      
+      <meta name="description" content="配置验证结果">
+      <link rel="icon" href="../favicon.svg">
+      <link rel="stylesheet" href="../public/docfx.min.css">
+      <link rel="stylesheet" href="../public/main.css">
+      <meta name="docfx:navrel" content="../toc.html">
+      <meta name="docfx:tocrel" content="toc.html">
+      
+      <meta name="docfx:rel" content="../">
+      
+      
+      
+      <meta name="loc:inThisArticle" content="In this article">
+      <meta name="loc:searchResultsCount" content="{count} results for &quot;{query}&quot;">
+      <meta name="loc:searchNoResults" content="No results for &quot;{query}&quot;">
+      <meta name="loc:tocFilter" content="Filter by title">
+      <meta name="loc:nextArticle" content="Next">
+      <meta name="loc:prevArticle" content="Previous">
+      <meta name="loc:themeLight" content="Light">
+      <meta name="loc:themeDark" content="Dark">
+      <meta name="loc:themeAuto" content="Auto">
+      <meta name="loc:changeTheme" content="Change theme">
+      <meta name="loc:copy" content="Copy">
+      <meta name="loc:downloadPdf" content="Download PDF">
+
+      <script type="module" src="./../public/docfx.min.js"></script>
+
+      <script>
+        const theme = localStorage.getItem('theme') || 'auto'
+        document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
+      </script>
+
+  </head>
+
+  <body class="tex2jax_ignore" data-layout="" data-yaml-mime="ManagedReference">
+    <header class="bg-body border-bottom">
+      <nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
+        <div class="container-xxl flex-nowrap">
+          <a class="navbar-brand" href="../index.html">
+            <img id="logo" class="svg" src="../images/logo-small.svg" alt="Apq.Cfg">
+            Apq.Cfg
+          </a>
+          <button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
+            <i class="bi bi-three-dots"></i>
+          </button>
+          <div class="collapse navbar-collapse" id="navpanel">
+            <div id="navbar">
+              <form class="search" role="search" id="search">
+                <i class="bi bi-search"></i>
+                <input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
+              </form>
+            </div>
+          </div>
+        </div>
+      </nav>
+    </header>
+
+    <main class="container-xxl">
+      <div class="toc-offcanvas">
+        <div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
+          <div class="offcanvas-header">
+            <h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
+            <button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
+          </div>
+          <div class="offcanvas-body">
+            <nav class="toc" id="toc"></nav>
+          </div>
+        </div>
+      </div>
+
+      <div class="content">
+        <div class="actionbar">
+          <button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
+            <i class="bi bi-list"></i>
+          </button>
+
+          <nav id="breadcrumb"></nav>
+        </div>
+
+        <article data-uid="Apq.Cfg.Validation.ValidationResult">
+
+
+
+  <h1 id="Apq_Cfg_Validation_ValidationResult" data-uid="Apq.Cfg.Validation.ValidationResult" class="text-break">
+Class ValidationResult  
+  </h1>
+
+  <div class="facts text-secondary">
+    <dl><dt>Namespace</dt><dd><a class="xref" href="Apq.html">Apq</a>.<a class="xref" href="Apq.Cfg.html">Cfg</a>.<a class="xref" href="Apq.Cfg.Validation.html">Validation</a></dd></dl>
+  <dl><dt>Assembly</dt><dd>Apq.Cfg.dll</dd></dl>
+  </div>
+
+  <div class="markdown summary"><p>配置验证结果</p>
+</div>
+  <div class="markdown conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public sealed class ValidationResult</code></pre>
+  </div>
+
+
+
+
+  <dl class="typelist inheritance">
+    <dt>Inheritance</dt>
+    <dd>
+      <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
+      <div><span class="xref">ValidationResult</span></div>
+    </dd>
+  </dl>
+
+
+
+  <dl class="typelist inheritedMembers">
+    <dt>Inherited Members</dt>
+    <dd>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object)</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object, object)</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>
+    </div>
+    <div>
+      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object, object)</a>
+    </div>
+  </dd></dl>
+
+
+
+
+
+
+  <h2 class="section" id="constructors">Constructors
+</h2>
+
+
+  <a id="Apq_Cfg_Validation_ValidationResult__ctor_" data-uid="Apq.Cfg.Validation.ValidationResult.#ctor*"></a>
+
+  <h3 id="Apq_Cfg_Validation_ValidationResult__ctor_System_Collections_Generic_IEnumerable_Apq_Cfg_Validation_ValidationError__" data-uid="Apq.Cfg.Validation.ValidationResult.#ctor(System.Collections.Generic.IEnumerable{Apq.Cfg.Validation.ValidationError})">
+  ValidationResult(IEnumerable&lt;ValidationError&gt;?)
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>创建验证结果</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public ValidationResult(IEnumerable&lt;ValidationError&gt;? errors = null)</code></pre>
+  </div>
+
+  <h4 class="section">Parameters</h4>
+  <dl class="parameters">
+    <dt><code>errors</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1">IEnumerable</a>&lt;<a class="xref" href="Apq.Cfg.Validation.ValidationError.html">ValidationError</a>&gt;</dt>
+    <dd><p>验证错误列表</p>
+</dd>
+  </dl>
+
+
+
+
+
+
+
+
+
+
+
+
+  <h2 class="section" id="properties">Properties
+</h2>
+
+
+  <a id="Apq_Cfg_Validation_ValidationResult_ErrorCount_" data-uid="Apq.Cfg.Validation.ValidationResult.ErrorCount*"></a>
+
+  <h3 id="Apq_Cfg_Validation_ValidationResult_ErrorCount" data-uid="Apq.Cfg.Validation.ValidationResult.ErrorCount">
+  ErrorCount
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>错误数量</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public int ErrorCount { get; }</code></pre>
+  </div>
+
+
+
+
+
+  <h4 class="section">Property Value</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
+    <dd></dd>
+  </dl>
+
+
+
+
+
+
+
+
+  <a id="Apq_Cfg_Validation_ValidationResult_Errors_" data-uid="Apq.Cfg.Validation.ValidationResult.Errors*"></a>
+
+  <h3 id="Apq_Cfg_Validation_ValidationResult_Errors" data-uid="Apq.Cfg.Validation.ValidationResult.Errors">
+  Errors
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>验证错误列表</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public IReadOnlyList&lt;ValidationError&gt; Errors { get; }</code></pre>
+  </div>
+
+
+
+
+
+  <h4 class="section">Property Value</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ireadonlylist-1">IReadOnlyList</a>&lt;<a class="xref" href="Apq.Cfg.Validation.ValidationError.html">ValidationError</a>&gt;</dt>
+    <dd></dd>
+  </dl>
+
+
+
+
+
+
+
+
+  <a id="Apq_Cfg_Validation_ValidationResult_IsValid_" data-uid="Apq.Cfg.Validation.ValidationResult.IsValid*"></a>
+
+  <h3 id="Apq_Cfg_Validation_ValidationResult_IsValid" data-uid="Apq.Cfg.Validation.ValidationResult.IsValid">
+  IsValid
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>验证是否通过</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public bool IsValid { get; }</code></pre>
+  </div>
+
+
+
+
+
+  <h4 class="section">Property Value</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
+    <dd></dd>
+  </dl>
+
+
+
+
+
+
+
+
+  <a id="Apq_Cfg_Validation_ValidationResult_Success_" data-uid="Apq.Cfg.Validation.ValidationResult.Success*"></a>
+
+  <h3 id="Apq_Cfg_Validation_ValidationResult_Success" data-uid="Apq.Cfg.Validation.ValidationResult.Success">
+  Success
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>成功的验证结果</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public static ValidationResult Success { get; }</code></pre>
+  </div>
+
+
+
+
+
+  <h4 class="section">Property Value</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="Apq.Cfg.Validation.ValidationResult.html">ValidationResult</a></dt>
+    <dd></dd>
+  </dl>
+
+
+
+
+
+
+
+
+  <h2 class="section" id="methods">Methods
+</h2>
+
+
+  <a id="Apq_Cfg_Validation_ValidationResult_Failure_" data-uid="Apq.Cfg.Validation.ValidationResult.Failure*"></a>
+
+  <h3 id="Apq_Cfg_Validation_ValidationResult_Failure_Apq_Cfg_Validation_ValidationError___" data-uid="Apq.Cfg.Validation.ValidationResult.Failure(Apq.Cfg.Validation.ValidationError[])">
+  Failure(params ValidationError[])
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>创建失败的验证结果</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public static ValidationResult Failure(params ValidationError[] errors)</code></pre>
+  </div>
+
+  <h4 class="section">Parameters</h4>
+  <dl class="parameters">
+    <dt><code>errors</code> <a class="xref" href="Apq.Cfg.Validation.ValidationError.html">ValidationError</a>[]</dt>
+    <dd><p>错误列表</p>
+</dd>
+  </dl>
+
+  <h4 class="section">Returns</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="Apq.Cfg.Validation.ValidationResult.html">ValidationResult</a></dt>
+    <dd></dd>
+  </dl>
+
+
+
+
+
+
+
+
+
+
+
+  <a id="Apq_Cfg_Validation_ValidationResult_Failure_" data-uid="Apq.Cfg.Validation.ValidationResult.Failure*"></a>
+
+  <h3 id="Apq_Cfg_Validation_ValidationResult_Failure_System_Collections_Generic_IEnumerable_Apq_Cfg_Validation_ValidationError__" data-uid="Apq.Cfg.Validation.ValidationResult.Failure(System.Collections.Generic.IEnumerable{Apq.Cfg.Validation.ValidationError})">
+  Failure(IEnumerable&lt;ValidationError&gt;)
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>创建失败的验证结果</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public static ValidationResult Failure(IEnumerable&lt;ValidationError&gt; errors)</code></pre>
+  </div>
+
+  <h4 class="section">Parameters</h4>
+  <dl class="parameters">
+    <dt><code>errors</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1">IEnumerable</a>&lt;<a class="xref" href="Apq.Cfg.Validation.ValidationError.html">ValidationError</a>&gt;</dt>
+    <dd><p>错误列表</p>
+</dd>
+  </dl>
+
+  <h4 class="section">Returns</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="Apq.Cfg.Validation.ValidationResult.html">ValidationResult</a></dt>
+    <dd></dd>
+  </dl>
+
+
+
+
+
+
+
+
+
+
+
+  <a id="Apq_Cfg_Validation_ValidationResult_GetErrorsForKey_" data-uid="Apq.Cfg.Validation.ValidationResult.GetErrorsForKey*"></a>
+
+  <h3 id="Apq_Cfg_Validation_ValidationResult_GetErrorsForKey_System_String_" data-uid="Apq.Cfg.Validation.ValidationResult.GetErrorsForKey(System.String)">
+  GetErrorsForKey(string)
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>获取指定键的错误</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public IEnumerable&lt;ValidationError&gt; GetErrorsForKey(string key)</code></pre>
+  </div>
+
+  <h4 class="section">Parameters</h4>
+  <dl class="parameters">
+    <dt><code>key</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd><p>配置键</p>
+</dd>
+  </dl>
+
+  <h4 class="section">Returns</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1">IEnumerable</a>&lt;<a class="xref" href="Apq.Cfg.Validation.ValidationError.html">ValidationError</a>&gt;</dt>
+    <dd><p>该键的所有错误</p>
+</dd>
+  </dl>
+
+
+
+
+
+
+
+
+
+
+
+  <a id="Apq_Cfg_Validation_ValidationResult_HasErrorsForKey_" data-uid="Apq.Cfg.Validation.ValidationResult.HasErrorsForKey*"></a>
+
+  <h3 id="Apq_Cfg_Validation_ValidationResult_HasErrorsForKey_System_String_" data-uid="Apq.Cfg.Validation.ValidationResult.HasErrorsForKey(System.String)">
+  HasErrorsForKey(string)
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>检查指定键是否有错误</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public bool HasErrorsForKey(string key)</code></pre>
+  </div>
+
+  <h4 class="section">Parameters</h4>
+  <dl class="parameters">
+    <dt><code>key</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd><p>配置键</p>
+</dd>
+  </dl>
+
+  <h4 class="section">Returns</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
+    <dd><p>如果有错误返回 true</p>
+</dd>
+  </dl>
+
+
+
+
+
+
+
+
+
+
+
+  <a id="Apq_Cfg_Validation_ValidationResult_ToString_" data-uid="Apq.Cfg.Validation.ValidationResult.ToString*"></a>
+
+  <h3 id="Apq_Cfg_Validation_ValidationResult_ToString" data-uid="Apq.Cfg.Validation.ValidationResult.ToString">
+  ToString()
+  
+  </h3>
+
+  <div class="markdown level1 summary"><p>返回验证结果的字符串表示</p>
+</div>
+  <div class="markdown level1 conceptual"></div>
+
+  <div class="codewrapper">
+    <pre><code class="lang-csharp hljs">public override string ToString()</code></pre>
+  </div>
+
+
+  <h4 class="section">Returns</h4>
+  <dl class="parameters">
+    <dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
+    <dd></dd>
+  </dl>
+
+
+
+
+
+
+
+
+
+
+
+
+</article>
+
+
+
+      </div>
+
+      <div class="affix">
+        <nav id="affix"></nav>
+      </div>
+    </main>
+
+    <div class="container-xxl search-results" id="search-results"></div>
+
+    <footer class="border-top text-secondary">
+      <div class="container-xxl">
+        <div class="flex-fill">
+          Apq.Cfg - .NET 统一配置组件库 (基于 .NET 10.0,兼容 .NET 8.0)
+        </div>
+      </div>
+    </footer>
+  </body>
+</html>

+ 163 - 0
docs/site/public/api-reference/api/Apq.Cfg.Validation.html

@@ -0,0 +1,163 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8">
+      <title>Namespace Apq.Cfg.Validation | Apq.Cfg API </title>
+      <meta name="viewport" content="width=device-width, initial-scale=1.0">
+      <meta name="title" content="Namespace Apq.Cfg.Validation | Apq.Cfg API ">
+      
+      
+      <link rel="icon" href="../favicon.svg">
+      <link rel="stylesheet" href="../public/docfx.min.css">
+      <link rel="stylesheet" href="../public/main.css">
+      <meta name="docfx:navrel" content="../toc.html">
+      <meta name="docfx:tocrel" content="toc.html">
+      
+      <meta name="docfx:rel" content="../">
+      
+      
+      
+      <meta name="loc:inThisArticle" content="In this article">
+      <meta name="loc:searchResultsCount" content="{count} results for &quot;{query}&quot;">
+      <meta name="loc:searchNoResults" content="No results for &quot;{query}&quot;">
+      <meta name="loc:tocFilter" content="Filter by title">
+      <meta name="loc:nextArticle" content="Next">
+      <meta name="loc:prevArticle" content="Previous">
+      <meta name="loc:themeLight" content="Light">
+      <meta name="loc:themeDark" content="Dark">
+      <meta name="loc:themeAuto" content="Auto">
+      <meta name="loc:changeTheme" content="Change theme">
+      <meta name="loc:copy" content="Copy">
+      <meta name="loc:downloadPdf" content="Download PDF">
+
+      <script type="module" src="./../public/docfx.min.js"></script>
+
+      <script>
+        const theme = localStorage.getItem('theme') || 'auto'
+        document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
+      </script>
+
+  </head>
+
+  <body class="tex2jax_ignore" data-layout="" data-yaml-mime="ManagedReference">
+    <header class="bg-body border-bottom">
+      <nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
+        <div class="container-xxl flex-nowrap">
+          <a class="navbar-brand" href="../index.html">
+            <img id="logo" class="svg" src="../images/logo-small.svg" alt="Apq.Cfg">
+            Apq.Cfg
+          </a>
+          <button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
+            <i class="bi bi-three-dots"></i>
+          </button>
+          <div class="collapse navbar-collapse" id="navpanel">
+            <div id="navbar">
+              <form class="search" role="search" id="search">
+                <i class="bi bi-search"></i>
+                <input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
+              </form>
+            </div>
+          </div>
+        </div>
+      </nav>
+    </header>
+
+    <main class="container-xxl">
+      <div class="toc-offcanvas">
+        <div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
+          <div class="offcanvas-header">
+            <h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
+            <button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
+          </div>
+          <div class="offcanvas-body">
+            <nav class="toc" id="toc"></nav>
+          </div>
+        </div>
+      </div>
+
+      <div class="content">
+        <div class="actionbar">
+          <button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
+            <i class="bi bi-list"></i>
+          </button>
+
+          <nav id="breadcrumb"></nav>
+        </div>
+
+        <article data-uid="Apq.Cfg.Validation">
+
+  <h1 id="Apq_Cfg_Validation" data-uid="Apq.Cfg.Validation" class="text-break">Namespace Apq.Cfg.Validation</h1>
+  <div class="markdown level0 summary"></div>
+  <div class="markdown level0 conceptual"></div>
+  <div class="markdown level0 remarks"></div>
+
+    <h3 id="classes">
+Classes
+</h3>
+    <dl class="jumplist">
+      <dt><a class="xref" href="Apq.Cfg.Validation.CfgRootValidationExtensions.html">CfgRootValidationExtensions</a></dt>
+      <dd><p>ICfgRoot 验证扩展方法</p>
+</dd>
+    </dl>
+    <dl class="jumplist">
+      <dt><a class="xref" href="Apq.Cfg.Validation.ConfigValidationBuilder.html">ConfigValidationBuilder</a></dt>
+      <dd><p>配置验证构建器,提供流式 API 构建验证规则</p>
+</dd>
+    </dl>
+    <dl class="jumplist">
+      <dt><a class="xref" href="Apq.Cfg.Validation.ConfigValidationException.html">ConfigValidationException</a></dt>
+      <dd><p>配置验证异常</p>
+</dd>
+    </dl>
+    <dl class="jumplist">
+      <dt><a class="xref" href="Apq.Cfg.Validation.ConfigValidator.html">ConfigValidator</a></dt>
+      <dd><p>配置验证器实现</p>
+</dd>
+    </dl>
+    <dl class="jumplist">
+      <dt><a class="xref" href="Apq.Cfg.Validation.ValidationError.html">ValidationError</a></dt>
+      <dd><p>配置验证错误</p>
+</dd>
+    </dl>
+    <dl class="jumplist">
+      <dt><a class="xref" href="Apq.Cfg.Validation.ValidationResult.html">ValidationResult</a></dt>
+      <dd><p>配置验证结果</p>
+</dd>
+    </dl>
+    <h3 id="interfaces">
+Interfaces
+</h3>
+    <dl class="jumplist">
+      <dt><a class="xref" href="Apq.Cfg.Validation.IConfigValidator.html">IConfigValidator</a></dt>
+      <dd><p>配置验证器接口</p>
+</dd>
+    </dl>
+    <dl class="jumplist">
+      <dt><a class="xref" href="Apq.Cfg.Validation.IValidationRule.html">IValidationRule</a></dt>
+      <dd><p>配置验证规则接口</p>
+</dd>
+    </dl>
+
+
+</article>
+
+
+
+      </div>
+
+      <div class="affix">
+        <nav id="affix"></nav>
+      </div>
+    </main>
+
+    <div class="container-xxl search-results" id="search-results"></div>
+
+    <footer class="border-top text-secondary">
+      <div class="container-xxl">
+        <div class="flex-fill">
+          Apq.Cfg - .NET 统一配置组件库 (基于 .NET 10.0,兼容 .NET 8.0)
+        </div>
+      </div>
+    </footer>
+  </body>
+</html>

+ 28 - 28
docs/site/public/api-reference/api/Apq.Cfg.Vault.CfgBuilderExtensions.html

@@ -165,7 +165,7 @@ Class CfgBuilderExtensions
   <div class="markdown level1 conceptual"></div>
 
   <div class="codewrapper">
-    <pre><code class="lang-csharp hljs">public static CfgBuilder AddVault(this CfgBuilder builder, Action&lt;VaultCfgOptions&gt; configure, int level = 0, bool isPrimaryWriter = false)</code></pre>
+    <pre><code class="lang-csharp hljs">public static CfgBuilder AddVault(this CfgBuilder builder, Action&lt;VaultCfgOptions&gt; configure, int level = 300, bool isPrimaryWriter = false)</code></pre>
   </div>
 
   <h4 class="section">Parameters</h4>
@@ -177,17 +177,17 @@ Class CfgBuilderExtensions
     <dd><p>配置选项</p>
 </dd>
     <dt><code>level</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
-    <dd><p>配置层级,数值越大优先级越高</p>
+    <dd><p>配置层级,数值越大优先级越高,默认为 <a class="xref" href="Apq.Cfg.CfgSourceLevels.html#Apq_Cfg_CfgSourceLevels_Vault">Vault</a> (18)</p>
 </dd>
     <dt><code>isPrimaryWriter</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
-    <dd><p>是否为主写入源</p>
+    <dd><p>是否为主写入源,默认为false</p>
 </dd>
   </dl>
 
   <h4 class="section">Returns</h4>
   <dl class="parameters">
     <dt><a class="xref" href="Apq.Cfg.CfgBuilder.html">CfgBuilder</a></dt>
-    <dd><p>配置构建器</p>
+    <dd><p>配置构建器实例,支持链式调用</p>
 </dd>
   </dl>
 
@@ -213,7 +213,7 @@ Class CfgBuilderExtensions
   <div class="markdown level1 conceptual"></div>
 
   <div class="codewrapper">
-    <pre><code class="lang-csharp hljs">public static CfgBuilder AddVaultAppRole(this CfgBuilder builder, string address, string roleId, string roleSecret, string enginePath = &quot;kv&quot;, string path = &quot;&quot;, int kvVersion = 2, int level = 0)</code></pre>
+    <pre><code class="lang-csharp hljs">public static CfgBuilder AddVaultAppRole(this CfgBuilder builder, string address, string roleId, string roleSecret, string enginePath = &quot;kv&quot;, string path = &quot;&quot;, int kvVersion = 2, int level = 300)</code></pre>
   </div>
 
   <h4 class="section">Parameters</h4>
@@ -231,23 +231,23 @@ Class CfgBuilderExtensions
     <dd><p>Role Secret</p>
 </dd>
     <dt><code>enginePath</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
-    <dd><p>KV 引擎路径</p>
+    <dd><p>KV 引擎路径,默认为 &quot;kv&quot;</p>
 </dd>
     <dt><code>path</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
-    <dd><p>密钥路径</p>
+    <dd><p>密钥路径,默认为空</p>
 </dd>
     <dt><code>kvVersion</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
-    <dd><p>KV 引擎版本 (1 或 2)</p>
+    <dd><p>KV 引擎版本 (1 或 2),默认为 2</p>
 </dd>
     <dt><code>level</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
-    <dd><p>配置层级</p>
+    <dd><p>配置层级,数值越大优先级越高,默认为 <a class="xref" href="Apq.Cfg.CfgSourceLevels.html#Apq_Cfg_CfgSourceLevels_Vault">Vault</a> (18)</p>
 </dd>
   </dl>
 
   <h4 class="section">Returns</h4>
   <dl class="parameters">
     <dt><a class="xref" href="Apq.Cfg.CfgBuilder.html">CfgBuilder</a></dt>
-    <dd><p>配置构建器</p>
+    <dd><p>配置构建器实例,支持链式调用</p>
 </dd>
   </dl>
 
@@ -273,7 +273,7 @@ Class CfgBuilderExtensions
   <div class="markdown level1 conceptual"></div>
 
   <div class="codewrapper">
-    <pre><code class="lang-csharp hljs">public static CfgBuilder AddVaultUserPass(this CfgBuilder builder, string address, string username, string password, string enginePath = &quot;kv&quot;, string path = &quot;&quot;, int kvVersion = 2, int level = 0)</code></pre>
+    <pre><code class="lang-csharp hljs">public static CfgBuilder AddVaultUserPass(this CfgBuilder builder, string address, string username, string password, string enginePath = &quot;kv&quot;, string path = &quot;&quot;, int kvVersion = 2, int level = 300)</code></pre>
   </div>
 
   <h4 class="section">Parameters</h4>
@@ -291,23 +291,23 @@ Class CfgBuilderExtensions
     <dd><p>密码</p>
 </dd>
     <dt><code>enginePath</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
-    <dd><p>KV 引擎路径</p>
+    <dd><p>KV 引擎路径,默认为 &quot;kv&quot;</p>
 </dd>
     <dt><code>path</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
-    <dd><p>密钥路径</p>
+    <dd><p>密钥路径,默认为空</p>
 </dd>
     <dt><code>kvVersion</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
-    <dd><p>KV 引擎版本 (1 或 2)</p>
+    <dd><p>KV 引擎版本 (1 或 2),默认为 2</p>
 </dd>
     <dt><code>level</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
-    <dd><p>配置层级</p>
+    <dd><p>配置层级,数值越大优先级越高,默认为 <a class="xref" href="Apq.Cfg.CfgSourceLevels.html#Apq_Cfg_CfgSourceLevels_Vault">Vault</a> (18)</p>
 </dd>
   </dl>
 
   <h4 class="section">Returns</h4>
   <dl class="parameters">
     <dt><a class="xref" href="Apq.Cfg.CfgBuilder.html">CfgBuilder</a></dt>
-    <dd><p>配置构建器</p>
+    <dd><p>配置构建器实例,支持链式调用</p>
 </dd>
   </dl>
 
@@ -333,7 +333,7 @@ Class CfgBuilderExtensions
   <div class="markdown level1 conceptual"></div>
 
   <div class="codewrapper">
-    <pre><code class="lang-csharp hljs">public static CfgBuilder AddVaultV1(this CfgBuilder builder, string address, string token, string enginePath = &quot;kv&quot;, string path = &quot;&quot;, int level = 0, bool enableHotReload = true)</code></pre>
+    <pre><code class="lang-csharp hljs">public static CfgBuilder AddVaultV1(this CfgBuilder builder, string address, string token, string enginePath = &quot;kv&quot;, string path = &quot;&quot;, int level = 300, bool enableHotReload = true)</code></pre>
   </div>
 
   <h4 class="section">Parameters</h4>
@@ -348,23 +348,23 @@ Class CfgBuilderExtensions
     <dd><p>Vault Token</p>
 </dd>
     <dt><code>enginePath</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
-    <dd><p>KV 引擎路径,默认 &quot;kv&quot;</p>
+    <dd><p>KV 引擎路径,默认 &quot;kv&quot;</p>
 </dd>
     <dt><code>path</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
-    <dd><p>密钥路径</p>
+    <dd><p>密钥路径,默认为空</p>
 </dd>
     <dt><code>level</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
-    <dd><p>配置层级</p>
+    <dd><p>配置层级,数值越大优先级越高,默认为 <a class="xref" href="Apq.Cfg.CfgSourceLevels.html#Apq_Cfg_CfgSourceLevels_Vault">Vault</a> (18)</p>
 </dd>
     <dt><code>enableHotReload</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
-    <dd><p>是否启用热重载</p>
+    <dd><p>是否启用热重载,默认为true</p>
 </dd>
   </dl>
 
   <h4 class="section">Returns</h4>
   <dl class="parameters">
     <dt><a class="xref" href="Apq.Cfg.CfgBuilder.html">CfgBuilder</a></dt>
-    <dd><p>配置构建器</p>
+    <dd><p>配置构建器实例,支持链式调用</p>
 </dd>
   </dl>
 
@@ -390,7 +390,7 @@ Class CfgBuilderExtensions
   <div class="markdown level1 conceptual"></div>
 
   <div class="codewrapper">
-    <pre><code class="lang-csharp hljs">public static CfgBuilder AddVaultV2(this CfgBuilder builder, string address, string token, string enginePath = &quot;kv&quot;, string path = &quot;&quot;, int level = 0, bool enableHotReload = true)</code></pre>
+    <pre><code class="lang-csharp hljs">public static CfgBuilder AddVaultV2(this CfgBuilder builder, string address, string token, string enginePath = &quot;kv&quot;, string path = &quot;&quot;, int level = 300, bool enableHotReload = true)</code></pre>
   </div>
 
   <h4 class="section">Parameters</h4>
@@ -405,23 +405,23 @@ Class CfgBuilderExtensions
     <dd><p>Vault Token</p>
 </dd>
     <dt><code>enginePath</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
-    <dd><p>KV 引擎路径,默认 &quot;kv&quot;</p>
+    <dd><p>KV 引擎路径,默认 &quot;kv&quot;</p>
 </dd>
     <dt><code>path</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
-    <dd><p>密钥路径</p>
+    <dd><p>密钥路径,默认为空</p>
 </dd>
     <dt><code>level</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
-    <dd><p>配置层级</p>
+    <dd><p>配置层级,数值越大优先级越高,默认为 <a class="xref" href="Apq.Cfg.CfgSourceLevels.html#Apq_Cfg_CfgSourceLevels_Vault">Vault</a> (18)</p>
 </dd>
     <dt><code>enableHotReload</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
-    <dd><p>是否启用热重载</p>
+    <dd><p>是否启用热重载,默认为true</p>
 </dd>
   </dl>
 
   <h4 class="section">Returns</h4>
   <dl class="parameters">
     <dt><a class="xref" href="Apq.Cfg.CfgBuilder.html">CfgBuilder</a></dt>
-    <dd><p>配置构建器</p>
+    <dd><p>配置构建器实例,支持链式调用</p>
 </dd>
   </dl>
 

+ 17 - 9
docs/site/public/api-reference/api/Apq.Cfg.Xml.CfgBuilderExtensions.html

@@ -165,31 +165,39 @@ Class CfgBuilderExtensions
   <div class="markdown level1 conceptual"></div>
 
   <div class="codewrapper">
-    <pre><code class="lang-csharp hljs">public static CfgBuilder AddXml(this CfgBuilder builder, string path, int level, bool writeable = false, bool optional = true, bool reloadOnChange = true, bool isPrimaryWriter = false)</code></pre>
+    <pre><code class="lang-csharp hljs">public static CfgBuilder AddXml(this CfgBuilder builder, string path, int level = 0, bool writeable = false, bool optional = true, bool reloadOnChange = true, bool isPrimaryWriter = false)</code></pre>
   </div>
 
   <h4 class="section">Parameters</h4>
   <dl class="parameters">
     <dt><code>builder</code> <a class="xref" href="Apq.Cfg.CfgBuilder.html">CfgBuilder</a></dt>
-    <dd></dd>
+    <dd><p>配置构建器</p>
+</dd>
     <dt><code>path</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
-    <dd></dd>
+    <dd><p>XML 文件路径</p>
+</dd>
     <dt><code>level</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
-    <dd></dd>
+    <dd><p>配置层级,数值越大优先级越高,默认为 <a class="xref" href="Apq.Cfg.CfgSourceLevels.html#Apq_Cfg_CfgSourceLevels_Xml">Xml</a> (0)</p>
+</dd>
     <dt><code>writeable</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
-    <dd></dd>
+    <dd><p>是否可写,默认为false</p>
+</dd>
     <dt><code>optional</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
-    <dd></dd>
+    <dd><p>是否为可选文件,默认为true</p>
+</dd>
     <dt><code>reloadOnChange</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
-    <dd></dd>
+    <dd><p>文件变更时是否自动重载,默认为true</p>
+</dd>
     <dt><code>isPrimaryWriter</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
-    <dd></dd>
+    <dd><p>是否为主要写入器,默认为false</p>
+</dd>
   </dl>
 
   <h4 class="section">Returns</h4>
   <dl class="parameters">
     <dt><a class="xref" href="Apq.Cfg.CfgBuilder.html">CfgBuilder</a></dt>
-    <dd></dd>
+    <dd><p>配置构建器实例,支持链式调用</p>
+</dd>
   </dl>
 
 

+ 17 - 9
docs/site/public/api-reference/api/Apq.Cfg.Yaml.CfgBuilderExtensions.html

@@ -165,31 +165,39 @@ Class CfgBuilderExtensions
   <div class="markdown level1 conceptual"></div>
 
   <div class="codewrapper">
-    <pre><code class="lang-csharp hljs">public static CfgBuilder AddYaml(this CfgBuilder builder, string path, int level, bool writeable = false, bool optional = true, bool reloadOnChange = true, bool isPrimaryWriter = false)</code></pre>
+    <pre><code class="lang-csharp hljs">public static CfgBuilder AddYaml(this CfgBuilder builder, string path, int level = 0, bool writeable = false, bool optional = true, bool reloadOnChange = true, bool isPrimaryWriter = false)</code></pre>
   </div>
 
   <h4 class="section">Parameters</h4>
   <dl class="parameters">
     <dt><code>builder</code> <a class="xref" href="Apq.Cfg.CfgBuilder.html">CfgBuilder</a></dt>
-    <dd></dd>
+    <dd><p>配置构建器</p>
+</dd>
     <dt><code>path</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
-    <dd></dd>
+    <dd><p>YAML 文件路径</p>
+</dd>
     <dt><code>level</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
-    <dd></dd>
+    <dd><p>配置层级,数值越大优先级越高,默认为 <a class="xref" href="Apq.Cfg.CfgSourceLevels.html#Apq_Cfg_CfgSourceLevels_Yaml">Yaml</a> (0)</p>
+</dd>
     <dt><code>writeable</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
-    <dd></dd>
+    <dd><p>是否可写,默认为false</p>
+</dd>
     <dt><code>optional</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
-    <dd></dd>
+    <dd><p>是否为可选文件,默认为true</p>
+</dd>
     <dt><code>reloadOnChange</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
-    <dd></dd>
+    <dd><p>文件变更时是否自动重载,默认为true</p>
+</dd>
     <dt><code>isPrimaryWriter</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
-    <dd></dd>
+    <dd><p>是否为主要写入器,默认为false</p>
+</dd>
   </dl>
 
   <h4 class="section">Returns</h4>
   <dl class="parameters">
     <dt><a class="xref" href="Apq.Cfg.CfgBuilder.html">CfgBuilder</a></dt>
-    <dd></dd>
+    <dd><p>配置构建器实例,支持链式调用</p>
+</dd>
   </dl>
 
 

+ 13 - 13
docs/site/public/api-reference/api/Apq.Cfg.Zookeeper.CfgBuilderExtensions.html

@@ -165,7 +165,7 @@ Class CfgBuilderExtensions
   <div class="markdown level1 conceptual"></div>
 
   <div class="codewrapper">
-    <pre><code class="lang-csharp hljs">public static CfgBuilder AddZookeeper(this CfgBuilder builder, Action&lt;ZookeeperCfgOptions&gt; configure, int level, bool isPrimaryWriter = false)</code></pre>
+    <pre><code class="lang-csharp hljs">public static CfgBuilder AddZookeeper(this CfgBuilder builder, Action&lt;ZookeeperCfgOptions&gt; configure, int level = 200, bool isPrimaryWriter = false)</code></pre>
   </div>
 
   <h4 class="section">Parameters</h4>
@@ -177,17 +177,17 @@ Class CfgBuilderExtensions
     <dd><p>配置选项</p>
 </dd>
     <dt><code>level</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
-    <dd><p>配置层级,数值越大优先级越高</p>
+    <dd><p>配置层级,数值越大优先级越高,默认为 <a class="xref" href="Apq.Cfg.CfgSourceLevels.html#Apq_Cfg_CfgSourceLevels_Zookeeper">Zookeeper</a> (15)</p>
 </dd>
     <dt><code>isPrimaryWriter</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
-    <dd><p>是否为主写入源</p>
+    <dd><p>是否为主写入源,默认为false</p>
 </dd>
   </dl>
 
   <h4 class="section">Returns</h4>
   <dl class="parameters">
     <dt><a class="xref" href="Apq.Cfg.CfgBuilder.html">CfgBuilder</a></dt>
-    <dd><p>配置构建器</p>
+    <dd><p>配置构建器实例,支持链式调用</p>
 </dd>
   </dl>
 
@@ -213,7 +213,7 @@ Class CfgBuilderExtensions
   <div class="markdown level1 conceptual"></div>
 
   <div class="codewrapper">
-    <pre><code class="lang-csharp hljs">public static CfgBuilder AddZookeeper(this CfgBuilder builder, string connectionString, string rootPath = &quot;/config&quot;, int level = 0, bool enableHotReload = true)</code></pre>
+    <pre><code class="lang-csharp hljs">public static CfgBuilder AddZookeeper(this CfgBuilder builder, string connectionString, string rootPath = &quot;/config&quot;, int level = 200, bool enableHotReload = true)</code></pre>
   </div>
 
   <h4 class="section">Parameters</h4>
@@ -225,20 +225,20 @@ Class CfgBuilderExtensions
     <dd><p>Zookeeper 连接字符串,如 localhost:2181</p>
 </dd>
     <dt><code>rootPath</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
-    <dd><p>根路径,默认 /config</p>
+    <dd><p>根路径,默认 &quot;/config&quot;</p>
 </dd>
     <dt><code>level</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
-    <dd><p>配置层级</p>
+    <dd><p>配置层级,数值越大优先级越高,默认为 <a class="xref" href="Apq.Cfg.CfgSourceLevels.html#Apq_Cfg_CfgSourceLevels_Zookeeper">Zookeeper</a> (15)</p>
 </dd>
     <dt><code>enableHotReload</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
-    <dd><p>是否启用热重载</p>
+    <dd><p>是否启用热重载,默认为true</p>
 </dd>
   </dl>
 
   <h4 class="section">Returns</h4>
   <dl class="parameters">
     <dt><a class="xref" href="Apq.Cfg.CfgBuilder.html">CfgBuilder</a></dt>
-    <dd><p>配置构建器</p>
+    <dd><p>配置构建器实例,支持链式调用</p>
 </dd>
   </dl>
 
@@ -264,7 +264,7 @@ Class CfgBuilderExtensions
   <div class="markdown level1 conceptual"></div>
 
   <div class="codewrapper">
-    <pre><code class="lang-csharp hljs">public static CfgBuilder AddZookeeperJson(this CfgBuilder builder, string connectionString, string nodePath, int level = 0, bool enableHotReload = true)</code></pre>
+    <pre><code class="lang-csharp hljs">public static CfgBuilder AddZookeeperJson(this CfgBuilder builder, string connectionString, string nodePath, int level = 200, bool enableHotReload = true)</code></pre>
   </div>
 
   <h4 class="section">Parameters</h4>
@@ -279,17 +279,17 @@ Class CfgBuilderExtensions
     <dd><p>存储 JSON 配置的节点路径</p>
 </dd>
     <dt><code>level</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
-    <dd><p>配置层级</p>
+    <dd><p>配置层级,数值越大优先级越高,默认为 <a class="xref" href="Apq.Cfg.CfgSourceLevels.html#Apq_Cfg_CfgSourceLevels_Zookeeper">Zookeeper</a> (15)</p>
 </dd>
     <dt><code>enableHotReload</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
-    <dd><p>是否启用热重载</p>
+    <dd><p>是否启用热重载,默认为true</p>
 </dd>
   </dl>
 
   <h4 class="section">Returns</h4>
   <dl class="parameters">
     <dt><a class="xref" href="Apq.Cfg.CfgBuilder.html">CfgBuilder</a></dt>
-    <dd><p>配置构建器</p>
+    <dd><p>配置构建器实例,支持链式调用</p>
 </dd>
   </dl>
 

+ 15 - 0
docs/site/public/api-reference/api/Apq.Cfg.html

@@ -97,6 +97,11 @@ Classes
     <dl class="jumplist">
       <dt><a class="xref" href="Apq.Cfg.CfgBuilder.html">CfgBuilder</a></dt>
       <dd><p>配置构建器,用于创建和管理配置源</p>
+</dd>
+    </dl>
+    <dl class="jumplist">
+      <dt><a class="xref" href="Apq.Cfg.CfgBuilderTemplateExtensions.html">CfgBuilderTemplateExtensions</a></dt>
+      <dd><p>CfgBuilder 模板扩展方法</p>
 </dd>
     </dl>
     <dl class="jumplist">
@@ -107,11 +112,21 @@ Classes
     <dl class="jumplist">
       <dt><a class="xref" href="Apq.Cfg.CfgSectionAttribute.html">CfgSectionAttribute</a></dt>
       <dd><p>标记一个类为配置节,源生成器将为其生成零反射的绑定代码</p>
+</dd>
+    </dl>
+    <dl class="jumplist">
+      <dt><a class="xref" href="Apq.Cfg.CfgSourceLevels.html">CfgSourceLevels</a></dt>
+      <dd><p>配置源默认层级常量</p>
 </dd>
     </dl>
     <dl class="jumplist">
       <dt><a class="xref" href="Apq.Cfg.ServiceCollectionExtensions.html">ServiceCollectionExtensions</a></dt>
       <dd><p>IServiceCollection 扩展方法</p>
+</dd>
+    </dl>
+    <dl class="jumplist">
+      <dt><a class="xref" href="Apq.Cfg.TemplateExtensions.html">TemplateExtensions</a></dt>
+      <dd><p>配置模板扩展方法</p>
 </dd>
     </dl>
     <h3 id="interfaces">

+ 118 - 0
docs/site/public/api-reference/api/toc.html

@@ -20,12 +20,18 @@
                           <li>
                               <a href="Apq.Cfg.CfgBuilder.html" name="" title="CfgBuilder">CfgBuilder</a>
                           </li>
+                          <li>
+                              <a href="Apq.Cfg.CfgBuilderTemplateExtensions.html" name="" title="CfgBuilderTemplateExtensions">CfgBuilderTemplateExtensions</a>
+                          </li>
                           <li>
                               <a href="Apq.Cfg.CfgRootExtensions.html" name="" title="CfgRootExtensions">CfgRootExtensions</a>
                           </li>
                           <li>
                               <a href="Apq.Cfg.CfgSectionAttribute.html" name="" title="CfgSectionAttribute">CfgSectionAttribute</a>
                           </li>
+                          <li>
+                              <a href="Apq.Cfg.CfgSourceLevels.html" name="" title="CfgSourceLevels">CfgSourceLevels</a>
+                          </li>
                           <li>
                               <a href="Apq.Cfg.ICfgRoot.html" name="" title="ICfgRoot">ICfgRoot</a>
                           </li>
@@ -35,6 +41,9 @@
                           <li>
                               <a href="Apq.Cfg.ServiceCollectionExtensions.html" name="" title="ServiceCollectionExtensions">ServiceCollectionExtensions</a>
                           </li>
+                          <li>
+                              <a href="Apq.Cfg.TemplateExtensions.html" name="" title="TemplateExtensions">TemplateExtensions</a>
+                          </li>
                     </ul>
                 </li>
                 <li>
@@ -301,6 +310,31 @@
                           </li>
                     </ul>
                 </li>
+                <li>
+                    <span class="expand-stub"></span>
+                    <a href="Apq.Cfg.Snapshot.html" name="" title="Apq.Cfg.Snapshot">Apq.Cfg.Snapshot</a>
+
+                    <ul class="nav level2">
+                          <li>
+                              <a href="Apq.Cfg.Snapshot.CfgRootSnapshotExtensions.html" name="" title="CfgRootSnapshotExtensions">CfgRootSnapshotExtensions</a>
+                          </li>
+                          <li>
+                              <a href="Apq.Cfg.Snapshot.ConfigExporter.html" name="" title="ConfigExporter">ConfigExporter</a>
+                          </li>
+                          <li>
+                              <a href="Apq.Cfg.Snapshot.ExportContext.html" name="" title="ExportContext">ExportContext</a>
+                          </li>
+                          <li>
+                              <a href="Apq.Cfg.Snapshot.ExportOptions.html" name="" title="ExportOptions">ExportOptions</a>
+                          </li>
+                          <li>
+                              <a href="Apq.Cfg.Snapshot.SnapshotExporter.html" name="" title="SnapshotExporter">SnapshotExporter</a>
+                          </li>
+                          <li>
+                              <a href="Apq.Cfg.Snapshot.SnapshotExporters.html" name="" title="SnapshotExporters">SnapshotExporters</a>
+                          </li>
+                    </ul>
+                </li>
                 <li>
                     <span class="expand-stub"></span>
                     <a href="Apq.Cfg.SourceGenerator.html" name="" title="Apq.Cfg.SourceGenerator">Apq.Cfg.SourceGenerator</a>
@@ -334,6 +368,28 @@
                           </li>
                     </ul>
                 </li>
+                <li>
+                    <span class="expand-stub"></span>
+                    <a href="Apq.Cfg.Template.html" name="" title="Apq.Cfg.Template">Apq.Cfg.Template</a>
+
+                    <ul class="nav level2">
+                          <li>
+                              <a href="Apq.Cfg.Template.IVariableResolver.html" name="" title="IVariableResolver">IVariableResolver</a>
+                          </li>
+                          <li>
+                              <a href="Apq.Cfg.Template.TemplateEngine.html" name="" title="TemplateEngine">TemplateEngine</a>
+                          </li>
+                          <li>
+                              <a href="Apq.Cfg.Template.UnresolvedVariableBehavior.html" name="" title="UnresolvedVariableBehavior">UnresolvedVariableBehavior</a>
+                          </li>
+                          <li>
+                              <a href="Apq.Cfg.Template.VariableResolutionOptions.html" name="" title="VariableResolutionOptions">VariableResolutionOptions</a>
+                          </li>
+                          <li>
+                              <a href="Apq.Cfg.Template.VariableResolvers.html" name="" title="VariableResolvers">VariableResolvers</a>
+                          </li>
+                    </ul>
+                </li>
                 <li>
                     <span class="expand-stub"></span>
                     <a href="Apq.Cfg.Toml.html" name="" title="Apq.Cfg.Toml">Apq.Cfg.Toml</a>
@@ -344,6 +400,68 @@
                           </li>
                     </ul>
                 </li>
+                <li>
+                    <span class="expand-stub"></span>
+                    <a href="Apq.Cfg.Validation.html" name="" title="Apq.Cfg.Validation">Apq.Cfg.Validation</a>
+
+                    <ul class="nav level2">
+                          <li>
+                              <a href="Apq.Cfg.Validation.CfgRootValidationExtensions.html" name="" title="CfgRootValidationExtensions">CfgRootValidationExtensions</a>
+                          </li>
+                          <li>
+                              <a href="Apq.Cfg.Validation.ConfigValidationBuilder.html" name="" title="ConfigValidationBuilder">ConfigValidationBuilder</a>
+                          </li>
+                          <li>
+                              <a href="Apq.Cfg.Validation.ConfigValidationException.html" name="" title="ConfigValidationException">ConfigValidationException</a>
+                          </li>
+                          <li>
+                              <a href="Apq.Cfg.Validation.ConfigValidator.html" name="" title="ConfigValidator">ConfigValidator</a>
+                          </li>
+                          <li>
+                              <a href="Apq.Cfg.Validation.IConfigValidator.html" name="" title="IConfigValidator">IConfigValidator</a>
+                          </li>
+                          <li>
+                              <a href="Apq.Cfg.Validation.IValidationRule.html" name="" title="IValidationRule">IValidationRule</a>
+                          </li>
+                          <li>
+                              <a href="Apq.Cfg.Validation.ValidationError.html" name="" title="ValidationError">ValidationError</a>
+                          </li>
+                          <li>
+                              <a href="Apq.Cfg.Validation.ValidationResult.html" name="" title="ValidationResult">ValidationResult</a>
+                          </li>
+                    </ul>
+                </li>
+                <li>
+                    <span class="expand-stub"></span>
+                    <a href="Apq.Cfg.Validation.Rules.html" name="" title="Apq.Cfg.Validation.Rules">Apq.Cfg.Validation.Rules</a>
+
+                    <ul class="nav level2">
+                          <li>
+                              <a href="Apq.Cfg.Validation.Rules.CustomRule.html" name="" title="CustomRule">CustomRule</a>
+                          </li>
+                          <li>
+                              <a href="Apq.Cfg.Validation.Rules.DependsOnRule.html" name="" title="DependsOnRule">DependsOnRule</a>
+                          </li>
+                          <li>
+                              <a href="Apq.Cfg.Validation.Rules.EnumValuesRule.html" name="" title="EnumValuesRule">EnumValuesRule</a>
+                          </li>
+                          <li>
+                              <a href="Apq.Cfg.Validation.Rules.LengthRule.html" name="" title="LengthRule">LengthRule</a>
+                          </li>
+                          <li>
+                              <a href="Apq.Cfg.Validation.Rules.RangeRule.html" name="" title="RangeRule">RangeRule</a>
+                          </li>
+                          <li>
+                              <a href="Apq.Cfg.Validation.Rules.RangeRule-1.html" name="" title="RangeRule&lt;T&gt;">RangeRule&lt;T&gt;</a>
+                          </li>
+                          <li>
+                              <a href="Apq.Cfg.Validation.Rules.RegexRule.html" name="" title="RegexRule">RegexRule</a>
+                          </li>
+                          <li>
+                              <a href="Apq.Cfg.Validation.Rules.RequiredRule.html" name="" title="RequiredRule">RequiredRule</a>
+                          </li>
+                    </ul>
+                </li>
                 <li>
                     <span class="expand-stub"></span>
                     <a href="Apq.Cfg.Vault.html" name="" title="Apq.Cfg.Vault">Apq.Cfg.Vault</a>

Разница между файлами не показана из-за своего большого размера
+ 0 - 0
docs/site/public/api-reference/api/toc.json


Разница между файлами не показана из-за своего большого размера
+ 1 - 1
docs/site/public/api-reference/index.json


+ 476 - 0
docs/site/public/api-reference/manifest.json

@@ -100,6 +100,20 @@
       "Title": "Apq.Cfg.CfgBuilder",
       "Summary": "<p sourcefile=\"api/Apq.Cfg.CfgBuilder.yml\" sourcestartlinenumber=\"1\">配置构建器,用于创建和管理配置源</p>\n"
     },
+    {
+      "type": "ManagedReference",
+      "source_relative_path": "api/Apq.Cfg.CfgBuilderTemplateExtensions.yml",
+      "output": {
+        ".html": {
+          "relative_path": "api/Apq.Cfg.CfgBuilderTemplateExtensions.html"
+        }
+      },
+      "version": "",
+      "Uid": null,
+      "IsMRef": true,
+      "Title": "Apq.Cfg.CfgBuilderTemplateExtensions",
+      "Summary": "<p sourcefile=\"api/Apq.Cfg.CfgBuilderTemplateExtensions.yml\" sourcestartlinenumber=\"1\">CfgBuilder 模板扩展方法</p>\n"
+    },
     {
       "type": "ManagedReference",
       "source_relative_path": "api/Apq.Cfg.CfgRootExtensions.yml",
@@ -128,6 +142,20 @@
       "Title": "Apq.Cfg.CfgSectionAttribute",
       "Summary": "<p sourcefile=\"api/Apq.Cfg.CfgSectionAttribute.yml\" sourcestartlinenumber=\"1\">标记一个类为配置节,源生成器将为其生成零反射的绑定代码</p>\n"
     },
+    {
+      "type": "ManagedReference",
+      "source_relative_path": "api/Apq.Cfg.CfgSourceLevels.yml",
+      "output": {
+        ".html": {
+          "relative_path": "api/Apq.Cfg.CfgSourceLevels.html"
+        }
+      },
+      "version": "",
+      "Uid": null,
+      "IsMRef": true,
+      "Title": "Apq.Cfg.CfgSourceLevels",
+      "Summary": "<p sourcefile=\"api/Apq.Cfg.CfgSourceLevels.yml\" sourcestartlinenumber=\"1\">配置源默认层级常量</p>\n"
+    },
     {
       "type": "ManagedReference",
       "source_relative_path": "api/Apq.Cfg.Changes.ChangeType.yml",
@@ -1066,6 +1094,104 @@
       "Title": "Apq.Cfg.ServiceCollectionExtensions",
       "Summary": "<p sourcefile=\"api/Apq.Cfg.ServiceCollectionExtensions.yml\" sourcestartlinenumber=\"1\">IServiceCollection 扩展方法</p>\n"
     },
+    {
+      "type": "ManagedReference",
+      "source_relative_path": "api/Apq.Cfg.Snapshot.CfgRootSnapshotExtensions.yml",
+      "output": {
+        ".html": {
+          "relative_path": "api/Apq.Cfg.Snapshot.CfgRootSnapshotExtensions.html"
+        }
+      },
+      "version": "",
+      "Uid": null,
+      "IsMRef": true,
+      "Title": "Apq.Cfg.Snapshot.CfgRootSnapshotExtensions",
+      "Summary": "<p sourcefile=\"api/Apq.Cfg.Snapshot.CfgRootSnapshotExtensions.yml\" sourcestartlinenumber=\"1\">ICfgRoot 配置快照导出扩展方法</p>\n"
+    },
+    {
+      "type": "ManagedReference",
+      "source_relative_path": "api/Apq.Cfg.Snapshot.ConfigExporter.yml",
+      "output": {
+        ".html": {
+          "relative_path": "api/Apq.Cfg.Snapshot.ConfigExporter.html"
+        }
+      },
+      "version": "",
+      "Uid": null,
+      "IsMRef": true,
+      "Title": "Apq.Cfg.Snapshot.ConfigExporter",
+      "Summary": "<p sourcefile=\"api/Apq.Cfg.Snapshot.ConfigExporter.yml\" sourcestartlinenumber=\"1\">配置快照导出器</p>\n"
+    },
+    {
+      "type": "ManagedReference",
+      "source_relative_path": "api/Apq.Cfg.Snapshot.ExportContext.yml",
+      "output": {
+        ".html": {
+          "relative_path": "api/Apq.Cfg.Snapshot.ExportContext.html"
+        }
+      },
+      "version": "",
+      "Uid": null,
+      "IsMRef": true,
+      "Title": "Apq.Cfg.Snapshot.ExportContext",
+      "Summary": "<p sourcefile=\"api/Apq.Cfg.Snapshot.ExportContext.yml\" sourcestartlinenumber=\"1\">导出上下文,提供导出时的元数据和选项</p>\n"
+    },
+    {
+      "type": "ManagedReference",
+      "source_relative_path": "api/Apq.Cfg.Snapshot.ExportOptions.yml",
+      "output": {
+        ".html": {
+          "relative_path": "api/Apq.Cfg.Snapshot.ExportOptions.html"
+        }
+      },
+      "version": "",
+      "Uid": null,
+      "IsMRef": true,
+      "Title": "Apq.Cfg.Snapshot.ExportOptions",
+      "Summary": "<p sourcefile=\"api/Apq.Cfg.Snapshot.ExportOptions.yml\" sourcestartlinenumber=\"1\">配置导出选项</p>\n"
+    },
+    {
+      "type": "ManagedReference",
+      "source_relative_path": "api/Apq.Cfg.Snapshot.SnapshotExporter.yml",
+      "output": {
+        ".html": {
+          "relative_path": "api/Apq.Cfg.Snapshot.SnapshotExporter.html"
+        }
+      },
+      "version": "",
+      "Uid": null,
+      "IsMRef": true,
+      "Title": "Apq.Cfg.Snapshot.SnapshotExporter",
+      "Summary": "<p sourcefile=\"api/Apq.Cfg.Snapshot.SnapshotExporter.yml\" sourcestartlinenumber=\"1\">配置快照导出委托</p>\n"
+    },
+    {
+      "type": "ManagedReference",
+      "source_relative_path": "api/Apq.Cfg.Snapshot.SnapshotExporters.yml",
+      "output": {
+        ".html": {
+          "relative_path": "api/Apq.Cfg.Snapshot.SnapshotExporters.html"
+        }
+      },
+      "version": "",
+      "Uid": null,
+      "IsMRef": true,
+      "Title": "Apq.Cfg.Snapshot.SnapshotExporters",
+      "Summary": "<p sourcefile=\"api/Apq.Cfg.Snapshot.SnapshotExporters.yml\" sourcestartlinenumber=\"1\">内置配置快照导出器</p>\n"
+    },
+    {
+      "type": "ManagedReference",
+      "source_relative_path": "api/Apq.Cfg.Snapshot.yml",
+      "output": {
+        ".html": {
+          "relative_path": "api/Apq.Cfg.Snapshot.html"
+        }
+      },
+      "version": "",
+      "Uid": null,
+      "IsMRef": true,
+      "Title": "Apq.Cfg.Snapshot",
+      "Summary": null
+    },
     {
       "type": "ManagedReference",
       "source_relative_path": "api/Apq.Cfg.SourceGenerator.CfgSectionGenerator.yml",
@@ -1164,6 +1290,104 @@
       "Title": "Apq.Cfg.Sources",
       "Summary": null
     },
+    {
+      "type": "ManagedReference",
+      "source_relative_path": "api/Apq.Cfg.Template.IVariableResolver.yml",
+      "output": {
+        ".html": {
+          "relative_path": "api/Apq.Cfg.Template.IVariableResolver.html"
+        }
+      },
+      "version": "",
+      "Uid": null,
+      "IsMRef": true,
+      "Title": "Apq.Cfg.Template.IVariableResolver",
+      "Summary": "<p sourcefile=\"api/Apq.Cfg.Template.IVariableResolver.yml\" sourcestartlinenumber=\"1\">变量解析器接口</p>\n"
+    },
+    {
+      "type": "ManagedReference",
+      "source_relative_path": "api/Apq.Cfg.Template.TemplateEngine.yml",
+      "output": {
+        ".html": {
+          "relative_path": "api/Apq.Cfg.Template.TemplateEngine.html"
+        }
+      },
+      "version": "",
+      "Uid": null,
+      "IsMRef": true,
+      "Title": "Apq.Cfg.Template.TemplateEngine",
+      "Summary": "<p sourcefile=\"api/Apq.Cfg.Template.TemplateEngine.yml\" sourcestartlinenumber=\"1\">模板解析引擎</p>\n"
+    },
+    {
+      "type": "ManagedReference",
+      "source_relative_path": "api/Apq.Cfg.Template.UnresolvedVariableBehavior.yml",
+      "output": {
+        ".html": {
+          "relative_path": "api/Apq.Cfg.Template.UnresolvedVariableBehavior.html"
+        }
+      },
+      "version": "",
+      "Uid": null,
+      "IsMRef": true,
+      "Title": "Apq.Cfg.Template.UnresolvedVariableBehavior",
+      "Summary": "<p sourcefile=\"api/Apq.Cfg.Template.UnresolvedVariableBehavior.yml\" sourcestartlinenumber=\"1\">未解析变量的处理方式</p>\n"
+    },
+    {
+      "type": "ManagedReference",
+      "source_relative_path": "api/Apq.Cfg.Template.VariableResolutionOptions.yml",
+      "output": {
+        ".html": {
+          "relative_path": "api/Apq.Cfg.Template.VariableResolutionOptions.html"
+        }
+      },
+      "version": "",
+      "Uid": null,
+      "IsMRef": true,
+      "Title": "Apq.Cfg.Template.VariableResolutionOptions",
+      "Summary": "<p sourcefile=\"api/Apq.Cfg.Template.VariableResolutionOptions.yml\" sourcestartlinenumber=\"1\">变量解析选项</p>\n"
+    },
+    {
+      "type": "ManagedReference",
+      "source_relative_path": "api/Apq.Cfg.Template.VariableResolvers.yml",
+      "output": {
+        ".html": {
+          "relative_path": "api/Apq.Cfg.Template.VariableResolvers.html"
+        }
+      },
+      "version": "",
+      "Uid": null,
+      "IsMRef": true,
+      "Title": "Apq.Cfg.Template.VariableResolvers",
+      "Summary": "<p sourcefile=\"api/Apq.Cfg.Template.VariableResolvers.yml\" sourcestartlinenumber=\"1\">内置变量解析器</p>\n"
+    },
+    {
+      "type": "ManagedReference",
+      "source_relative_path": "api/Apq.Cfg.Template.yml",
+      "output": {
+        ".html": {
+          "relative_path": "api/Apq.Cfg.Template.html"
+        }
+      },
+      "version": "",
+      "Uid": null,
+      "IsMRef": true,
+      "Title": "Apq.Cfg.Template",
+      "Summary": null
+    },
+    {
+      "type": "ManagedReference",
+      "source_relative_path": "api/Apq.Cfg.TemplateExtensions.yml",
+      "output": {
+        ".html": {
+          "relative_path": "api/Apq.Cfg.TemplateExtensions.html"
+        }
+      },
+      "version": "",
+      "Uid": null,
+      "IsMRef": true,
+      "Title": "Apq.Cfg.TemplateExtensions",
+      "Summary": "<p sourcefile=\"api/Apq.Cfg.TemplateExtensions.yml\" sourcestartlinenumber=\"1\">配置模板扩展方法</p>\n"
+    },
     {
       "type": "ManagedReference",
       "source_relative_path": "api/Apq.Cfg.Toml.CfgBuilderExtensions.yml",
@@ -1192,6 +1416,258 @@
       "Title": "Apq.Cfg.Toml",
       "Summary": null
     },
+    {
+      "type": "ManagedReference",
+      "source_relative_path": "api/Apq.Cfg.Validation.CfgRootValidationExtensions.yml",
+      "output": {
+        ".html": {
+          "relative_path": "api/Apq.Cfg.Validation.CfgRootValidationExtensions.html"
+        }
+      },
+      "version": "",
+      "Uid": null,
+      "IsMRef": true,
+      "Title": "Apq.Cfg.Validation.CfgRootValidationExtensions",
+      "Summary": "<p sourcefile=\"api/Apq.Cfg.Validation.CfgRootValidationExtensions.yml\" sourcestartlinenumber=\"1\">ICfgRoot 验证扩展方法</p>\n"
+    },
+    {
+      "type": "ManagedReference",
+      "source_relative_path": "api/Apq.Cfg.Validation.ConfigValidationBuilder.yml",
+      "output": {
+        ".html": {
+          "relative_path": "api/Apq.Cfg.Validation.ConfigValidationBuilder.html"
+        }
+      },
+      "version": "",
+      "Uid": null,
+      "IsMRef": true,
+      "Title": "Apq.Cfg.Validation.ConfigValidationBuilder",
+      "Summary": "<p sourcefile=\"api/Apq.Cfg.Validation.ConfigValidationBuilder.yml\" sourcestartlinenumber=\"1\">配置验证构建器,提供流式 API 构建验证规则</p>\n"
+    },
+    {
+      "type": "ManagedReference",
+      "source_relative_path": "api/Apq.Cfg.Validation.ConfigValidationException.yml",
+      "output": {
+        ".html": {
+          "relative_path": "api/Apq.Cfg.Validation.ConfigValidationException.html"
+        }
+      },
+      "version": "",
+      "Uid": null,
+      "IsMRef": true,
+      "Title": "Apq.Cfg.Validation.ConfigValidationException",
+      "Summary": "<p sourcefile=\"api/Apq.Cfg.Validation.ConfigValidationException.yml\" sourcestartlinenumber=\"1\">配置验证异常</p>\n"
+    },
+    {
+      "type": "ManagedReference",
+      "source_relative_path": "api/Apq.Cfg.Validation.ConfigValidator.yml",
+      "output": {
+        ".html": {
+          "relative_path": "api/Apq.Cfg.Validation.ConfigValidator.html"
+        }
+      },
+      "version": "",
+      "Uid": null,
+      "IsMRef": true,
+      "Title": "Apq.Cfg.Validation.ConfigValidator",
+      "Summary": "<p sourcefile=\"api/Apq.Cfg.Validation.ConfigValidator.yml\" sourcestartlinenumber=\"1\">配置验证器实现</p>\n"
+    },
+    {
+      "type": "ManagedReference",
+      "source_relative_path": "api/Apq.Cfg.Validation.IConfigValidator.yml",
+      "output": {
+        ".html": {
+          "relative_path": "api/Apq.Cfg.Validation.IConfigValidator.html"
+        }
+      },
+      "version": "",
+      "Uid": null,
+      "IsMRef": true,
+      "Title": "Apq.Cfg.Validation.IConfigValidator",
+      "Summary": "<p sourcefile=\"api/Apq.Cfg.Validation.IConfigValidator.yml\" sourcestartlinenumber=\"1\">配置验证器接口</p>\n"
+    },
+    {
+      "type": "ManagedReference",
+      "source_relative_path": "api/Apq.Cfg.Validation.IValidationRule.yml",
+      "output": {
+        ".html": {
+          "relative_path": "api/Apq.Cfg.Validation.IValidationRule.html"
+        }
+      },
+      "version": "",
+      "Uid": null,
+      "IsMRef": true,
+      "Title": "Apq.Cfg.Validation.IValidationRule",
+      "Summary": "<p sourcefile=\"api/Apq.Cfg.Validation.IValidationRule.yml\" sourcestartlinenumber=\"1\">配置验证规则接口</p>\n"
+    },
+    {
+      "type": "ManagedReference",
+      "source_relative_path": "api/Apq.Cfg.Validation.Rules.CustomRule.yml",
+      "output": {
+        ".html": {
+          "relative_path": "api/Apq.Cfg.Validation.Rules.CustomRule.html"
+        }
+      },
+      "version": "",
+      "Uid": null,
+      "IsMRef": true,
+      "Title": "Apq.Cfg.Validation.Rules.CustomRule",
+      "Summary": "<p sourcefile=\"api/Apq.Cfg.Validation.Rules.CustomRule.yml\" sourcestartlinenumber=\"1\">自定义验证规则</p>\n"
+    },
+    {
+      "type": "ManagedReference",
+      "source_relative_path": "api/Apq.Cfg.Validation.Rules.DependsOnRule.yml",
+      "output": {
+        ".html": {
+          "relative_path": "api/Apq.Cfg.Validation.Rules.DependsOnRule.html"
+        }
+      },
+      "version": "",
+      "Uid": null,
+      "IsMRef": true,
+      "Title": "Apq.Cfg.Validation.Rules.DependsOnRule",
+      "Summary": "<p sourcefile=\"api/Apq.Cfg.Validation.Rules.DependsOnRule.yml\" sourcestartlinenumber=\"1\">依赖验证规则 - 当依赖键存在时,当前键也必须存在</p>\n"
+    },
+    {
+      "type": "ManagedReference",
+      "source_relative_path": "api/Apq.Cfg.Validation.Rules.EnumValuesRule.yml",
+      "output": {
+        ".html": {
+          "relative_path": "api/Apq.Cfg.Validation.Rules.EnumValuesRule.html"
+        }
+      },
+      "version": "",
+      "Uid": null,
+      "IsMRef": true,
+      "Title": "Apq.Cfg.Validation.Rules.EnumValuesRule",
+      "Summary": "<p sourcefile=\"api/Apq.Cfg.Validation.Rules.EnumValuesRule.yml\" sourcestartlinenumber=\"1\">枚举值验证规则 - 验证值是否在允许的值列表中</p>\n"
+    },
+    {
+      "type": "ManagedReference",
+      "source_relative_path": "api/Apq.Cfg.Validation.Rules.LengthRule.yml",
+      "output": {
+        ".html": {
+          "relative_path": "api/Apq.Cfg.Validation.Rules.LengthRule.html"
+        }
+      },
+      "version": "",
+      "Uid": null,
+      "IsMRef": true,
+      "Title": "Apq.Cfg.Validation.Rules.LengthRule",
+      "Summary": "<p sourcefile=\"api/Apq.Cfg.Validation.Rules.LengthRule.yml\" sourcestartlinenumber=\"1\">字符串长度验证规则</p>\n"
+    },
+    {
+      "type": "ManagedReference",
+      "source_relative_path": "api/Apq.Cfg.Validation.Rules.RangeRule-1.yml",
+      "output": {
+        ".html": {
+          "relative_path": "api/Apq.Cfg.Validation.Rules.RangeRule-1.html"
+        }
+      },
+      "version": "",
+      "Uid": null,
+      "IsMRef": true,
+      "Title": "Apq.Cfg.Validation.Rules.RangeRule<T>",
+      "Summary": "<p sourcefile=\"api/Apq.Cfg.Validation.Rules.RangeRule-1.yml\" sourcestartlinenumber=\"1\">范围验证规则</p>\n"
+    },
+    {
+      "type": "ManagedReference",
+      "source_relative_path": "api/Apq.Cfg.Validation.Rules.RangeRule.yml",
+      "output": {
+        ".html": {
+          "relative_path": "api/Apq.Cfg.Validation.Rules.RangeRule.html"
+        }
+      },
+      "version": "",
+      "Uid": null,
+      "IsMRef": true,
+      "Title": "Apq.Cfg.Validation.Rules.RangeRule",
+      "Summary": "<p sourcefile=\"api/Apq.Cfg.Validation.Rules.RangeRule.yml\" sourcestartlinenumber=\"1\">范围验证规则工厂</p>\n"
+    },
+    {
+      "type": "ManagedReference",
+      "source_relative_path": "api/Apq.Cfg.Validation.Rules.RegexRule.yml",
+      "output": {
+        ".html": {
+          "relative_path": "api/Apq.Cfg.Validation.Rules.RegexRule.html"
+        }
+      },
+      "version": "",
+      "Uid": null,
+      "IsMRef": true,
+      "Title": "Apq.Cfg.Validation.Rules.RegexRule",
+      "Summary": "<p sourcefile=\"api/Apq.Cfg.Validation.Rules.RegexRule.yml\" sourcestartlinenumber=\"1\">正则表达式验证规则</p>\n"
+    },
+    {
+      "type": "ManagedReference",
+      "source_relative_path": "api/Apq.Cfg.Validation.Rules.RequiredRule.yml",
+      "output": {
+        ".html": {
+          "relative_path": "api/Apq.Cfg.Validation.Rules.RequiredRule.html"
+        }
+      },
+      "version": "",
+      "Uid": null,
+      "IsMRef": true,
+      "Title": "Apq.Cfg.Validation.Rules.RequiredRule",
+      "Summary": "<p sourcefile=\"api/Apq.Cfg.Validation.Rules.RequiredRule.yml\" sourcestartlinenumber=\"1\">必填验证规则</p>\n"
+    },
+    {
+      "type": "ManagedReference",
+      "source_relative_path": "api/Apq.Cfg.Validation.Rules.yml",
+      "output": {
+        ".html": {
+          "relative_path": "api/Apq.Cfg.Validation.Rules.html"
+        }
+      },
+      "version": "",
+      "Uid": null,
+      "IsMRef": true,
+      "Title": "Apq.Cfg.Validation.Rules",
+      "Summary": null
+    },
+    {
+      "type": "ManagedReference",
+      "source_relative_path": "api/Apq.Cfg.Validation.ValidationError.yml",
+      "output": {
+        ".html": {
+          "relative_path": "api/Apq.Cfg.Validation.ValidationError.html"
+        }
+      },
+      "version": "",
+      "Uid": null,
+      "IsMRef": true,
+      "Title": "Apq.Cfg.Validation.ValidationError",
+      "Summary": "<p sourcefile=\"api/Apq.Cfg.Validation.ValidationError.yml\" sourcestartlinenumber=\"1\">配置验证错误</p>\n"
+    },
+    {
+      "type": "ManagedReference",
+      "source_relative_path": "api/Apq.Cfg.Validation.ValidationResult.yml",
+      "output": {
+        ".html": {
+          "relative_path": "api/Apq.Cfg.Validation.ValidationResult.html"
+        }
+      },
+      "version": "",
+      "Uid": null,
+      "IsMRef": true,
+      "Title": "Apq.Cfg.Validation.ValidationResult",
+      "Summary": "<p sourcefile=\"api/Apq.Cfg.Validation.ValidationResult.yml\" sourcestartlinenumber=\"1\">配置验证结果</p>\n"
+    },
+    {
+      "type": "ManagedReference",
+      "source_relative_path": "api/Apq.Cfg.Validation.yml",
+      "output": {
+        ".html": {
+          "relative_path": "api/Apq.Cfg.Validation.html"
+        }
+      },
+      "version": "",
+      "Uid": null,
+      "IsMRef": true,
+      "Title": "Apq.Cfg.Validation",
+      "Summary": null
+    },
     {
       "type": "ManagedReference",
       "source_relative_path": "api/Apq.Cfg.Vault.CfgBuilderExtensions.yml",

Разница между файлами не показана из-за своего большого размера
+ 1105 - 0
docs/site/public/api-reference/xrefmap.yml


+ 0 - 857
docs/功能建议与优化改进_2026-01-02.md

@@ -1,857 +0,0 @@
-# Apq.Cfg 功能建议与优化改进
-
-> 分析日期:2026-01-02
-> 基于版本:当前 master 分支
-
----
-
-## 一、项目现状总结
-
-### 1.1 项目规模
-
-| 指标 | 数值 |
-|------|------|
-| NuGet 包数量 | 17 个 |
-| 核心源文件 | 50+ 个 |
-| 单元测试 | 429 个(388 通过,41 跳过需外部服务) |
-| 性能基准测试 | 280+ 个测试方法 |
-| 目标框架 | net8.0, net10.0 (LTS) |
-| API 测试覆盖率 | 100% |
-
-### 1.2 已实现功能
-
-**核心功能**:
-- ✅ 多配置源合并(层级优先级)
-- ✅ 类型安全的配置读取
-- ✅ 配置写入与持久化
-- ✅ 动态重载与变更订阅
-- ✅ 配置节访问
-- ✅ 批量操作(含零堆分配版本)
-- ✅ Microsoft.Extensions.Configuration 集成
-- ✅ 依赖注入集成(IOptions 模式)
-- ✅ 编码自动检测与转换
-- ✅ 加密与脱敏
-- ✅ Native AOT 支持(源生成器)
-
-**支持的配置源**:
-- ✅ 文件格式:JSON、YAML、XML、INI、TOML、.env
-- ✅ 远程配置中心:Consul、Etcd、Nacos、Apollo、Zookeeper
-- ✅ 存储:Redis、Database(SQL Server/MySQL/PostgreSQL/Oracle/SQLite)
-- ✅ 密钥管理:HashiCorp Vault
-- ✅ 环境变量
-
----
-
-## 二、新功能建议
-
-### 2.1 高优先级(P0)
-
-#### 2.1.1 配置验证框架
-
-**需求描述**:
-当前缺少内置的配置值验证机制,用户需要手动验证配置值的有效性。
-
-**建议实现**:
-
-```csharp
-// 1. 定义验证接口
-public interface IConfigValidator
-{
-    ValidationResult Validate(ICfgRoot cfg);
-}
-
-// 2. 内置验证规则
-public class ConfigValidationBuilder
-{
-    public ConfigValidationBuilder Required(string key);
-    public ConfigValidationBuilder Range<T>(string key, T min, T max) where T : IComparable<T>;
-    public ConfigValidationBuilder Regex(string key, string pattern);
-    public ConfigValidationBuilder Custom(string key, Func<string?, bool> validator, string errorMessage);
-    public ConfigValidationBuilder DependsOn(string key, string dependencyKey);
-}
-
-// 3. 使用示例
-var cfg = new CfgBuilder()
-    .AddJson("config.json", level: 0)
-    .AddValidation(v => v
-        .Required("Database:ConnectionString")
-        .Range("Database:Port", 1, 65535)
-        .Regex("App:Email", @"^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$"))
-    .Build();
-
-// 4. 启动时验证
-var result = cfg.Validate();
-if (!result.IsValid)
-{
-    foreach (var error in result.Errors)
-    {
-        Console.WriteLine($"配置错误: {error.Key} - {error.Message}");
-    }
-}
-```
-
-**工作量估计**:3-5 天
-
----
-
-#### 2.1.2 配置快照导出
-
-**需求描述**:
-支持将当前配置状态导出为文件,便于调试、备份和迁移。
-
-**建议实现**:
-
-```csharp
-// 1. 导出接口
-public interface IConfigExporter
-{
-    Task ExportAsync(ICfgRoot cfg, Stream output, ExportOptions? options = null);
-    string Export(ICfgRoot cfg, ExportOptions? options = null);
-}
-
-// 2. 导出选项
-public class ExportOptions
-{
-    public ExportFormat Format { get; set; } = ExportFormat.Json;
-    public bool IncludeMetadata { get; set; } = false;
-    public bool MaskSensitiveValues { get; set; } = true;
-    public string[]? IncludeKeys { get; set; }
-    public string[]? ExcludeKeys { get; set; }
-}
-
-public enum ExportFormat { Json, Yaml, Toml }
-
-// 3. 使用示例
-var exporter = new ConfigExporter();
-var json = exporter.Export(cfg, new ExportOptions
-{
-    Format = ExportFormat.Json,
-    MaskSensitiveValues = true,
-    ExcludeKeys = new[] { "Secrets:*" }
-});
-
-await File.WriteAllTextAsync("config-snapshot.json", json);
-```
-
-**工作量估计**:2-3 天
-
----
-
-### 2.2 中优先级(P1)
-
-#### 2.2.1 日志集成
-
-**需求描述**:
-添加 `ILogger` 支持,便于调试配置加载、变更和错误。
-
-**建议实现**:
-
-```csharp
-// 1. 构建器扩展
-var cfg = new CfgBuilder()
-    .WithLogging(loggerFactory)  // 或 .WithLogging(logger)
-    .AddJson("config.json", level: 0)
-    .Build();
-
-// 2. 日志输出示例
-// [INF] Apq.Cfg: Loading configuration from config.json
-// [INF] Apq.Cfg: Loaded 42 configuration keys from config.json
-// [DBG] Apq.Cfg: Configuration key 'Database:Host' = 'localhost'
-// [WRN] Apq.Cfg: Configuration file config.local.json not found (optional)
-// [INF] Apq.Cfg: Configuration changed: Database:Port (5432 -> 5433)
-```
-
-**工作量估计**:1-2 天
-
----
-
-#### 2.2.2 配置差异对比
-
-**需求描述**:
-提供配置状态对比功能,便于发现配置变更。
-
-**建议实现**:
-
-```csharp
-// 1. 差异接口
-public interface IConfigDiff
-{
-    IReadOnlyList<ConfigChange> Changes { get; }
-    bool HasChanges { get; }
-}
-
-public class ConfigChange
-{
-    public string Key { get; }
-    public string? OldValue { get; }
-    public string? NewValue { get; }
-    public ChangeType Type { get; } // Added, Modified, Removed
-}
-
-// 2. 使用示例
-var snapshot1 = cfg.CreateSnapshot();
-// ... 配置变更 ...
-var snapshot2 = cfg.CreateSnapshot();
-
-var diff = snapshot1.CompareTo(snapshot2);
-foreach (var change in diff.Changes)
-{
-    Console.WriteLine($"[{change.Type}] {change.Key}: {change.OldValue} -> {change.NewValue}");
-}
-```
-
-**工作量估计**:2-3 天
-
----
-
-#### 2.2.3 配置模板与变量替换
-
-**需求描述**:
-支持配置值中的变量引用,减少重复配置。
-
-**建议实现**:
-
-```json
-{
-  "App": {
-    "Name": "MyApp",
-    "DataDir": "/var/data/${App:Name}",
-    "LogDir": "${env:HOME}/logs/${App:Name}",
-    "ConnectionString": "Host=${Database:Host};Port=${Database:Port}"
-  },
-  "Database": {
-    "Host": "localhost",
-    "Port": 5432
-  }
-}
-```
-
-```csharp
-var cfg = new CfgBuilder()
-    .AddJson("config.json", level: 0)
-    .EnableVariableExpansion(options =>
-    {
-        options.Prefix = "${";
-        options.Suffix = "}";
-        options.EnvironmentVariablePrefix = "env:";
-        options.MaxRecursionDepth = 10;
-    })
-    .Build();
-
-// cfg["App:DataDir"] 返回 "/var/data/MyApp"
-// cfg["App:LogDir"] 返回 "/home/user/logs/MyApp"
-```
-
-**工作量估计**:3-4 天
-
----
-
-#### 2.2.4 配置继承
-
-**需求描述**:
-支持配置节继承,减少重复配置。
-
-**建议实现**:
-
-```json
-{
-  "Database:Default": {
-    "Port": 5432,
-    "Timeout": 30,
-    "MaxConnections": 100
-  },
-  "Database:Primary": {
-    "$inherit": "Database:Default",
-    "Host": "primary-db.example.com"
-  },
-  "Database:Replica": {
-    "$inherit": "Database:Default",
-    "Host": "replica-db.example.com",
-    "MaxConnections": 50
-  }
-}
-```
-
-```csharp
-var cfg = new CfgBuilder()
-    .AddJson("config.json", level: 0)
-    .EnableInheritance(options =>
-    {
-        options.InheritKey = "$inherit";
-    })
-    .Build();
-
-// cfg["Database:Primary:Port"] 返回 "5432"(继承自 Default)
-// cfg["Database:Replica:MaxConnections"] 返回 "50"(覆盖 Default)
-```
-
-**工作量估计**:3-4 天
-
----
-
-### 2.3 低优先级(P2)
-
-#### 2.3.1 云配置服务支持
-
-**AWS Parameter Store**:
-
-```csharp
-var cfg = new CfgBuilder()
-    .AddAwsParameterStore(options =>
-    {
-        options.Path = "/myapp/config/";
-        options.Region = "us-east-1";
-        options.EnableHotReload = true;
-    }, level: 10)
-    .Build();
-```
-
-**Azure App Configuration**:
-
-```csharp
-var cfg = new CfgBuilder()
-    .AddAzureAppConfiguration(options =>
-    {
-        options.ConnectionString = "Endpoint=...";
-        options.LabelFilter = "Production";
-        options.EnableHotReload = true;
-    }, level: 10)
-    .Build();
-```
-
-**工作量估计**:每个 5-7 天
-
----
-
-#### 2.3.2 配置审计日志
-
-**需求描述**:
-记录所有配置变更的审计日志,满足合规要求。
-
-**建议实现**:
-
-```csharp
-var cfg = new CfgBuilder()
-    .AddJson("config.json", level: 0, writeable: true)
-    .EnableAuditLog(options =>
-    {
-        options.LogWriter = new FileAuditLogWriter("config-audit.log");
-        options.IncludeOldValue = true;
-        options.IncludeNewValue = false; // 敏感值不记录
-        options.IncludeTimestamp = true;
-        options.IncludeUser = true;
-    })
-    .Build();
-
-// 审计日志格式
-// 2026-01-02T10:30:00Z | [email protected] | SET | Database:Password | *** -> ***
-// 2026-01-02T10:31:00Z | [email protected] | DELETE | OldConfig:Key | value -> null
-```
-
-**工作量估计**:2-3 天
-
----
-
-#### 2.3.3 配置健康检查
-
-**需求描述**:
-提供 ASP.NET Core 健康检查集成。
-
-**建议实现**:
-
-```csharp
-// 注册健康检查
-services.AddHealthChecks()
-    .AddApqCfgCheck("config", options =>
-    {
-        options.RequiredKeys = new[] { "Database:ConnectionString", "App:Name" };
-        options.CheckRemoteSources = true;
-        options.Timeout = TimeSpan.FromSeconds(5);
-    });
-
-// 健康检查端点
-app.MapHealthChecks("/health");
-```
-
-**工作量估计**:1-2 天
-
----
-
-#### 2.3.4 配置锁定
-
-**需求描述**:
-支持锁定特定配置键,防止运行时修改。
-
-**建议实现**:
-
-```csharp
-var cfg = new CfgBuilder()
-    .AddJson("config.json", level: 0, writeable: true)
-    .LockKeys("Database:ConnectionString", "App:SecretKey")
-    .Build();
-
-// 尝试修改锁定的键会抛出异常
-cfg["Database:ConnectionString"] = "new-value"; // throws ConfigurationLockedException
-```
-
-**工作量估计**:1 天
-
----
-
-## 三、性能优化建议
-
-### 3.1 字符串池化
-
-**当前问题**:
-频繁访问的配置键每次都创建新字符串。
-
-**优化方案**:
-
-```csharp
-// 在 MergedCfgRoot 中添加键池化
-private readonly ConcurrentDictionary<string, string> _keyPool = new();
-
-private string InternKey(string key)
-{
-    return _keyPool.GetOrAdd(key, k => string.Intern(k));
-}
-```
-
-**预期收益**:减少 GC 压力,提升高频访问性能 10-20%
-
----
-
-### 3.2 Span<T> 优化键路径解析
-
-**当前问题**:
-键路径解析使用 `string.Split()` 产生数组分配。
-
-**优化方案**:
-
-```csharp
-// 使用 Span<T> 避免分配
-public static bool TryParsePath(ReadOnlySpan<char> path, out ReadOnlySpan<char> segment, out ReadOnlySpan<char> remaining)
-{
-    var index = path.IndexOf(':');
-    if (index < 0)
-    {
-        segment = path;
-        remaining = ReadOnlySpan<char>.Empty;
-        return true;
-    }
-
-    segment = path.Slice(0, index);
-    remaining = path.Slice(index + 1);
-    return true;
-}
-```
-
-**预期收益**:键路径解析零分配,提升性能 30-50%
-
----
-
-### 3.3 ValueTask 优化
-
-**当前问题**:
-部分同步完成的异步操作使用 `Task` 返回类型。
-
-**优化方案**:
-
-```csharp
-// 将同步完成的操作改为 ValueTask
-public ValueTask ApplyChangesAsync(IReadOnlyDictionary<string, string?> changes, CancellationToken cancellationToken = default)
-{
-    if (changes.Count == 0)
-        return ValueTask.CompletedTask;
-
-    // 实际异步操作
-    return new ValueTask(ApplyChangesInternalAsync(changes, cancellationToken));
-}
-```
-
-**预期收益**:减少异步状态机分配,提升高频调用性能
-
----
-
-### 3.4 配置缓存预热
-
-**当前问题**:
-首次访问配置时需要遍历所有层级。
-
-**优化方案**:
-
-```csharp
-// 添加预热方法
-public void Warmup(params string[] keys)
-{
-    foreach (var key in keys)
-    {
-        _ = this[key]; // 触发缓存
-    }
-}
-
-// 或自动预热常用键
-var cfg = new CfgBuilder()
-    .AddJson("config.json", level: 0)
-    .EnableWarmup(options =>
-    {
-        options.Keys = new[] { "Database:*", "App:*" };
-        options.WarmupOnBuild = true;
-    })
-    .Build();
-```
-
-**预期收益**:首次访问延迟降低 50%+
-
----
-
-## 四、代码质量改进
-
-### 4.1 异常处理增强
-
-**当前问题**:
-远程配置源的异常处理较为粗糙,难以区分不同类型的错误。
-
-**改进方案**:
-
-```csharp
-// 1. 定义专用异常类型
-public class ConfigSourceException : Exception
-{
-    public string SourceName { get; }
-    public ConfigSourceErrorType ErrorType { get; }
-}
-
-public enum ConfigSourceErrorType
-{
-    ConnectionFailed,
-    AuthenticationFailed,
-    Timeout,
-    NotFound,
-    PermissionDenied,
-    InvalidData
-}
-
-// 2. 添加错误回调
-var cfg = new CfgBuilder()
-    .AddConsul(options => { ... }, level: 10)
-    .OnSourceError((source, ex) =>
-    {
-        logger.LogError(ex, "配置源 {Source} 发生错误", source.Name);
-        // 可选:切换到备用源
-    })
-    .Build();
-```
-
----
-
-### 4.2 取消令牌传播
-
-**当前问题**:
-部分异步操作未正确传播 `CancellationToken`。
-
-**改进方案**:
-
-```csharp
-// 确保所有异步方法都接受并传播 CancellationToken
-public async Task<ICfgRoot> BuildAsync(CancellationToken cancellationToken = default)
-{
-    foreach (var source in _sources)
-    {
-        cancellationToken.ThrowIfCancellationRequested();
-        await source.InitializeAsync(cancellationToken);
-    }
-    // ...
-}
-```
-
----
-
-### 4.3 Nullable 注解完善
-
-**当前问题**:
-部分 API 的 nullable 注解不够精确。
-
-**改进方案**:
-
-```csharp
-// 使用 [NotNullWhen] 等特性
-public bool TryGet<T>(string key, [NotNullWhen(true)] out T? value)
-{
-    // ...
-}
-
-// 使用 [MemberNotNull] 特性
-[MemberNotNull(nameof(_data))]
-private void EnsureInitialized()
-{
-    _data ??= new Dictionary<string, string?>();
-}
-```
-
----
-
-## 五、API 改进建议
-
-### 5.1 流式 API
-
-```csharp
-// 当前
-var section = cfg.GetSection("Database");
-var host = section["Host"];
-
-// 建议添加流式 API
-cfg.GetSection("Database")
-   .Bind<DatabaseOptions>()
-   .Validate(options => options.Port > 0, "Port must be positive")
-   .OnChange(options => ReconnectDatabase(options));
-```
-
----
-
-### 5.2 构建器增强
-
-```csharp
-// 建议添加更多配置源加载方式
-builder
-    .AddJsonFromUrl("https://config.example.com/config.json", level: 5)
-    .AddJsonFromStream(stream, level: 6)
-    .AddJsonFromString(jsonString, level: 7)
-    .AddJsonFromEmbeddedResource("MyApp.config.json", level: 0);
-```
-
----
-
-### 5.3 批量操作增强
-
-```csharp
-// 建议添加异步批量操作
-await cfg.GetManyAsync(keys, cancellationToken);
-await cfg.SetManyAsync(values, cancellationToken);
-
-// 建议添加条件批量操作
-cfg.SetManyIf(values, key => !cfg.Exists(key)); // 仅设置不存在的键
-```
-
----
-
-## 六、测试改进建议
-
-### 6.1 集成测试自动化
-
-**当前问题**:
-41 个测试因需要外部服务而跳过。
-
-**改进方案**:
-
-```yaml
-# docker-compose.test.yml
-version: '3.8'
-services:
-  redis:
-    image: redis:7-alpine
-    ports: ["6379:6379"]
-
-  consul:
-    image: consul:1.15
-    ports: ["8500:8500"]
-
-  etcd:
-    image: quay.io/coreos/etcd:v3.5.9
-    ports: ["2379:2379"]
-
-  nacos:
-    image: nacos/nacos-server:v2.2.3
-    ports: ["8848:8848"]
-
-  zookeeper:
-    image: zookeeper:3.8
-    ports: ["2181:2181"]
-
-  vault:
-    image: vault:1.13
-    ports: ["8200:8200"]
-    environment:
-      VAULT_DEV_ROOT_TOKEN_ID: test-token
-```
-
-```bash
-# CI 脚本
-docker-compose -f docker-compose.test.yml up -d
-dotnet test --filter "Category!=RequiresExternalService"
-docker-compose -f docker-compose.test.yml down
-```
-
----
-
-### 6.2 性能回归测试
-
-**改进方案**:
-
-```yaml
-# .github/workflows/benchmark.yml
-name: Performance Benchmark
-on:
-  push:
-    branches: [master]
-  pull_request:
-    branches: [master]
-
-jobs:
-  benchmark:
-    runs-on: ubuntu-latest
-    steps:
-      - uses: actions/checkout@v4
-      - name: Run Benchmarks
-        run: dotnet run -c Release --project benchmarks/Apq.Cfg.Benchmarks -- --export json
-      - name: Compare with Baseline
-        uses: benchmark-action/github-action-benchmark@v1
-        with:
-          tool: 'benchmarkdotnet'
-          output-file-path: BenchmarkDotNet.Artifacts/results/*.json
-          alert-threshold: '150%'
-          fail-on-alert: true
-```
-
----
-
-### 6.3 混沌测试
-
-**改进方案**:
-
-```csharp
-[Fact]
-public async Task Should_Reconnect_After_Network_Failure()
-{
-    // Arrange
-    var consul = new TestConsulServer();
-    var cfg = new CfgBuilder()
-        .AddConsul(options => options.Address = consul.Address, level: 10)
-        .Build();
-
-    // Act - 模拟网络故障
-    consul.SimulateNetworkFailure(TimeSpan.FromSeconds(5));
-
-    // Assert - 应该自动重连
-    await Task.Delay(TimeSpan.FromSeconds(10));
-    Assert.True(cfg.IsConnected);
-}
-```
-
----
-
-## 七、文档改进建议
-
-### 7.1 添加迁移指南
-
-```markdown
-# 从 Microsoft.Extensions.Configuration 迁移
-
-## 1. 替换 ConfigurationBuilder
-
-```csharp
-// 之前
-var config = new ConfigurationBuilder()
-    .AddJsonFile("appsettings.json")
-    .AddEnvironmentVariables()
-    .Build();
-
-// 之后
-var cfg = new CfgBuilder()
-    .AddJson("config.json", level: 0)
-    .AddEnvironmentVariables(level: 1, prefix: "APP_")
-    .Build();
-```
-
-## 2. 替换配置读取
-
-```csharp
-// 之前
-var value = config["Section:Key"];
-var typedValue = config.GetValue<int>("Section:Key");
-
-// 之后
-var value = cfg["Section:Key"];
-var typedValue = cfg.Get<int>("Section:Key");
-```
-```
-
----
-
-### 7.2 添加最佳实践指南
-
-```markdown
-# Apq.Cfg 最佳实践
-
-## 1. 配置层级设计
-
-| 层级 | 用途 | 示例 |
-|------|------|------|
-| 0-2 | 基础配置 | config.json |
-| 3-5 | 环境配置 | config.Production.json |
-| 6-9 | 本地覆盖 | config.local.json |
-| 10-19 | 远程配置 | Consul, Nacos |
-| 20+ | 环境变量 | 最高优先级 |
-
-## 2. 敏感配置处理
-
-- 使用 Vault 存储密钥
-- 启用配置脱敏
-- 不要在日志中输出敏感值
-
-## 3. 性能优化
-
-- 使用 `GetMany()` 批量读取
-- 启用配置缓存预热
-- 避免在热路径中频繁读取配置
-```
-
----
-
-## 八、优先级总结
-
-| 优先级 | 功能/改进 | 工作量 | 价值 |
-|--------|----------|--------|------|
-| **P0** | 配置验证框架 | 3-5 天 | 高 |
-| **P0** | 配置快照导出 | 2-3 天 | 高 |
-| **P1** | 日志集成 | 1-2 天 | 高 |
-| **P1** | 配置差异对比 | 2-3 天 | 中 |
-| **P1** | 配置模板 | 3-4 天 | 中 |
-| **P1** | 配置继承 | 3-4 天 | 中 |
-| **P2** | AWS Parameter Store | 5-7 天 | 中 |
-| **P2** | Azure App Configuration | 5-7 天 | 中 |
-| **P2** | 配置审计日志 | 2-3 天 | 中 |
-| **P2** | 配置健康检查 | 1-2 天 | 低 |
-| **P2** | 配置锁定 | 1 天 | 低 |
-| **P3** | 字符串池化优化 | 1 天 | 低 |
-| **P3** | Span<T> 优化 | 2 天 | 低 |
-| **P3** | ValueTask 优化 | 1 天 | 低 |
-| **P3** | 集成测试自动化 | 2-3 天 | 中 |
-
----
-
-## 九、实施建议
-
-### 第一阶段(1-2 周)
-1. 实现配置验证框架
-2. 实现配置快照导出
-3. 添加日志集成
-
-### 第二阶段(2-3 周)
-1. 实现配置差异对比
-2. 实现配置模板
-3. 实现配置继承
-
-### 第三阶段(3-4 周)
-1. 添加 AWS Parameter Store 支持
-2. 添加 Azure App Configuration 支持
-3. 性能优化
-
-### 第四阶段(持续)
-1. 完善集成测试
-2. 添加性能回归测试
-3. 文档完善
-
----
-
-*文档生成时间:2026-01-02*

+ 1 - 0
versions/Apq.Cfg.Apollo/v1.1.2.md

@@ -0,0 +1 @@
+

+ 1 - 0
versions/Apq.Cfg.Consul/v1.1.2.md

@@ -0,0 +1 @@
+

+ 1 - 0
versions/Apq.Cfg.Crypto.DataProtection/v1.1.2.md

@@ -0,0 +1 @@
+

+ 1 - 0
versions/Apq.Cfg.Crypto.Tool/v1.1.2.md

@@ -0,0 +1 @@
+

+ 1 - 0
versions/Apq.Cfg.Crypto/v1.1.2.md

@@ -0,0 +1 @@
+

+ 1 - 0
versions/Apq.Cfg.Database/v1.1.2.md

@@ -0,0 +1 @@
+

+ 1 - 0
versions/Apq.Cfg.Env/v1.1.2.md

@@ -0,0 +1 @@
+

+ 1 - 0
versions/Apq.Cfg.Etcd/v1.1.2.md

@@ -0,0 +1 @@
+

+ 1 - 0
versions/Apq.Cfg.Ini/v1.1.2.md

@@ -0,0 +1 @@
+

+ 1 - 0
versions/Apq.Cfg.Nacos/v1.1.2.md

@@ -0,0 +1 @@
+

+ 1 - 0
versions/Apq.Cfg.Redis/v1.1.2.md

@@ -0,0 +1 @@
+

+ 1 - 0
versions/Apq.Cfg.SourceGenerator/v1.1.2.md

@@ -0,0 +1 @@
+

+ 1 - 0
versions/Apq.Cfg.Toml/v1.1.2.md

@@ -0,0 +1 @@
+

+ 1 - 0
versions/Apq.Cfg.Vault/v1.1.2.md

@@ -0,0 +1 @@
+

+ 1 - 0
versions/Apq.Cfg.Xml/v1.1.2.md

@@ -0,0 +1 @@
+

+ 1 - 0
versions/Apq.Cfg.Yaml/v1.1.2.md

@@ -0,0 +1 @@
+

+ 1 - 0
versions/Apq.Cfg.Zookeeper/v1.1.2.md

@@ -0,0 +1 @@
+

+ 1 - 0
versions/Apq.Cfg/v1.1.2.md

@@ -0,0 +1 @@
+

Некоторые файлы не были показаны из-за большого количества измененных файлов