public AuthorizationDataLoader( ILogProvider logProvider, INamedPlugins <IRepository> repositories, Lazy <GenericRepository <IPrincipal> > principalGenericRepository) { _logger = logProvider.GetLogger(GetType().Name); _principalRepository = (IQueryableRepository <IPrincipal>)repositories.GetPlugin("Common.Principal"); _principalGenericRepository = principalGenericRepository; _principalRolesRepository = (IQueryableRepository <IPrincipalHasRole>)repositories.GetPlugin("Common.PrincipalHasRole"); _roleRolesRepository = (IQueryableRepository <IRoleInheritsRole>)repositories.GetPlugin("Common.RoleInheritsRole"); _principalPermissionRepository = (IQueryableRepository <IPrincipalPermission>)repositories.GetPlugin("Common.PrincipalPermission"); _rolePermissionRepository = (IQueryableRepository <IRolePermission>)repositories.GetPlugin("Common.RolePermission"); _roleRepository = (IQueryableRepository <IRole>)repositories.GetPlugin("Common.Role"); _claimRepository = (IQueryableRepository <ICommonClaim>)repositories.GetPlugin("Common.Claim"); }
public PrincipalWriter( ILogProvider logProvider, INamedPlugins <IRepository> repositories, GenericRepository <IPrincipal> principalGenericRepository, ISqlExecuter sqlExecuter, ISqlUtility sqlUtility) { _logger = logProvider.GetLogger(GetType().Name); _principalRepository = (IQueryableRepository <IPrincipal>)repositories.GetPlugin("Common.Principal"); _principalGenericRepository = principalGenericRepository; _sqlExecuter = sqlExecuter; _sqlUtility = sqlUtility; }
public AuthorizationDataLoader( ILogProvider logProvider, INamedPlugins<IRepository> repositories, Lazy<GenericRepository<IPrincipal>> principalGenericRepository) { _logger = logProvider.GetLogger(GetType().Name); _principalRepository = (IQueryableRepository<IPrincipal>)repositories.GetPlugin("Common.Principal"); _principalGenericRepository = principalGenericRepository; _principalRolesRepository = (IQueryableRepository<IPrincipalHasRole>)repositories.GetPlugin("Common.PrincipalHasRole"); _roleRolesRepository = (IQueryableRepository<IRoleInheritsRole>)repositories.GetPlugin("Common.RoleInheritsRole"); _principalPermissionRepository = (IQueryableRepository<IPrincipalPermission>)repositories.GetPlugin("Common.PrincipalPermission"); _rolePermissionRepository = (IQueryableRepository<IRolePermission>)repositories.GetPlugin("Common.RolePermission"); _roleRepository = (IQueryableRepository<IRole>)repositories.GetPlugin("Common.Role"); _claimRepository = (IQueryableRepository<ICommonClaim>)repositories.GetPlugin("Common.Claim"); }