Definition

Assembly: CloudNimble.DotNetDocs.Core.dll Namespace: CloudNimble.DotNetDocs.Core.Configuration Inheritance: System.Object

Syntax

CloudNimble.DotNetDocs.Core.Configuration.DotNetDocsBuilder

Summary

Builder for configuring the DotNetDocs documentation pipeline.

Remarks

Provides a fluent API for registering renderers, enrichers, transformers, and configuring the documentation pipeline context.

Constructors

.ctor

Initializes a new instance of the DotNetDocsBuilder class.

Syntax

public DotNetDocsBuilder(Microsoft.Extensions.DependencyInjection.IServiceCollection services)

Parameters

NameTypeDescription
servicesMicrosoft.Extensions.DependencyInjection.IServiceCollectionThe service collection to configure.

Exceptions

ExceptionDescription
ArgumentNullExceptionThrown when services is null.

Methods

AddEnricher

Adds a custom enricher to the pipeline.

Syntax

public CloudNimble.DotNetDocs.Core.Configuration.DotNetDocsBuilder AddEnricher<TEnricher>() where TEnricher : class, CloudNimble.DotNetDocs.Core.IDocEnricher

Returns

Type: CloudNimble.DotNetDocs.Core.Configuration.DotNetDocsBuilder The builder for chaining.

Type Parameters

  • TEnricher - The type of enricher to add.

Examples

pipeline.AddEnricher&lt;ConceptualContentEnricher&gt;();

Remarks

Enrichers add conceptual content to documentation entities.

AddRenderer

Adds a custom renderer to the pipeline.

Syntax

public CloudNimble.DotNetDocs.Core.Configuration.DotNetDocsBuilder AddRenderer<TRenderer>() where TRenderer : class, CloudNimble.DotNetDocs.Core.IDocRenderer

Returns

Type: CloudNimble.DotNetDocs.Core.Configuration.DotNetDocsBuilder The builder for chaining.

Type Parameters

  • TRenderer - The type of renderer to add.

Examples

pipeline.AddRenderer&lt;MyCustomRenderer&gt;();

Remarks

Renderers generate output in specific formats (e.g., Markdown, JSON, YAML).

AddTransformer

Adds a custom transformer to the pipeline.

Syntax

public CloudNimble.DotNetDocs.Core.Configuration.DotNetDocsBuilder AddTransformer<TTransformer>() where TTransformer : class, CloudNimble.DotNetDocs.Core.IDocTransformer

Returns

Type: CloudNimble.DotNetDocs.Core.Configuration.DotNetDocsBuilder The builder for chaining.

Type Parameters

  • TTransformer - The type of transformer to add.

Examples

pipeline.AddTransformer&lt;InheritDocTransformer&gt;();

Remarks

Transformers modify the documentation model before rendering.

ConfigureContext

Configures the ProjectContext for the pipeline.

Syntax

public CloudNimble.DotNetDocs.Core.Configuration.DotNetDocsBuilder ConfigureContext(System.Action<CloudNimble.DotNetDocs.Core.ProjectContext> configure)

Parameters

NameTypeDescription
configureSystem.Action<CloudNimble.DotNetDocs.Core.ProjectContext>Action to configure the ProjectContext.

Returns

Type: CloudNimble.DotNetDocs.Core.Configuration.DotNetDocsBuilder The builder for chaining.

Examples

pipeline.ConfigureContext(ctx =&gt;
{
    ctx.OutputPath = "docs/api";
    ctx.ShowPlaceholders = false;
});

UseJsonRenderer

Adds the JSON renderer to the pipeline.

Syntax

public CloudNimble.DotNetDocs.Core.Configuration.DotNetDocsBuilder UseJsonRenderer(System.Action<CloudNimble.DotNetDocs.Core.Renderers.JsonRendererOptions> configure = null)

Parameters

NameTypeDescription
configureSystem.Action<CloudNimble.DotNetDocs.Core.Renderers.JsonRendererOptions>?Optional action to configure JsonRendererOptions.

Returns

Type: CloudNimble.DotNetDocs.Core.Configuration.DotNetDocsBuilder The builder for chaining.

Examples

pipeline.UseJsonRenderer(options =&gt;
{
    options.WriteIndented = true;
    options.IncludeNullValues = false;
});

UseMarkdownRenderer

Adds the Markdown renderer to the pipeline.

Syntax

public CloudNimble.DotNetDocs.Core.Configuration.DotNetDocsBuilder UseMarkdownRenderer()

Returns

Type: CloudNimble.DotNetDocs.Core.Configuration.DotNetDocsBuilder The builder for chaining.

Examples

pipeline.UseMarkdownRenderer();

Remarks

Also registers MarkdownXmlTransformer to process XML documentation tags.

UseYamlRenderer

Adds the YAML renderer to the pipeline.

Syntax

public CloudNimble.DotNetDocs.Core.Configuration.DotNetDocsBuilder UseYamlRenderer()

Returns

Type: CloudNimble.DotNetDocs.Core.Configuration.DotNetDocsBuilder The builder for chaining.

Examples

pipeline.UseYamlRenderer();