public static bool IsAppRole(string role) { bool valid = false; if (_appRoles != null) { foreach (string STR in _appRoles) { if (STR.Contains(role)) { valid = true; break; } } } return(valid); }