Sdílet prostřednictvím


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);
public void SetBaseTransaction (System.Transactions.CommittableTransaction transaction);
member this.SetBaseTransaction : System.Transactions.CommittableTransaction -> unit
Public Sub SetBaseTransaction (transaction As CommittableTransaction)

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

Applies to

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);
public void SetBaseTransaction (System.Transactions.CommittableTransaction transaction, System.Management.Automation.RollbackSeverity severity);
member this.SetBaseTransaction : System.Transactions.CommittableTransaction * System.Management.Automation.RollbackSeverity -> unit
Public Sub SetBaseTransaction (transaction As CommittableTransaction, severity As RollbackSeverity)

Parameters

transaction
CommittableTransaction

The base transaction

severity
RollbackSeverity

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

Applies to