Share via


InvokeMethod.RunAsynchronously 属性

定义

获取或设置一个值,该值指示是否以异步方式调用活动的方法。

public:
 property bool RunAsynchronously { bool get(); void set(bool value); };
public bool RunAsynchronously { get; set; }
member this.RunAsynchronously : bool with get, set
Public Property RunAsynchronously As Boolean

属性值

如果方法异步执行,则为 true

示例

下面的代码示例演示如何设置 InvokeMethod 活动的 RunAsynchronously 属性。 此示例摘自 使用 InvokeMethod 活动 示例。

new InvokeMethod
{
    TargetObject = new InArgument<TestClass>(ctx => testClass),
    MethodName = "AsyncMethodSample",
    RunAsynchronously = true,
    Parameters =
    {
        new InArgument<string>("Hello async"),
    }
},

适用于