public static ChainValidation <Card> GetValidator()
        {
            if (_validator != null)
            {
                return(_validator);
            }

            _validator = new CardSuiteValidation();
            _validator.SetSuccessor(new CardValueValidation());

            return(_validator);
        }
        public UserProcessor()
        {
            userRepository  = new UserRepository();
            principalHelper = new PrincipalHelper();
            operation       = new AuthenticateOperation(AuthenticateUser);
            operation.SetSuccessor(new CreateNewUserOperation(CreateNewUser));

            userCreationValidation = new IsAuthorisedToDoOperationsOnUser(principalHelper, Rights.Create);
            userCreationValidation.SetSuccessor(new ValidateNoDuplicateEmail(userRepository));

            authenticateUserValidation = new ValidateUserExistsInDb(userRepository);
        }