public void NestedTransactionScope8a()
{
IntResourceManager irm = new IntResourceManager(1);
IntResourceManager irm2 = new IntResourceManager(10);
Assert.Null(Transaction.Current);
using (TransactionScope scope = new TransactionScope(TransactionScopeOption.Suppress))
{
irm.Value = 2;
using (TransactionScope scope2 = new TransactionScope())
{
irm2.Value = 20;
scope2.Complete();
}
irm2.Check(1, 1, 0, 0, "irm2");
Assert.Equal(20, irm2.Value);
scope.Complete();
}
Assert.Null(Transaction.Current);
Assert.Equal(2, irm.Value);
irm.Check(0, 0, 0, 0, "irm");
}