RuntimeTransactionHandle.RequestTransactionContext Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Initiates the creation of a NativeActivityTransactionContext for use with a new transaction.
public:
void RequestTransactionContext(System::Activities::NativeActivityContext ^ context, Action<System::Activities::NativeActivityTransactionContext ^, System::Object ^> ^ callback, System::Object ^ state);
public void RequestTransactionContext (System.Activities.NativeActivityContext context, Action<System.Activities.NativeActivityTransactionContext,object> callback, object state);
member this.RequestTransactionContext : System.Activities.NativeActivityContext * Action<System.Activities.NativeActivityTransactionContext, obj> * obj -> unit
Public Sub RequestTransactionContext (context As NativeActivityContext, callback As Action(Of NativeActivityTransactionContext, Object), state As Object)
- 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.
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.
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 |
.NET feedback
.NET is an open source project. Select a link to provide feedback: