public AuthenticatedSession(User user, IDatabaseConnection connection) { if (user == null) throw new ArgumentNullException("user"); if (connection == null) throw new ArgumentNullException("connection"); User = user; Connection = connection; }
public SessionInfo(int commitId, User user, TransactionIsolation isolation, ConnectionEndPoint endPoint) { if (user == null) throw new ArgumentNullException("user"); if (endPoint == null) throw new ArgumentNullException("endPoint"); CommitId = commitId; User = user; EndPoint = endPoint; Isolation = isolation; StartedOn = DateTimeOffset.UtcNow; }
public SystemSession(ITransaction transaction, string currentSchema) { if (String.IsNullOrEmpty(currentSchema)) throw new ArgumentNullException("currentSchema"); if (transaction == null) throw new ArgumentNullException("transaction"); CurrentSchema =currentSchema; Transaction = transaction; Context = transaction.Context.CreateSessionContext(); Context.RegisterInstance(this); User = new User(this, User.SystemName); startedOn = DateTimeOffset.UtcNow; Access = new SessionAccess(this); }
/// <summary> /// Initializes a new instance of the <see cref="SessionInfo"/> class that /// references an established session to the database. /// </summary> /// <param name="commitId">The unique commit identifier.</param> /// <param name="user">The user that owns the session.</param> /// <param name="isolation">The isolation level of the session.</param> /// <remarks> /// This constructor sets the origin connection end point as embedded. /// </remarks> public SessionInfo(int commitId, User user, IsolationLevel isolation) : this(commitId, user, isolation, ConnectionEndPoint.Embedded) { }
/// <summary> /// Initializes a new instance of the <see cref="SessionInfo"/> class. /// </summary> /// <param name="commitId">The commit identifier.</param> /// <param name="user">The user.</param> public SessionInfo(int commitId, User user) : this(commitId, user, IsolationLevel.Unspecified) { }
/// <summary> /// Initializes a new instance of the <see cref="SessionInfo"/> class that has /// no unique commit identification. /// </summary> /// <param name="user">The user that owns the session.</param> /// <param name="isolation">The isolation level of the transaction.</param> public SessionInfo(User user, IsolationLevel isolation) : this(-1, user, isolation) { }
/// <summary> /// Initializes a new instance of the <see cref="SessionInfo" /> class for the /// given user. /// </summary> /// <param name="user">The user that owns the session.</param> public SessionInfo(User user) : this(user, IsolationLevel.Unspecified) { }
/// <summary> /// Initializes a new instance of the <see cref="SessionInfo" /> class. /// </summary> /// <param name="user">The user that owns the session.</param> /// <param name="isolation">The isolation level of the transaction.</param> /// <param name="endPoint">The source end point of the session.</param> public SessionInfo(User user, IsolationLevel isolation, ConnectionEndPoint endPoint) : this(-1, user, isolation, endPoint) { }
public static IUserSession CreateUserSession(this IDatabase database, User user) { // TODO: get the pre-configured default transaction isolation return database.CreateUserSession(new SessionInfo(user)); }
public SessionInfo(int commitId, User user) : this(commitId, user, TransactionIsolation.Unspecified) { }
public SessionInfo(User user, TransactionIsolation isolation) : this(-1, user, isolation) { }
public SessionInfo(User user) : this(user, TransactionIsolation.Unspecified) { }
public SessionInfo(User user, TransactionIsolation isolation, ConnectionEndPoint endPoint) : this(-1, user, isolation, endPoint) { }