ContextualOptionsServiceCollectionExtensions.AddContextualOptions Method

Definition

Adds services required for using contextual options.

public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddContextualOptions (this Microsoft.Extensions.DependencyInjection.IServiceCollection services);

Parameters

services
IServiceCollection

The IServiceCollection to add the services to.

Returns

The value of services.

Applies to

Product Versions
.NET 8 (package-provided), 9 (package-provided)
.NET Framework 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided)