Skip to main content

Definition

Assembly: CloudNimble.DotNetDocs.Mintlify.dll Namespace: Microsoft.Extensions.DependencyInjection Inheritance: System.Object

Syntax

Microsoft.Extensions.DependencyInjection.DotNetDocsMintlify_IServiceCollectionExtensions

Summary

Extension methods for registering Mintlify documentation services with dependency injection.

Methods

AddMintlifyRenderer

Adds the Mintlify renderer to the service collection.

Syntax

public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddMintlifyRenderer(Microsoft.Extensions.DependencyInjection.IServiceCollection services)

Parameters

NameTypeDescription
servicesMicrosoft.Extensions.DependencyInjection.IServiceCollectionThe service collection.

Returns

Type: Microsoft.Extensions.DependencyInjection.IServiceCollection The service collection for chaining.

Examples

services.AddMintlifyRenderer();

Remarks

This method registers:

AddMintlifyRenderer

Adds a custom Mintlify renderer implementation to the service collection.

Syntax

public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddMintlifyRenderer<TRenderer>(Microsoft.Extensions.DependencyInjection.IServiceCollection services) where TRenderer : CloudNimble.DotNetDocs.Mintlify.MintlifyRenderer

Parameters

NameTypeDescription
servicesMicrosoft.Extensions.DependencyInjection.IServiceCollectionThe service collection.

Returns

Type: Microsoft.Extensions.DependencyInjection.IServiceCollection The service collection for chaining.

Type Parameters

  • TRenderer - The type of Mintlify renderer to add.

Examples

services.AddMintlifyRenderer&lt;CustomMintlifyRenderer&gt;();

Remarks

Registers the custom renderer as Scoped implementation of IDocRenderer. The renderer must inherit from MintlifyRenderer. This method also registers:

AddMintlifyServices

Adds Mintlify documentation services including the renderer and DocsJsonManager.

Syntax

public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddMintlifyServices(Microsoft.Extensions.DependencyInjection.IServiceCollection services)

Parameters

NameTypeDescription
servicesMicrosoft.Extensions.DependencyInjection.IServiceCollectionThe service collection.

Returns

Type: Microsoft.Extensions.DependencyInjection.IServiceCollection The service collection for chaining.

Examples

services.AddMintlifyServices();

Remarks

This method registers:

AddMintlifyServices

Adds Mintlify documentation services with configuration options.

Syntax

public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddMintlifyServices(Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Action<CloudNimble.DotNetDocs.Mintlify.MintlifyRendererOptions> configureMintlify)

Parameters

NameTypeDescription
servicesMicrosoft.Extensions.DependencyInjection.IServiceCollectionThe service collection.
configureMintlifySystem.Action<CloudNimble.DotNetDocs.Mintlify.MintlifyRendererOptions>Action to configure Mintlify options.

Returns

Type: Microsoft.Extensions.DependencyInjection.IServiceCollection The service collection for chaining.

Examples

services.AddMintlifyServices(options =&gt;
{
    options.GenerateDocsJson = true;
    options.IncludeIcons = true;
});

Remarks

This method registers: