ServiceProviderOptions 類別

定義

設定預設 IServiceProvider 實作之各種行為的選項。Options for configuring various behaviors of the default IServiceProvider implementation.

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

建構函式

ServiceProviderOptions()

屬性

ValidateOnBuild

true 為執行檢查,確認可在 BuildServiceProvider(IServiceCollection, ServiceProviderOptions) 呼叫期間建立所有服務;否則為 falsetrue to perform check verifying that all services can be created during BuildServiceProvider(IServiceCollection, ServiceProviderOptions) call; otherwise, false. 預設值為 falseDefaults to false. 注意:此檢查不會驗證開放式泛型服務。NOTE: this check doesn't verify open generics services.

ValidateScopes

true 以執行檢查,以確認已設定範圍的服務永遠不會從根提供者取得解析;否則為 falsetrue to perform check verifying that scoped services never gets resolved from root provider; otherwise, false. 預設值為 falseDefaults to false.

方法

Equals(Object)

判斷指定的物件是否等於目前的物件。Determines whether the specified object is equal to the current object.

(繼承來源 Object)
GetHashCode()

做為預設雜湊函式。Serves as the default hash function.

(繼承來源 Object)
GetType()

取得目前執行個體的 TypeGets the Type of the current instance.

(繼承來源 Object)
MemberwiseClone()

建立目前 Object 的淺層複製。Creates a shallow copy of the current Object.

(繼承來源 Object)
ToString()

傳回代表目前物件的字串。Returns a string that represents the current object.

(繼承來源 Object)

適用於