Ejemplo n.º 1
0
        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;
        }
Ejemplo n.º 2
0
        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;
        }