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>,或者 null。

实现

适用于