简体   繁体   English

Workflow Foundation中自定义活动的可选参数

[英]Optional Argument for Custom Activities in Workflow Foundation

Is there a way to have an optional argument for a custom activity within Workflow Designer in C#, .NET environment. 在C#、. NET环境中,是否可以为Workflow Designer中的自定义活动提供可选参数。 I know that for Required Arguments here is the syntax: 我知道对于“必需参数”,语法如下:

[RequiredArgument]
[Description("The status to query.")]
public InArgument<StatusValues> Status { get; set; }

But I am wondering how do I define an input argument that could be optional? 但是我想知道如何定义一个可选的输入参数?

Thank you for your help. 谢谢您的帮助。

Actually, the default for all arguments is to be optional. 实际上,所有参数的默认值都是可选的。 So, without the [RequiredArgument] attribute, your argument is optional without anything else you must do. 因此,如果没有[RequiredArgument]属性,则您的参数是可选的,而无需执行其他任何操作。

(I hope I did not miss your point, as this seems to be so obvious...?) (我希望我不要错过你的意思,因为这似乎很明显……?)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM