Exemplo n.º 1
0
        internal Transaction(ITransactionContext context, Database database, int commitId, IsolationLevel isolation, IEnumerable <TableSource> committedTables, IEnumerable <IIndexSet> indexSets)
        {
            CommitId  = commitId;
            Database  = database;
            Isolation = isolation;
            Context   = context;

            context.RegisterInstance <ITransaction>(this);

            Registry = new TransactionRegistry(this);
            TableManager.AddVisibleTables(committedTables, indexSets);

            AddInternalTables();

            TableState = new OldNewTableState();

            IsClosed = false;

            Database.TransactionFactory.OpenTransactions.AddTransaction(this);

            this.CurrentSchema(database.Context.DefaultSchema());
            this.ReadOnly(database.Context.ReadOnly());
            this.AutoCommit(database.Context.AutoCommit());
            this.IgnoreIdentifiersCase(database.Context.IgnoreIdentifiersCase());
            this.ParameterStyle(QueryParameterStyle.Marker);
        }