问题描述
我想在Map的内联C#中使用集合。是不是可以这样做?
I wanted to use collections in inline C# of Map. Is it not possible to do so?
编译时我得到错误:内联脚本错误:命名空间'System.Collections中不存在类型或命名空间名称'HashSet'。 Generic'(你是否错过了程序集引用?)
While compiling i get error : Inline Script Error: The type or namespace name 'HashSet' does not exist in the namespace 'System.Collections.Generic' (are you missing an assembly reference?)
当我尝试向项目添加程序集引用时我得到: 无法添加对"System.Core"的引用。该组件已由构建系统自动引用。
when i try adding assembly reference to the project i get: A reference to 'System.Core' could not be added. This component is already automatically referenced by the build system.
:(
推荐答案
业务流程设计器不支持集合语法。
The Orchestration Designer does not support the Collections syntax.
但是,XLang Engine本身对集合没有任何问题,它纯粹是设计器问题。因此,您可以使用Collections将任何代码烘焙到辅助类中,并从Expression Shape中调用它。
However, the XLang Engine itself has no problem with Collections, it's purely a Designer issue. So, you can bake any code using Collections into a helper class and call that from the Expression Shape.
这篇关于在inline-C#中使用System.Collections.Generic的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!