语言

TransactionHandlerResolver.GetService(Type, Object) 方法

定义

如果给定类型为 Func<TResult>,则此方法将尝试返回要使用的服务,否则它将返回 null。 当给定类型为 Func<TResult>时,键应为一个 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>或 null。

实现

适用于