public static bool IsPartOfGroup(this IClaimSource claimSource, int characterGroupId) { //TODO we can do faster than this return(claimSource.GetGroupsPartOf().Any(g => g.CharacterGroupId == characterGroupId)); }
public static bool IsPartOfAnyOfGroups(this IClaimSource claimSource, IEnumerable <CharacterGroup> groups) { //TODO we can do faster than this return(claimSource.GetGroupsPartOf().Intersect(groups).Any()); }