/// <summary>
 /// 构造器
 /// </summary>
 /// <param name="store"></param>
 /// <param name="userOrgStore"></param>
 /// <param name="roleOrgStore"></param>
 /// <param name="roleOrgPerStore"></param>
 /// <param name="mapper"></param>
 public OrganizationManager(IOrganizationStore store, IUserOrgStore userOrgStore, IRoleOrgStore roleOrgStore, IRoleOrgPerStore roleOrgPerStore, IMapper mapper)
 {
     OrganizationStore = store ?? throw new ArgumentNullException(nameof(store));
     UserOrgStore      = userOrgStore ?? throw new ArgumentNullException(nameof(userOrgStore));
     RoleOrgStore      = roleOrgStore ?? throw new ArgumentNullException(nameof(roleOrgStore));
     RoleOrgPerStore   = roleOrgPerStore ?? throw new ArgumentNullException(nameof(roleOrgPerStore));
     Mapper            = mapper ?? throw new ArgumentNullException(nameof(mapper));
 }
Exemplo n.º 2
0
 public RoleManger(IRoleStore store, IPermissionStore permissionStore, IOrganizationStore organizationStore, IUserRoleStore userRoleStore, IUserOrgStore userOrgStore, IRoleOrgStore roleOrgStore, IRoleOrgPerStore roleOrgPerStore, IMapper mapper)
 {
     Store             = store ?? throw new ArgumentNullException(nameof(store));
     PermissionStore   = permissionStore ?? throw new ArgumentNullException(nameof(permissionStore));
     OrganizationStore = organizationStore ?? throw new ArgumentNullException(nameof(organizationStore));
     UserRoleStore     = userRoleStore ?? throw new ArgumentNullException(nameof(userRoleStore));
     UserOrgStore      = userOrgStore ?? throw new ArgumentNullException(nameof(userOrgStore));
     RoleOrgStore      = roleOrgStore ?? throw new ArgumentNullException(nameof(roleOrgStore));
     RoleOrgPerStore   = roleOrgPerStore ?? throw new ArgumentNullException(nameof(roleOrgPerStore));
     Mapper            = mapper ?? throw new ArgumentNullException(nameof(mapper));
 }