ContextualOptionsServiceCollectionExtensions.AddContextualOptions 方法

定义

添加使用上下文选项所需的服务。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyInjection::IServiceCollection ^ AddContextualOptions(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services);
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddContextualOptions (this Microsoft.Extensions.DependencyInjection.IServiceCollection services);
static member AddContextualOptions : Microsoft.Extensions.DependencyInjection.IServiceCollection -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddContextualOptions (services As IServiceCollection) As IServiceCollection

参数

services
IServiceCollection

要向其中添加服务的 IServiceCollection

返回

services 的值。

适用于