Exemple #1
0
        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
 }
Exemple #3
0
        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);
        }
Exemple #4
0
 internal User Verified()
 {
     User user = new User(name);
     user.verified = true;
     return user;
 }