Compensate.Target Compensate.Target Compensate.Target Compensate.Target Property


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

 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


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