运行子程序(生成操作项定义)失败。解析表达式出错。
内部错误:Oops! The type could not be found. Contact our support team for more information or if you believe it's an error on our part: info@zzzprojects.com. The error occurred for expression "." at position 113 near ".WriteState(\"操作项定义\", \"\");".
原始表达式:
// 灰色 fa:Light_Circle:#d4d4d4
// 绿色 fa:Regular_Circle:#217547
if(v_text.IsNullOrWhiteSpace()){
_context.WriteState("操作项定义", "");
return 0;
}
var cells = Regex.Split(v_text, @"<我是一个拆分标签>").ToList();
if(v_滤除空白值)
cells = cells.Where(x => !x.IsNullOrWhiteSpace() ).ToList();
Func<string, int, CommonOperationItem> data2item = (s, i) =>
{
var title = Regex.Match(s, @"\S[^\r\n]*").Value;
var item = new CommonOperationItem()
{
Title = title,
Description = s,
Icon = "fa:Regular_Circle:#FDB440",
Operation = "sp",
SpName = "粘贴_点击粘贴",
Data = $"{i}:{s}"
};
return item;
};
var json = cells.Select((x, i) => data2item(x, i)).ToJson();
_context.WriteState("操作项定义", json);
开始位置:113
附近代码:.WriteState(\"操作项定义\", \"\");(赋值)
(----剪贴板2.0:运行子程序----)