Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ AddVolatileEnlistment()

void System.Transactions.TransactionState.AddVolatileEnlistment ( ref VolatileEnlistmentSet enlistments,
Enlistment enlistment )
inlineprotectedinherited

Definition at line 334 of file TransactionState.cs.

335 {
336 if (enlistments._volatileEnlistmentCount == enlistments._volatileEnlistmentSize)
337 {
338 InternalEnlistment[] array = new InternalEnlistment[enlistments._volatileEnlistmentSize + 8];
339 if (enlistments._volatileEnlistmentSize > 0)
340 {
341 Array.Copy(enlistments._volatileEnlistments, 0, array, 0, enlistments._volatileEnlistmentSize);
342 }
343 enlistments._volatileEnlistmentSize += 8;
344 enlistments._volatileEnlistments = array;
345 }
346 enlistments._volatileEnlistments[enlistments._volatileEnlistmentCount] = enlistment.InternalEnlistment;
347 enlistments._volatileEnlistmentCount++;
348 VolatileEnlistmentState.VolatileEnlistmentActive.EnterState(enlistments._volatileEnlistments[enlistments._volatileEnlistmentCount - 1]);
349 }

References System.array, System.Array.Copy(), System.Transactions.Enlistment.InternalEnlistment, and System.Transactions.VolatileEnlistmentState.VolatileEnlistmentActive.

Referenced by System.Transactions.TransactionStateActive.EnlistVolatile(), System.Transactions.TransactionStatePhase0.EnlistVolatile(), System.Transactions.TransactionStatePromotedNonMSDTCBase.EnlistVolatile(), System.Transactions.TransactionStateActive.EnlistVolatile(), System.Transactions.TransactionStatePhase0.EnlistVolatile(), and System.Transactions.TransactionStatePromotedNonMSDTCBase.EnlistVolatile().