Beispiel #1
0
        public UserStore(IDBRepositoryConfiguration config,
                         IUserTable <TUser, TUserKey> userTable                     = null,
                         IUserLoginsTable <TUser, TUserKey> userLoginTable          = null,
                         IRoleTable <TRole, TRoleKey> roleTable                     = null,
                         IUserRolesTable <TUser, TUserKey, TRoleKey> userRolesTable = null,
                         IUserClaimsTable <TUser, TUserKey> userClaimsTable         = null)
        {
            this.config = config;

            if (userTable != null)
            {
                this.userTable = userTable;
            }
            else
            {
                this.userTable = new UserTable <TUser, TUserKey>(this.config);
            }

            if (userLoginTable != null)
            {
                this.userLoginTable = userLoginTable;
            }
            else
            {
                this.userLoginTable = new UserLoginsTable <TUser, TUserKey>(this.config);
            }

            if (roleTable != null)
            {
                this.roleTable = roleTable;
            }
            else
            {
                this.roleTable = new RoleTable <TRole, TRoleKey>(this.config);
            }

            if (userRolesTable != null)
            {
                this.userRolesTable = userRolesTable;
            }
            else
            {
                this.userRolesTable = new UserRolesTable <TUser, TUserKey, TRoleKey>(this.config);
            }

            if (userClaimsTable != null)
            {
                this.userClaimsTable = userClaimsTable;
            }
            else
            {
                this.userClaimsTable = new UserClaimsTable <TUser, TUserKey>(this.config);
            }
        }
 public RoleStore(IRoleTable <TRole, TKey> roleTable)
 {
     this.roleTable = roleTable;
 }
Beispiel #3
0
 public RoleProcessor(IRoleTable roleTable)
 {
     _roleTable = roleTable;
 }
Beispiel #4
0
 public UserProcessor(IUserTable userTable, IRoleTable roleTable, IUserRoleTable userRoleTable)
 {
     _userTable     = userTable;
     _roleTable     = roleTable;
     _userRoleTable = userRoleTable;
 }