ExecutionStrategyResolver<T>.GetService(Type, Object) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
若給定型別為 Func<TResult>,則該解析器會嘗試回傳服務,否則將回傳 null。 當給定型別為 Func{IExecutionStrategy} 時,則鍵值預期為 ExecutionStrategyKey。
public object GetService(Type type, object key);
abstract member GetService : Type * obj -> obj
override this.GetService : Type * obj -> obj
參數
- type
- Type
要解決的服務類型。
- key
- Object
一把用來判斷服務是否要返回的鑰匙。
傳回
一個 Func<TResult>,或零點。