Edit

Share via


RuntimeTransactionHandle.RequestTransactionContext Method

Definition

Initiates the creation of a NativeActivityTransactionContext for use with a new transaction.

public void RequestTransactionContext (System.Activities.NativeActivityContext context, Action<System.Activities.NativeActivityTransactionContext,object> callback, object state);

Parameters

context
NativeActivityContext

The current execution environment.

callback
Action<NativeActivityTransactionContext,Object>

The method to be called when the NativeActivityTransactionContext is created.

state
Object

An optional user-provided state that contains information about the request.

Remarks

This method is used when the activity creates a new transaction for use by the runtime. The workflow could potentially persist one or more times before the callback is called. This method allows transaction scopes in multiple branches of a parallel to queue up simultaneous requests without blocking each other from persisting at the completion of the transaction. To avoid errors if the workflow persists, make sure the state object can be serialized.

Applies to

Product Versions
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1