SolutionsConfigLoader

Loads and validates solutions.json configuration files for multi-solution documentation generation.

Syntax

public class SolutionsConfigLoader

Inheritance

Methods

CreateDefault

public SolutionsConfig CreateDefault(string siteName = "Documentation Site")
Creates a default solutions.json configuration template.

Parameters

  • siteName string: The name of the documentation site.

Returns

SolutionsConfig A SolutionsConfig with sensible defaults.

GetAllIgnorePatterns

public IEnumerable<string> GetAllIgnorePatterns(SolutionsConfig config)
Gets all folders that should be ignored during processing.

Parameters

Returns

IEnumerable<string> A combined list of default and custom ignore patterns.

LoadAsync

public Task<SolutionsConfig> LoadAsync(string filePath)
Loads and validates a solutions.json configuration file.

Parameters

  • filePath string: The path to the solutions.json file.

Returns

Task<SolutionsConfig> A validated SolutionsConfig object.

Exceptions

  • [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception): Thrown when filePath is null or whitespace.
  • [FileNotFoundException](https://learn.microsoft.com/dotnet/api/system.io.filenotfoundexception): Thrown when the solutions.json file does not exist.
  • [InvalidOperationException](https://learn.microsoft.com/dotnet/api/system.invalidoperationexception): Thrown when the configuration is invalid.

ShouldIgnoreDirectory

public bool ShouldIgnoreDirectory(string directoryName, SolutionsConfig config)
Checks if a directory should be ignored during processing.

Parameters

  • directoryName string: The name of the directory to check.
  • config SolutionsConfig: The solutions configuration containing custom ignore patterns.

Returns

bool True if the directory should be ignored; otherwise, false.

Remarks

This class handles parsing of solutions.json files, applies default configurations, and validates the resulting configuration for multi-solution documentation generation.