Exemplo n.º 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);
        }
Exemplo n.º 2
0
 public void VerifyUser(User userToCheck)
 {
     //TODO: Get user information and check if it can open the transaction
 }
Exemplo n.º 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);
        }
Exemplo n.º 4
0
 internal User Verified()
 {
     User user = new User(name);
     user.verified = true;
     return user;
 }