public static bool HasValidRoles(this ITextViewRoleSet roles) { return(roles.ContainsAll(TextViewRoles.DefaultRoles) && roles.Intersect(TextViewRoles.InvalidRoles).Any() == false); }
private static bool RolesMatch( IEnumerable <string> roles, ITextViewRoleSet roleSet) { return((roles == null) || (roleSet == null) || roleSet.ContainsAll(roles)); }