ActivityAction:何时何地? [英] ActivityAction: When and How?

查看:67
本文介绍了ActivityAction:何时何地?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我很难理解何时在自定义活动中使用ActivityAction以及如何使用.我已阅读以下内容:
http://msdn.microsoft. com/en-us/library/dd560895(VS.100).aspx   ;,但仍不清楚.给我的印象是WorkflowElement随Beta 2一起使用了.我也知道ActivityActions被ForEach活动使用,在这种情况下这是有道理的,但是为什么我要在自己的自定义活动之一中使用它呢?另外,DelegateInArgument如何全部发挥作用?我看到了有关它的参考资料,但我没有真正理解它.

这是我真正获得WF4的最后一个主要的心理障碍,我将不胜感激.谢谢!


刀片不需要重新加载...

I'm having difficulty understanding when to use ActivityAction in custom activities and how to do so. I've read through this:
http://msdn.microsoft.com/en-us/library/dd560895(VS.100).aspx but it still isn't really clear. I was under the impression that WorkflowElement is gone to with Beta 2. I also know that ActivityActions are used by the ForEach activity and it makes sense somewhat in that context but why would I use it in one of my own custom activities? Also, how does DelegateInArgument all play into this? I see references to it but I don't really get it.

This is my last big mental hurdle to really getting WF4, some insight would be greatly appreciated. Thanks!


Blades Don't Need Reloading...

推荐答案

James
认为ActivityAction是一种指定方法一个洞"在您的自定义活动中-您希望活动的用户通过填写​​此空洞"来自定义您的自定义活动的行为.另外,您可以指定此孔的结构/约束.例如,ForEach活动说它需要在该漏洞"区域中的活动.可以在T上进行迭代.

我们应该在SDK中提供用于ActivityAction的示例.您还可以使用反射器并签出ForEach活动的代码.
Kavita
Hi James
THink of ActivityAction as a way to specify a "hole" in your custom activity - you want the users of your activity to customize the behavior of your custom activity by filling in this "hole". Also, you can specify the structure/constraints of this hole. For instance, the ForEach activity says that it needs an activity in that "hole" which can iterate over it's T.

We should have samples in the SDK for ActivityAction. You can also use reflector and check out the code for the ForEach activity.
Kavita


这篇关于ActivityAction:何时何地?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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