Table of Contents

Class DocfxOperations

Namespace
Ando.Operations
Assembly
ando.dll

DocFX operations for generating API documentation from C# XML comments.

public class DocfxOperations : OperationsBase
Inheritance
DocfxOperations
Inherited Members

Constructors

DocfxOperations(StepRegistry, IBuildLogger, Func<ICommandExecutor>)

DocFX operations for generating API documentation from C# XML comments.

public DocfxOperations(StepRegistry registry, IBuildLogger logger, Func<ICommandExecutor> executorFactory)

Parameters

registry StepRegistry
logger IBuildLogger
executorFactory Func<ICommandExecutor>

Methods

BuildAndCopy(string, string, string)

Generates documentation and copies it to the target directory in one step. This is a convenience method that combines GenerateDocs, CopyToDirectory, and Cleanup. Creates a redirect index.html that points to the API namespace page.

public void BuildAndCopy(string configPath, string outputDir, string targetDir)

Parameters

configPath string

Path to the docfx.json configuration file.

outputDir string

DocFX output directory (from docfx.json).

targetDir string

Target directory to copy the final documentation to.

Cleanup(string)

Cleans up intermediate DocFX files (api/ and output directories).

public void Cleanup(string outputDir = "_apidocs")

Parameters

outputDir string

The DocFX output directory to remove. Defaults to "_apidocs".

CopyToDirectory(string, string)

Copies generated documentation from the DocFX output directory to a target directory.

public void CopyToDirectory(string sourceDir, string targetDir)

Parameters

sourceDir string

Source directory containing generated docs (e.g., "_apidocs").

targetDir string

Target directory to copy docs to (e.g., "./website/public/apidocs").

GenerateDocs(string)

Generates API documentation from a docfx.json configuration file. Runs both 'docfx metadata' to extract API metadata and 'docfx build' to generate HTML.

public void GenerateDocs(string configPath = "./docfx.json")

Parameters

configPath string

Path to the docfx.json configuration file. Defaults to "./docfx.json".

Install()

Installs DocFX as a dotnet global tool if not already installed.

public void Install()

IsInstalled()

Checks if DocFX is installed as a dotnet global tool.

public bool IsInstalled()

Returns

bool

True if DocFX is available, false otherwise.