DocFxTempWorkspace

Manages a temporary workspace for DocFX operations.

Syntax

public class DocFxTempWorkspace : IDisposable

Inheritance

Implements

Constructors

DocFxTempWorkspace

public DocFxTempWorkspace()
Initializes a new instance of the DocFxTempWorkspace class.

Properties

ApiOutputPath

public string ApiOutputPath { get; }
Gets the path where DocFX API output will be generated.

Returns

string

DocFxConfigPath

public string DocFxConfigPath { get; }
Gets the path to the DocFX configuration file.

Returns

string

WorkspacePath

public string WorkspacePath { get; }
Gets the root path of the temporary workspace.

Returns

string

Methods

Dispose

public void Dispose()
Releases all resources used by the DocFxTempWorkspace.

Dispose

protected virtual void Dispose(bool disposing)
Releases unmanaged and optionally managed resources.

Parameters

  • disposing bool: true to release both managed and unmanaged resources; false to release only unmanaged resources.

EnsureApiDirectoryExists

public void EnsureApiDirectoryExists()
Ensures the API output directory exists.

GetFilePath

public string GetFilePath(string relativePath)
Gets a file path within the workspace.

Parameters

  • relativePath string: The relative path from the workspace root.

Returns

string The full path to the file within the workspace.

Remarks

This class creates and manages a temporary directory for DocFX operations, ensuring proper cleanup when the workspace is no longer needed.