Exemple #1
0
        internal Transaction(Session session, IsolationLevel isolationLevel, bool isAutomatic, Transaction outer,
                             string savepointName)
        {
            lifetimeTokens = new List <StateLifetimeToken>();

            Guid           = Guid.NewGuid();
            State          = TransactionState.NotActivated;
            Session        = session;
            IsolationLevel = isolationLevel;
            IsAutomatic    = isAutomatic;
            IsDisconnected = session.IsDisconnected;
            TimeStamp      = DateTime.UtcNow;
            LifetimeToken  = new StateLifetimeToken();
            lifetimeTokens.Add(LifetimeToken);

            if (outer != null)
            {
                Outer         = outer;
                Guid          = outer.Guid;
                Outermost     = outer.Outermost;
                SavepointName = savepointName;
            }
            else
            {
                Outermost = this;
            }
        }
Exemple #2
0
 internal QueryResult(IEnumerable <TItem> items)
 {
     reader             = new EnumerableReader(items);
     this.lifetimeToken = default;
 }
Exemple #3
0
 internal QueryResult(IMaterializingReader <TItem> reader, StateLifetimeToken lifetimeToken)
 {
     this.reader        = reader;
     this.lifetimeToken = lifetimeToken;
 }