private SystemTransaction CreateTransaction(IDatabase database, User user) { if (database == null) throw new InvalidOperationException("No database selected"); // The commit version number of this transaction long transactionVersionNumber; lock (commitSyncRoot) { transactionVersionNumber = currentCommitVersion; } return new SystemTransaction(this, database.CreateTransaction(), transactionVersionNumber, user); }
public void VerifyUser(User userToCheck) { //TODO: Get user information and check if it can open the transaction }
public SystemTransaction CreateTransaction(string username) { User user = new User(username); if (user.IsSystem) throw new ArgumentException("System user cannot create a transaction explicitely."); return CreateTransaction(db, user); }
internal User Verified() { User user = new User(name); user.verified = true; return user; }