Exemple #1
0
        /// <summary>
        /// Logs the transaction data to the file and remembers the start position.
        /// </summary>
        /// <param name="itemToLog"></param>
        public void LogStartTransaction(ILoggable itemToLog)
        {
            // get the start position
            _currentTransactionDataStartPosition = (ulong)_persistenceManager.GetFileLength(GetTransactionLogFile());

            // now write the transaction data
            using (var stream = _persistenceManager.GetOutputStream(GetTransactionLogFile(), FileMode.Append))
            {
                itemToLog.LogTransactionDataToStream(stream);
            }
        }
        /// <summary>
        /// Logs the transaction data to the file and remembers the start position.
        /// </summary>
        /// <param name="itemToLog"></param>
        public void LogStartTransaction(ILoggable itemToLog)
        {
            // get the start position
            _currentTransactionDataStartPosition = (ulong) _persistenceManager.GetFileLength(GetTransactionLogFile());

            // now write the transaction data
            using (var stream = _persistenceManager.GetOutputStream(GetTransactionLogFile(), FileMode.Append))
            {
                itemToLog.LogTransactionDataToStream(stream);                
            }
        }