Runspace.SetBaseTransaction Method

Definition

Overloads

SetBaseTransaction(CommittableTransaction)

Sets the base transaction for the runspace; any transactions created on this runspace will be nested to this instance

SetBaseTransaction(CommittableTransaction, RollbackSeverity)

Sets the base transaction for the runspace; any transactions created on this runspace will be nested to this instance

SetBaseTransaction(CommittableTransaction)

Sets the base transaction for the runspace; any transactions created on this runspace will be nested to this instance

public void SetBaseTransaction (System.Transactions.CommittableTransaction transaction);
Parameters
transaction
CommittableTransaction

The base transaction

Remarks

This overload uses RollbackSeverity.Error; i.e. the transaction will be rolled back automatically on a non-terminating error or worse

SetBaseTransaction(CommittableTransaction, RollbackSeverity)

Sets the base transaction for the runspace; any transactions created on this runspace will be nested to this instance

public void SetBaseTransaction (System.Transactions.CommittableTransaction transaction, System.Management.Automation.RollbackSeverity severity);
Parameters
transaction
CommittableTransaction

The base transaction

severity
RollbackSeverity

The severity of error that causes PowerShell to automatically rollback the transaction