Skip to main content

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.

.ctor Inherited

Inherited from object

Syntax

public Object()

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;
});

Equals Inherited Virtual

Inherited from object

Syntax

public virtual bool Equals(object obj)

Parameters

NameTypeDescription
objobject?-

Returns

Type: bool

Equals Inherited

Inherited from object

Syntax

public static bool Equals(object objA, object objB)

Parameters

NameTypeDescription
objAobject?-
objBobject?-

Returns

Type: bool

GetHashCode Inherited Virtual

Inherited from object

Syntax

public virtual int GetHashCode()

Returns

Type: int

GetType Inherited

Inherited from object

Syntax

public System.Type GetType()

Returns

Type: System.Type

MemberwiseClone Inherited

Inherited from object

Syntax

protected internal object MemberwiseClone()

Returns

Type: object

ReferenceEquals Inherited

Inherited from object

Syntax

public static bool ReferenceEquals(object objA, object objB)

Parameters

NameTypeDescription
objAobject?-
objBobject?-

Returns

Type: bool

ToString Inherited Virtual

Inherited from object

Syntax

public virtual string ToString()

Returns

Type: string?

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.

UseMintlifyRenderer Extension

Extension method from CloudNimble.DotNetDocs.Core.Configuration.DotNetDocsMintlify_DotNetDocsBuilderExtensions
Adds the Mintlify renderer to the documentation pipeline.

Syntax

public static CloudNimble.DotNetDocs.Core.Configuration.DotNetDocsBuilder UseMintlifyRenderer(CloudNimble.DotNetDocs.Core.Configuration.DotNetDocsBuilder builder)

Parameters

NameTypeDescription
builderCloudNimble.DotNetDocs.Core.Configuration.DotNetDocsBuilderThe DotNetDocs pipeline builder.

Returns

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

Examples

services.AddDotNetDocsPipeline(pipeline =&gt;
{
    pipeline
        .UseMintlifyRenderer()
        .ConfigureContext(ctx =&gt; ctx.OutputPath = "docs/api");
});

Remarks

This method registers:

UseMintlifyRenderer Extension

Extension method from CloudNimble.DotNetDocs.Core.Configuration.DotNetDocsMintlify_DotNetDocsBuilderExtensions
Adds the Mintlify renderer to the documentation pipeline with configuration options.

Syntax

public static CloudNimble.DotNetDocs.Core.Configuration.DotNetDocsBuilder UseMintlifyRenderer(CloudNimble.DotNetDocs.Core.Configuration.DotNetDocsBuilder builder, System.Action<CloudNimble.DotNetDocs.Mintlify.MintlifyRendererOptions> configureMintlify)

Parameters

NameTypeDescription
builderCloudNimble.DotNetDocs.Core.Configuration.DotNetDocsBuilderThe DotNetDocs pipeline builder.
configureMintlifySystem.Action<CloudNimble.DotNetDocs.Mintlify.MintlifyRendererOptions>Action to configure Mintlify options.

Returns

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

Examples

services.AddDotNetDocsPipeline(pipeline =&gt;
{
    pipeline
        .UseMintlifyRenderer(options =&gt;
        {
            options.GenerateDocsJson = true;
            options.IncludeIcons = true;
        })
        .ConfigureContext(ctx =&gt; ctx.OutputPath = "docs/api");
});

Remarks

This method registers:

UseMintlifyRenderer Extension

Extension method from CloudNimble.DotNetDocs.Core.Configuration.DotNetDocsMintlify_DotNetDocsBuilderExtensions
Adds a custom Mintlify renderer implementation to the documentation pipeline.

Syntax

public static CloudNimble.DotNetDocs.Core.Configuration.DotNetDocsBuilder UseMintlifyRenderer<TRenderer>(CloudNimble.DotNetDocs.Core.Configuration.DotNetDocsBuilder builder) where TRenderer : CloudNimble.DotNetDocs.Mintlify.MintlifyRenderer

Parameters

NameTypeDescription
builderCloudNimble.DotNetDocs.Core.Configuration.DotNetDocsBuilderThe DotNetDocs pipeline builder.

Returns

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

Type Parameters

  • TRenderer - The type of Mintlify renderer to add.

Examples

services.AddDotNetDocsPipeline(pipeline =&gt;
{
    pipeline
        .UseMintlifyRenderer&lt;CustomMintlifyRenderer&gt;()
        .ConfigureContext(ctx =&gt; ctx.OutputPath = "docs");
});

Remarks

The renderer must inherit from MintlifyRenderer. This method also registers:

UseMintlifyRenderer Extension

Extension method from CloudNimble.DotNetDocs.Core.Configuration.DotNetDocsMintlify_DotNetDocsBuilderExtensions
Adds a custom Mintlify renderer implementation to the documentation pipeline with configuration options.

Syntax

public static CloudNimble.DotNetDocs.Core.Configuration.DotNetDocsBuilder UseMintlifyRenderer<TRenderer>(CloudNimble.DotNetDocs.Core.Configuration.DotNetDocsBuilder builder, System.Action<CloudNimble.DotNetDocs.Mintlify.MintlifyRendererOptions> configureMintlify) where TRenderer : CloudNimble.DotNetDocs.Mintlify.MintlifyRenderer

Parameters

NameTypeDescription
builderCloudNimble.DotNetDocs.Core.Configuration.DotNetDocsBuilderThe DotNetDocs pipeline builder.
configureMintlifySystem.Action<CloudNimble.DotNetDocs.Mintlify.MintlifyRendererOptions>Action to configure Mintlify options.

Returns

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

Type Parameters

  • TRenderer - The type of Mintlify renderer to add.

Examples

services.AddDotNetDocsPipeline(pipeline =&gt;
{
    pipeline
        .UseMintlifyRenderer&lt;CustomMintlifyRenderer&gt;(options =&gt;
        {
            options.GenerateDocsJson = true;
        })
        .ConfigureContext(ctx =&gt; ctx.OutputPath = "docs");
});

Remarks

The renderer must inherit from MintlifyRenderer. This method also registers:

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();