語言

ServiceProviderOptions 類別

定義

設定預設 IServiceProvider 實作之各種行為的選項。

public ref class ServiceProviderOptions
public class ServiceProviderOptions
type ServiceProviderOptions = class
Public Class ServiceProviderOptions
繼承
ServiceProviderOptions

建構函式

名稱 Description
ServiceProviderOptions()

初始化 ServiceProviderOptions 類別的新執行個體。

屬性

名稱 Description
ValidateOnBuild

取得或設定一個值,指示是否執行驗證,以確保在呼叫時 BuildServiceProvider(IServiceCollection, ServiceProviderOptions) 所有服務都能被建立。

ValidateScopes

取得或設定一個值,指示是否執行驗證,以確保有範圍的服務永遠不會從根提供者中解析。

適用於