Compensate.Target Property

.NET Framework (current version)
 

Gets or sets the T:System.WorkflowModel.InArgument`1 that contains the T:System.Activities.Statements.CompensationHandle for this Compensate activity.

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

public InArgument<CompensationToken> Target { get; set; }

Property Value

Type: System.Activities.InArgument<CompensationToken>

A T:System.WorkflowModel.InArgument`1 that contains the T:System.Activities.Statements.CompensationHandle for this Compensate.

When the Target of the T:System.Activities.Statements.CompensationHandle is specified, the Compensate activity explicitly invokes the compensation handler of CompensableActivity, which returns the T:System.Activities.Statements.CompensationHandle. When the Target of the T:System.Activities.Statements.CompensationHandle is not specified, the Compensate activity invokes the default compensation for any child CompensableActivity activities in the reverse order of successful completion. An T:System. 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.

.NET Framework
Available since 4.0
Return to top
Show: