如何在自定义本机活动中从NativeActivityContext获取对象 [英] How to get the object from the NativeActivityContext in the custom native activity

查看:76
本文介绍了如何在自定义本机活动中从NativeActivityContext获取对象的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们用活动设计器创建了一个自定义本机活动,它将安排其他子活动.我们在其上下文中设置了一个名为employee的对象.

We have created a custom native activity with the activity designer.It will schedule other child activities.We have set one object to it's context named employee.

请向我们建议如何在子活动的execute方法中使用NativeActivityContext在子活动中获取/设置此对象.

Please suggest us how can we get/set this object in the child activities using the NativeActivityContext, in the execute method of child activities.

预先感谢

推荐答案

Hi Naga,

Hi Naga,

使用工作流变量在活动之间共享数据.

Use workflow varibales to share data between activities.

尝试在中使用 ActivityBind类 System.Workflow.ComponentModel 命名空间

Try using ActivityBind class in System.Workflow.ComponentModel namespace

ActivityBind 允许数据从工作流中的一个活动流到另一个活动. ActivityBind 是一种声明性的方式,可以完成必须使用代码才能完成的工作,因此是大多数工作流程的关键元素,这些工作流程完全用XAML标记编写.

ActivityBind allows data to flow from one activity to another activity within a workflow. ActivityBind is a declarative way of doing what otherwise must be accomplished using code, and therefore is a key element of most workflows that are written entirely in XAML markup.

 尝试这些链接

http://msdn.microsoft.com/zh-CN/library/system.workflow.componentmodel.activitybind.aspx

http://www.codeproject. com/KB/WF/wf-variable-activity.aspx

我希望这会对您有所帮助.

此致

 


这篇关于如何在自定义本机活动中从NativeActivityContext获取对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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