public void ExplicitTransaction6c()
{
CommittableTransaction ct = new CommittableTransaction();
IntResourceManager irm = new IntResourceManager(1);
Transaction.Current = ct;
try
{
TransactionScope scope1 = new TransactionScope(TransactionScopeOption.RequiresNew);
/* Enlist */
irm.Value = 2;
TransactionScope scope2 = new TransactionScope();
Assert.Throws<InvalidOperationException>(() => scope1.Dispose());
irm.Check(0, 0, 1, 0, "irm");
scope2.Dispose();
}
finally
{
Transaction.Current = null;
}
}