ConditionalSelector class
根据条件在两个规则选择器之间进行选择。
- 扩展
属性
$kind | |
condition | 确定要使用的选择器的表达式。 |
if |
获取或设置条件为 false 的选择器。 |
if |
获取或设置条件为 true 的选择器。 |
parser | 获取或设置要使用的表达式分析器。 |
方法
get |
获取选择器配置的转换器。 |
initialize(On |
使用规则集初始化选择器。 |
select(Action |
选择要执行的最佳规则。 |
继承的方法
configure(Record<string, unknown>) | 用于配置对象的 Fluent 方法。 |
属性详细信息
$kind
static $kind: string
属性值
string
condition
确定要使用的选择器的表达式。
condition: BoolExpression
属性值
BoolExpression
ifFalse
ifTrue
parser
获取或设置要使用的表达式分析器。
parser: ExpressionParserInterface
属性值
ExpressionParserInterface
方法详细信息
getConverter(Object)
获取选择器配置的转换器。
function getConverter(property: Object): Converter | ConverterFactory
参数
- property
-
Object
条件选择器配置的键。
返回
Converter | ConverterFactory
选择器配置的转换器。
initialize(OnCondition[], boolean)
使用规则集初始化选择器。
function initialize(conditionals: OnCondition[], evaluate: boolean)
参数
- conditionals
匹配的可能规则。
- evaluate
-
boolean
如此 如果应在选择时评估规则。
select(ActionContext)
选择要执行的最佳规则。
function select(actionContext: ActionContext): Promise<OnCondition[]>
参数
- actionContext
- ActionContext
用于评估的对话上下文。
返回
Promise<OnCondition[]>
具有数字数组的 Promise。
继承的方法详细信息
configure(Record<string, unknown>)
用于配置对象的 Fluent 方法。
function configure(config: Record<string, unknown>): this
参数
- config
-
Record<string, unknown>
要应用的配置设置。
返回
this
操作完成后 可配置。
继承自 Configure.configure