แก้ไข

แชร์ผ่าน


Compensate.Target Property

Definition

Gets or sets the InArgument<T> that contains the CompensationToken for this Compensate activity.

public:
 property System::Activities::InArgument<System::Activities::Statements::CompensationToken ^> ^ Target { System::Activities::InArgument<System::Activities::Statements::CompensationToken ^> ^ get(); void set(System::Activities::InArgument<System::Activities::Statements::CompensationToken ^> ^ value); };
public System.Activities.InArgument<System.Activities.Statements.CompensationToken> Target { get; set; }
member this.Target : System.Activities.InArgument<System.Activities.Statements.CompensationToken> with get, set
Public Property Target As InArgument(Of CompensationToken)

Property Value

A InArgument<T> that contains the CompensationToken for this Compensate.

Remarks

When the Target of the CompensationToken is specified, the Compensate activity explicitly invokes the compensation handler of CompensableActivity, which returns the CompensationToken. When the Target of the CompensationToken is not specified, the Compensate activity invokes the default compensation for any child CompensableActivity activities in the reverse order of successful completion. An InvalidOperationException is thrown if the Target refers to a CompensableActivity that was previously confirmed or compensated.

This property is read-only at runtime. If the value is set at runtime, an InvalidOperationException is raised.

Applies to