TransactionHandlerResolver.GetService(Type, Object) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
如果给定的类型为 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。