Uipath C# Activity

原文链接: https://activities.uipath.com/docs/creating-a-custom-activity
Create the Activity Library

Step 1 Open Visual Studio 2010.

  • Select File->New ->Project.
  • Select Activity Library.
    Uipath C# Activity_第1张图片
    ac1.gif

    Create a new Activity :

Step 2 : Go to Solution Explorer and right-click.

  • Go to Add-> New Item->CodeActivity.
  • Write the below code.


    Uipath C# Activity_第2张图片
    ac2.gif

在原来的dll上又套了一层codeActivity;生成了codeActivity的dll之后,使用packageExplorer将dll打成包,导入UiPath中:


Uipath C# Activity_第3张图片
NuGetPackageExplorer.png
Uipath C# Activity_第4张图片
NuGetPackage1.png

打出来的包长这样:


package.png

将包导入UiPath:
e55d3a2-adding-custom-activity-in-studio.gif

UiPath通过DLL创建Activity的过程就是这样,它的机制跟AA(Automation Anywhere)不一样;
AA是直接通过MetaBot引用DLL中的方法。

你可能感兴趣的:(Uipath C# Activity)