public Transaction(IConnection connection, ITransactionResourceHandler resourceHandler = null, ILogger logger = null, Bookmark bookmark = null) : base(logger) { _connection = new TransactionConnection(this, connection); _protocol = _connection.BoltProtocol; _resourceHandler = resourceHandler; Bookmark = bookmark; }
public Transaction(IConnection connection, ITransactionResourceHandler resourceHandler = null, ILogger logger = null, Bookmark bookmark = null) : base(logger) { _connection = new TransactionConnection(this, connection); _resourceHandler = resourceHandler; IDictionary <string, object> parameters = bookmark?.AsBeginTransactionParameters(); _connection.Run(Begin, parameters); }
public Transaction(IConnection connection, ITransactionResourceHandler resourceHandler = null, IDriverLogger logger = null, Bookmark bookmark = null) { _connection = new TransactionConnection(this, connection); _protocol = _connection.BoltProtocol; _resourceHandler = resourceHandler; _bookmark = bookmark; _logger = logger; }
/// <summary> /// Adds a long term login entry /// </summary> /// <returns>An awaitable task.</returns> /// <param name="record">The record to add.</param> public virtual Task AddOrUpdateLongTermLoginAsync(LongTermToken record) { return(m_lock.LockedAsync(() => { using (var con = new TransactionConnection(m_connection, m_connection.BeginTransaction())) { con.Delete <LongTermToken>(x => x.Series == record.Series); con.InsertItem(record); con.Commit(); } })); }
public void OnReportRefreshing() { if (IsTransactional == false) { return; } // TODO: We can get here where Transaction != null by messing with IsTransactional but that's about it... // Make IsT private set and get rid of this DisposeTransaction(Transaction); Transaction = TransactionConnection.BeginTransaction(); }