public Transaction AddTransaction(string identifierCode, string controlNumber)
        {
            TransactionSpecification spec = _specFinder.FindTransactionSpec(this.FunctionalIdentifierCode, this.VersionIdentifierCode, identifierCode);

            Transaction transaction = new Transaction(this, _delimiters, 
                String.Format("ST{0}{0}{1}", _delimiters.ElementSeparator, _delimiters.SegmentTerminator), spec);
            transaction.IdentifierCode = identifierCode;
            transaction.ControlNumber = controlNumber;
            transaction.SetTerminatingTrailerSegment(
                string.Format("SE{0}0{0}{2}{1}", _delimiters.ElementSeparator, _delimiters.SegmentTerminator, controlNumber));

            _transactions.Add(transaction);
            return transaction;
        }
        internal Transaction AddTransaction(string segmentString)
        {
            string transactionType = new Segment(null, _delimiters, segmentString).GetElement(1);

            TransactionSpecification spec = _specFinder.FindTransactionSpec(this.FunctionalIdentifierCode, this.VersionIdentifierCode, transactionType);

            Transaction transaction = new Transaction(this, _delimiters, segmentString, spec);
            //if (_transactions.ContainsKey(transaction.ControlNumber))
            //{
            //    throw new TransactionValidationException("Transaction control number {1} for transaction code {0} already exist within the functional group {4}.",
            //        transaction.IdentifierCode, transaction.ControlNumber, "ST02", transaction.ControlNumber, this.ControlNumber);
            //}
            //else
            //{
                _transactions.Add(transaction);
            //}
            return transaction;
        }