public void Commit() { try { var resultCount = redisClient.Exec(); if (resultCount != queuedCommands.Count) { throw new InvalidOperationException(string.Format( "Invalid results received from 'EXEC', expected '{0}' received '{1}'" + "\nWarning: Transaction was committed", queuedCommands.Count, resultCount)); } foreach (var queuedCommand in queuedCommands) { queuedCommand.ProcessResult(); } } finally { redisClient.CurrentTransaction = null; redisClient.AddTypeIdsRegisteredDuringTransaction(); } }
/// <summary> /// Issue exec command (not queued) /// </summary> private void Exec() { RedisClient.Exec(); RedisClient.FlushSendBuffer(); }