public bool IsContained(HomeOS.Hub.Platform.Views.VRole role) { foreach (HomeOS.Hub.Platform.Views.VRole myRole in roles) { if (Role.ContainsRole(role, myRole)) { return(true); } } return(false); }
public bool IsContained(List <HomeOS.Hub.Platform.Views.VRole> rolesInHome) { if (roles.Count == 0) { return(true); } foreach (HomeOS.Hub.Platform.Views.VRole role in roles) { foreach (var homeRole in rolesInHome) { if (Role.ContainsRole(homeRole, role)) { return(true); } } } return(false); }