public int GetValidPasswords(string[] inputs) { var parsedInputs = inputs .Select(_inputParser.ParseInput) .Where(r => r != null) .Select(r => r !.Value) .ToArray(); return (parsedInputs .Select(v => _passwordValidator.IsPasswordCompliant(v.policy, v.password)) .Count(b => b)); }