“收集被修改;枚举操作可能不会执行。 Microsoft.Practices.ESB.Itinerary.ResolverCollection [英] "Collection was modified; enumeration operation may not execute." Microsoft.Practices.ESB.Itinerary.ResolverCollection

查看:102
本文介绍了“收集被修改;枚举操作可能不会执行。 Microsoft.Practices.ESB.Itinerary.ResolverCollection的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的行程有2路上斜坡,然后是请求响应Orchestration服务。我有3个旋转变压器,我从BRE解决了。一旦消息在业务流程服务中,我就按照以下链接中的代码迭代解析器
集合,并使用从解析器对象重新获取的映射名和端点信息进行动态转换和动态路由。

http://msdn.microsoft.com/en- us / library / ee250091(v = bts.10).aspx

我有一个具体案例,我需要返回第一个回复并继续处理其他已解决的请求响应调用。当我使用resolvers.MoveNext()时,我遇到了问题。声明两次。 (我使用它一次从集合中访问第一个对象(解析器)
以发回响应。对于下一次循环内部,当我使用resolvers.MoveNext();时,它会抛出以下错误。

"收集已被修改;枚举操作可能无法执行。"

I have an itinerary which has a 2 way on ramp and then a request response Orchestration service. I have 3 resolvers, which I resolve from BRE. Once the message is inside the orchestration service, I follow the code in the below link to iterate on the resolver collection and make dynamic transformation and dynamic routing using the mapnames and the endpoint information retrived from the resolver object.
http://msdn.microsoft.com/en-us/library/ee250091(v=bts.10).aspx
I have a specific case that, I need to return the first response back and continue with processing the other resolved request response calls. I am having an issue when i use the resolvers.MoveNext(); statement twice. (I use it once to access the first object(resolver) from the collection to send back a response. For the next time inside the loop, when i use resolvers.MoveNext(); , it throws the below error.
"Collection was modified; enumeration operation may not execute."

请提出您的想法以解决问题或建议解决问题。我可以重置索引或某些工作的方式。

Please give your thoughts to resolve the issue or suggest a work around. some way in which I can reset the index or somework.

提前致谢。

问候,

Ujjwal

Regards,
Ujjwal

-Ujjwal

推荐答案

另请参阅博客文章为收件人列表模式创建自定义行程编排服务。在MSDN上还有一个示例可用于在循环中使用解析器。我不认为您可以继续到下一个行程服务
,如果你仍然在Orchestration里面并且还要遍历解析器,因为如果你前进到另一个服务您将进入下一步。

See also the blog post Creating a Custom Itinerary Orchestration Service for the Recipient List pattern. There is also a sample available on MSDN where the Resolver is used inside a Loop. I don't think you can continue to the next Itinerary Service if you are still inside the Orchestration and also iterate through the resolvers because if you advance to another Service you are in the next step.

 

为收件人列表模式创建自定义行程编排服务

http ://www.ithero.nl/post/2013/06/02/Creating-a-Custom-Itinerary-Orchestration-Service-for-the-Recipient-List-pattern.aspx

Creating a Custom Itinerary Orchestration Service for the Recipient List pattern
http://www.ithero.nl/post/2013/06/02/Creating-a-Custom-Itinerary-Orchestration-Service-for-the-Recipient-List-pattern.aspx

 

亲切的问候,

Tomasso Groenendijk

Blog  
Twitter


MCTS BizTalk Server 2006,2010

如果这回答你的问题,请相应标记


这篇关于“收集被修改;枚举操作可能不会执行。 Microsoft.Practices.ESB.Itinerary.ResolverCollection的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆