Windows 工作流基础中命名工作流活动的约定是什么?

发布于 2024-08-06 04:28:44 字数 58 浏览 1 评论 0原文

命名活动时应遵循哪些命名约定?例如,向用户发送电子邮件的 CodeActivity 的名称应该是什么。

What naming conventions to be followed when naming the activities?. For example what should be the name for a CodeActivity that sends email to the user.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

山田美奈子 2024-08-13 04:28:44

正如莫西提到的那样,我会选择有意义的名称,但另外我会添加后缀“活动”。

对于您的具体情况,我会将活动命名为 SendMailActivity

原因:

  1. 第一部分(SendMail)描述了它的用途,后缀Activity显示了它的用途。 (工作流程)
  2. 在大型项目中,当我必须在不知道全名的情况下搜索活动时,它变得非常方便。

如果您检查 .Net 框架中的活动,它们只有一个有意义的名称(WriteLine、Assign),

这只是个人喜好。最后最好与团队其他成员讨论以同意召开大会。

I would go for meaningful name as Maurcie mentioned but additionally I would ad the suffix Activity.

For your concrete case I would name the activity SendMailActivity.

Reasons:

  1. The first part (SendMail) describes what it does and the suffix Activity shows where it can be used. (Workflow)
  2. It becomes very handy in a large project when I have to search for an activity without knowing full name.

If you check the activities from .Net framework they have only a meaningful name (WriteLine,Assign)

It's just a personal preference. In the end is better to discuss with the rest of the team in order to agree for a convention.

提笔落墨 2024-08-13 04:28:44

没有真正的约定。我的一般建议是为查看工作流程图的人使用有意义的名称,因为这是他们了解活动功能的全部内容。

There is no real convention. My general advise is to use meaningful names for people who look at the workflow diagram as that is all they have to see what an activity does.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文