예제 #1
0
 /// <summary>
 ///     Коммит тринзакции в бинарный журнал
 /// </summary>
 /// <param name="transaction"></param>
 public void Transaction(VcsStorageTransaction transaction)
 {
     lock (_lock) {
         IncrementElements();
         BinLog.Add(GenerateNode(transaction));
     }
 }
예제 #2
0
        /// <summary>
        ///     Генерирует запись для бинарного журнала о транзакции
        /// </summary>
        /// <param name="transaction"></param>
        /// <returns></returns>
        private XElement GenerateNode(VcsStorageTransaction transaction)
        {
            var node = new XElement("transaction");

            node.SetAttributeValue("Filename", transaction.Filename);
            node.SetAttributeValue("Commit", transaction.Commit.Code);
            node.SetAttributeValue("DateTime", transaction.DateTime);
            node.SetAttributeValue("Type", transaction.Type);
            node.SetAttributeValue("Branch", transaction.Commit.Branch);
            node.SetAttributeValue("Commiter", transaction.Commit.Commiter);

            return(node);
        }