我有 In Rule 方法,它应该接受一组简单类型,例如字符串类型数组或整数数组(int16)。
我尝试创建以下方法
/* Method with string array*/
[Method(DisplayName = "[M1]")]
public int Method1([Parameter(ValueInputType.All)]
string[] valStrings )
{
return valStrings.Length; // any calculation goes here
}
}
/* Method with PARAMS string array*/
[Method(DisplayName = "[M2]")]
public int Method2([Parameter(ValueInputType.All)]
params string[] valStrings )
{
return valStrings.Length; // any calculation goes here
}
}
/* Method with INT ARRAY referencing on external data source*/
[Method(DisplayName = "[M2]")]
public int Method2([Parameter(ValueInputType.All,
DataSourceName="myDataList" )]
params int[] valInt )
{
return valInt; // any calculation goes here
}
}
似乎 codeeffect 库4.3.2.6不支持将用户输入的参数传递给 In-Rule 方法,并且仅使用简单的参数类型(例如Int而不是int[] )限制 In-Rule 方法。似乎我无法将 DataSource 与 In Rule 方法连接以将多个项目从数据源传递到 in-rule 方法中。只有 USER 应输入简单类型或选择多个数据源项的主要思想?我不能限制用户从返回集合的源对象传递源对象字段。
有什么建议或解决方法吗?