/// <summary>
 ///     Транзакция: операции вставки или удаления
 /// </summary>
 /// <param name="commit"></param>
 /// <param name="transactionType"></param>
 public void Transaction(VcsCommit commit, VcsStorageTransactionType transactionType) {
     lock (_lock) {
         switch (transactionType) {
             case VcsStorageTransactionType.Commit: Insert(commit); break;
             case VcsStorageTransactionType.Remove: Remove(commit); break;
         }
     }
 }
Beispiel #2
0
        /// <summary>
        ///     Транзакция: операции вставки или удаления
        /// </summary>
        /// <param name="commit"></param>
        /// <param name="transactionType"></param>
        public void Transaction(VcsCommit commit, VcsStorageTransactionType transactionType)
        {
            lock (_lock) {
                switch (transactionType)
                {
                case VcsStorageTransactionType.Commit: Insert(commit); break;

                case VcsStorageTransactionType.Remove: Remove(commit); break;
                }
            }
        }
        /// <summary>
        ///     Регистрирует транзакцию
        /// </summary>
        /// <param name="commit">Представление коммита</param>
        /// <param name="type">Тип транзакции</param>
        private void Transaction(VcsCommit commit, VcsStorageTransactionType type)
        {
            _logger.Transaction(new VcsStorageTransaction {
                Commit   = commit,
                DateTime = DateTime.Now,
                Filename = commit.File.Path,
                Type     = type
            });

            _mapper.Transaction(commit, type);
        }
        /// <summary>
        ///     Регистрирует транзакцию
        /// </summary>
        /// <param name="commit">Представление коммита</param>
        /// <param name="type">Тип транзакции</param>
        private void Transaction(VcsCommit commit, VcsStorageTransactionType type) {
            _logger.Transaction(new VcsStorageTransaction {
                Commit = commit,
                DateTime = DateTime.Now,
                Filename = commit.File.Path,
                Type = type
            });

            _mapper.Transaction(commit, type);
        }