public UserRole(string name, SessionManager.Session session) { if (session == null) throw new ArgumentNullException("Session"); this.session = session; this.userRoleManager = session.RoleManager; this.name = name; this.conn = session.Connection; // register with events of the role manager userRoleManager.RoleGrantsOfAllRolesRefreshed += new RoleGrantsOfAllRolesRefreshedHandler(manager_RoleGrantsOfAllRolesRefreshed); userRoleManager.RoleGrantsRefreshed += new RoleGrantsRefreshedHandler(manager_RoleGrantsRefreshed); }
public Session(OracleConnection conn) { if(conn == null) throw new ArgumentNullException("Connection"); this.conn = conn; try { // create managers privManager = new SysPrivManager(this); roleManager = new RoleManager(this); userManager = new UserManager(this); schemaManager = new SchemaManager(this); // store current user reference currentUser = userManager.SessionUser; } catch (Exception e) { MessageBox.Show(string.Format("Exception caught:\n{0}", e.Message)); } }
public RoleManagerLocal(SessionManager.Session session, UserRole userRole) { if (session == null) throw new ArgumentNullException("Session"); this.session = session; manager = session.RoleManager; this.userRole = userRole; this.conn = session.Connection; }