Skip to main content

Definition

Assembly: Microsoft.Extensions.DependencyInjection.Abstractions.dll Namespace: Microsoft.Extensions.DependencyInjection

Syntax

Summary

This type is defined in Microsoft.Extensions.DependencyInjection.Abstractions.

Remarks

See Microsoft documentation for more information about the rest of the API.

Methods

AddDocEnricher Extension

Extension method from Microsoft.Extensions.DependencyInjection.DotNetDocsCore_IServiceCollectionExtensions
Adds a custom document enricher to the service collection.

Syntax

Parameters

Returns

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

Type Parameters

  • TEnricher - The type of enricher to add.

Examples

Remarks

Registers the enricher as Scoped implementation of IDocEnricher. Enrichers add conceptual content to documentation entities.

AddDocRenderer Extension

Extension method from Microsoft.Extensions.DependencyInjection.DotNetDocsCore_IServiceCollectionExtensions
Adds a custom document renderer to the service collection.

Syntax

Parameters

Returns

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

Type Parameters

  • TRenderer - The type of renderer to add.

Examples

Remarks

Registers the renderer as Scoped implementation of IDocRenderer.

AddDocTransformer Extension

Extension method from Microsoft.Extensions.DependencyInjection.DotNetDocsCore_IServiceCollectionExtensions
Adds a custom document transformer to the service collection.

Syntax

Parameters

Returns

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

Type Parameters

  • TTransformer - The type of transformer to add.

Examples

Remarks

Registers the transformer as Scoped implementation of IDocTransformer. Transformers modify the documentation model before rendering.

AddDotNetDocs Extension

Extension method from Microsoft.Extensions.DependencyInjection.DotNetDocsCore_IServiceCollectionExtensions
Adds DotNetDocs services with all built-in renderers to the service collection.

Syntax

Parameters

Returns

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

Examples

Remarks

This method registers:
  • ProjectContext as Singleton
  • DocumentationManager as Scoped
  • All built-in renderers (Markdown, JSON, YAML) as Scoped
  • MarkdownXmlTransformer for processing XML documentation tags

AddDotNetDocsCore Extension

Extension method from Microsoft.Extensions.DependencyInjection.DotNetDocsCore_IServiceCollectionExtensions
Adds only the core DotNetDocs services without any renderers.

Syntax

Parameters

Returns

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

Examples

Remarks

Use this method when you want to manually register specific renderers. This registers:
  • ProjectContext as Singleton
  • DocumentationManager as Scoped

AddDotNetDocsPipeline Extension

Extension method from Microsoft.Extensions.DependencyInjection.DotNetDocsCore_IServiceCollectionExtensions
Adds DotNetDocs services using a fluent pipeline builder.

Syntax

Parameters

Returns

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

Examples

AddJsonRenderer Extension

Extension method from Microsoft.Extensions.DependencyInjection.DotNetDocsCore_IServiceCollectionExtensions
Adds the JSON renderer to the service collection.

Syntax

Parameters

Returns

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

Examples

Remarks

Registers JsonRenderer as Scoped implementation of IDocRenderer.

AddMarkdownRenderer Extension

Extension method from Microsoft.Extensions.DependencyInjection.DotNetDocsCore_IServiceCollectionExtensions
Adds the Markdown renderer to the service collection.

Syntax

Parameters

Returns

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

Remarks

Registers the following services:

AddMintlifyRenderer Extension

Extension method from Microsoft.Extensions.DependencyInjection.DotNetDocsMintlify_IServiceCollectionExtensions
Adds the Mintlify renderer to the service collection.

Syntax

Parameters

Returns

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

Examples

Remarks

This method registers:

AddMintlifyRenderer Extension

Extension method from Microsoft.Extensions.DependencyInjection.DotNetDocsMintlify_IServiceCollectionExtensions
Adds a custom Mintlify renderer implementation to the service collection.

Syntax

Parameters

Returns

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

Type Parameters

  • TRenderer - The type of Mintlify renderer to add.

Examples

Remarks

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

AddMintlifyServices Extension

Extension method from Microsoft.Extensions.DependencyInjection.DotNetDocsMintlify_IServiceCollectionExtensions
Adds Mintlify documentation services including the renderer and DocsJsonManager.

Syntax

Parameters

Returns

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

Examples

Remarks

This method registers:

AddMintlifyServices Extension

Extension method from Microsoft.Extensions.DependencyInjection.DotNetDocsMintlify_IServiceCollectionExtensions
Adds Mintlify documentation services with configuration options.

Syntax

Parameters

Returns

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

Examples

Remarks

This method registers:

AddYamlRenderer Extension

Extension method from Microsoft.Extensions.DependencyInjection.DotNetDocsCore_IServiceCollectionExtensions
Adds the YAML renderer to the service collection.

Syntax

Parameters

Returns

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

Remarks

Registers YamlRenderer as Scoped implementation of IDocRenderer.