public void BeginTransaction(IConnection connection, Bookmark bookmark)
        {
            IDictionary <string, object> parameters = bookmark?.AsBeginTransactionParameters();

            connection.Enqueue(new RunMessage(Begin, parameters), null, PullAll);
            if (bookmark != null && !bookmark.IsEmpty())
            {
                connection.Sync();
            }
        }
        public async Task BeginTransactionAsync(IConnection connection, Bookmark bookmark)
        {
            IDictionary <string, object> parameters = bookmark?.AsBeginTransactionParameters();

            connection.Enqueue(new RunMessage(Begin, parameters), null, PullAll);
            if (bookmark != null && !bookmark.IsEmpty())
            {
                await connection.SyncAsync().ConfigureAwait(false);
            }
        }
Esempio n. 3
0
        public async Task BeginTransactionAsync(IConnection connection, Bookmark bookmark, TransactionConfig txConfig)
        {
            AssertNullOrEmptyTransactionConfig(txConfig);
            var parameters = bookmark?.AsBeginTransactionParameters();
            var handler    = new V1.BeginResponseHandler();
            await connection.EnqueueAsync(new RunMessage(Begin, parameters), handler, PullAll, handler)
            .ConfigureAwait(false);

            if (bookmark?.HasBookmark ?? false)
            {
                await connection.SyncAsync().ConfigureAwait(false);
            }
        }