語言

ExecutionStrategyResolver<T>.GetService(Type, Object) 方法

定義

若給定型別為 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>,或零點。

實作

適用於