InvokeMethod.TargetObject 属性
定义
包含要执行的方法的对象。The object that contains the method to execute.
public:
property System::Activities::InArgument ^ TargetObject { System::Activities::InArgument ^ get(); void set(System::Activities::InArgument ^ value); };
public System.Activities.InArgument TargetObject { get; set; }
member this.TargetObject : System.Activities.InArgument with get, set
Public Property TargetObject As InArgument
属性值
对象。The object.
示例
下面的代码示例演示如何设置 InvokeMethod 活动的 TargetObject 属性。The following code sample demonstrates setting the TargetObject property of an InvokeMethod activity. 此示例来自 使用 InvokeMethod 活动 示例。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"),
}
},