Neo4jClient.Transactions.Neo4jTransaction.Commit C# (CSharp) Метод

Commit() публичный Метод

Commits our current transaction and closes the transaction.
public Commit ( ) : void
Результат void
        public void Commit()
        {
            CheckForOpenTransaction();
            // we have to check for an empty endpoint because we dont have one until our first request
            if (Endpoint == null)
            {
                CleanupAfterClosedTransaction();
                return;
            }

            DoCommit(Endpoint, _client.ExecutionConfiguration, _client.Serializer, CustomHeaders);
            CleanupAfterClosedTransaction();
        }

Usage Example

        public void SinglePhaseCommit(SinglePhaseEnlistment singlePhaseEnlistment)
        {
            // we receive a commit message
            // if we own a local transaction, then commit that transaction
            if (_transaction != null)
            {
                _transaction.Commit();
                _transaction = null;
                singlePhaseEnlistment.Committed();
            }
            else if (_transactionId > 0)
            {
                GetResourceManager().CommitTransaction(_transactionId);
                singlePhaseEnlistment.Committed();
            }

            _enlistedInTransactions.Remove(Transaction.Current);
        }
All Usage Examples Of Neo4jClient.Transactions.Neo4jTransaction::Commit