共用方式為


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 的值。

適用於