InvokeMethod.RunAsynchronously Property

.NET Framework (current version)

Gets or sets a value that indicates whether the activity’s method is invoked asynchronously.

Namespace:   System.Activities.Statements
Assembly:  System.Activities (in System.Activities.dll)

public bool RunAsynchronously { get; set; }

Property Value

Type: System.Boolean

true if the method executes asynchronously.

The following code sample demonstrates setting the RunAsynchronously property of an InvokeMethod activity. This example is from the Using the InvokeMethod Activity sample.

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

.NET Framework
Available since 4.0
Return to top