sdk
latest
false
- 概述
- 自定义活动
- 将活动迁移到 .NET 6
- 发行说明
- 构建工作流分析器规则
- 构建活动项目设置
- 创建自定义向导
- 按范围划分活动的优先级
- UiPath.Activities.Api.Base
- UiPath.Studio.Activities.Api
- UiPath.Studio.Activities.Api.Activities
- UiPath.Studio.Activities.Api.BusyService
- UiPath.Studio.Activities.Api.ExpressionEditor
- UiPath.Studio.Activities.Api.Expressions
- UiPath.Studio.Activities.Api.Licensing
- UiPath.Studio.Activities.Api.Mocking
- UiPath.Studio.Activities.Api.ObjectLibrary
- UiPath.Studio.Activities.Api.PackageBindings
- UiPath.Studio.Activities.Api.ProjectProperties
- UiPath.Studio.Activities.Api.ScopedActivities
- UiPath.Studio.Activities.Api.Settings
- UiPath.Studio.Activities.Api.Wizards
- UiPath.Studio.Activities.Api.Workflow
- UiPath.Studio.Api.Controls
- UiPath.Studio.Api.Telemetry
- UiPath.Studio.Api.Theme
- Robot JavaScript SDK
- 触发器 SDK
重要 :
请注意此内容已使用机器翻译进行了部分本地化。
开发者指南
Last updated 2024年10月25日
方向
属性可以指向四个方向:
- In:最常见。 用于输入参数。
- 输出:用于输出参数,即活动的结果。
- “输入输出”:很少使用,但在接收数据、修改数据并输出数据以供其他活动使用的活动中非常方便。
-
“无”:布尔值和枚举等独立类型不需要方向。 创建这些类型的属性时,请使用“无”。
注意:在 UiPath Studio 中,Out 和 InOut 属性只能接受变量,而不能接受文本值。 这是有道理的,因为活动需要可写入输出值的内容。
生成的代码
The Argument direction is seen in the declaration of each property. Notice that
FirstNumber
and SecondNumber
are both InArguments
while Sum
is an OutArgument
.
...
#region Properties
[LocalizedDisplayName(nameof(Resources.Addition_FirstNumber_DisplayName))]
[LocalizedDescription(nameof(Resources.Addition_FirstNumber_Description))]
[LocalizedCategory(nameof(Resources.Input_Category))]
public InArgument<int> FirstNumber { get; set; }
[LocalizedDisplayName(nameof(Resources.Addition_SecondNumber_DisplayName))]
[LocalizedDescription(nameof(Resources.Addition_SecondNumber_Description))]
[LocalizedCategory(nameof(Resources.Input_Category))]
public InArgument<int> SecondNumber { get; set; }
[LocalizedDisplayName(nameof(Resources.Addition_Sum_DisplayName))]
[LocalizedDescription(nameof(Resources.Addition_Sum_Description))]
[LocalizedCategory(nameof(Resources.Output_Category))]
public OutArgument<int> Sum { get; set; }
#endregion
...
...
#region Properties
[LocalizedDisplayName(nameof(Resources.Addition_FirstNumber_DisplayName))]
[LocalizedDescription(nameof(Resources.Addition_FirstNumber_Description))]
[LocalizedCategory(nameof(Resources.Input_Category))]
public InArgument<int> FirstNumber { get; set; }
[LocalizedDisplayName(nameof(Resources.Addition_SecondNumber_DisplayName))]
[LocalizedDescription(nameof(Resources.Addition_SecondNumber_Description))]
[LocalizedCategory(nameof(Resources.Input_Category))]
public InArgument<int> SecondNumber { get; set; }
[LocalizedDisplayName(nameof(Resources.Addition_Sum_DisplayName))]
[LocalizedDescription(nameof(Resources.Addition_Sum_Description))]
[LocalizedCategory(nameof(Resources.Output_Category))]
public OutArgument<int> Sum { get; set; }
#endregion
...
UiPath Studio 中的效果
将鼠标悬停在“属性”窗格中的每个属性上即可查看其方向。