internal Transaction(IsolationLevel isoLevel, InternalTransaction internalTransaction)
{
TransactionManager.ValidateIsolationLevel(isoLevel);
_isoLevel = isoLevel;
// Never create a transaction with an IsolationLevel of Unspecified.
if (IsolationLevel.Unspecified == _isoLevel)
{
_isoLevel = TransactionManager.DefaultIsolationLevel;
}
if (internalTransaction != null)
{
_internalTransaction = internalTransaction;
_cloneId = Interlocked.Increment(ref _internalTransaction._cloneCount);
}
else
{
// Null is passed from the constructor of a CommittableTransaction. That
// constructor will fill in the traceIdentifier because it has allocated the
// internal transaction.
}
}