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; } }
internal QueryResult(IEnumerable <TItem> items) { reader = new EnumerableReader(items); this.lifetimeToken = default; }
internal QueryResult(IMaterializingReader <TItem> reader, StateLifetimeToken lifetimeToken) { this.reader = reader; this.lifetimeToken = lifetimeToken; }