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"),
    }
},

適用於