public void SetParentTransaction(ITransaction parentTransactionToSet) { if (parentTransaction == null) { parentTransaction = parentTransactionToSet; lock (parentTransaction.SubTransactionsLocker) { number = parentTransaction.CountSubtransactions + 1; parentTransaction.AddSubTransaction(this); } imbrication = parentTransaction.Imbrication + 1; InitName(); } }