public static IAccountManager CreateUserManager( ITimeSource timeSource, IAccountRepository userRepository, ISessionRepository sessionRepository, int accountSessionCollectionCapacity, IActionRightResolver actionRightResolver) { ISecurityProvider securityProvider = CreateUserSecurityProvider(); IAccountValidator userValidator = CreateUserValidator(); IAccountManager userManager = new AccountManager( securityProvider, userRepository, userValidator, timeSource, accountSessionCollectionCapacity, sessionRepository, actionRightResolver); return userManager; }
internal static IAccountManager CreateAdminManager( ITimeSource timeSource, IAccountRepository adminRepository, ISessionRepository sessionRepository, int accountSessionCollectionCapacity, IActionRightResolver actionRightResolver) { ISecurityProvider securityProvider = CreateAdminSecurityProvider(); IAccountValidator adminValidator = CreateAdminValidator(); IAccountManager adminManager = new AccountManager( securityProvider, adminRepository, adminValidator, timeSource, accountSessionCollectionCapacity, sessionRepository, actionRightResolver); return adminManager; }