ServiceProviderOptions.ValidateOnBuild 屬性

定義

取得或設定值,這個值表示是否執行驗證,以確保呼叫 時 BuildServiceProvider(IServiceCollection, ServiceProviderOptions) 可以建立所有服務。

public:
 property bool ValidateOnBuild { bool get(); void set(bool value); };
public bool ValidateOnBuild { get; set; }
member this.ValidateOnBuild : bool with get, set
Public Property ValidateOnBuild As Boolean

屬性值

true 如果執行驗證以確保呼叫期間 BuildServiceProvider(IServiceCollection, ServiceProviderOptions) 可以建立所有服務,則為 ,否則為 false。 預設為 IsDevelopment(IHostingEnvironment) 的值。

備註

未驗證開放式泛型服務。

適用於