Affecto.IdentityManagement.ApplicationServices.UserService.SetUserGroups C# (CSharp) Метод

SetUserGroups() приватный Метод

private SetUserGroups ( System.Guid userId, IReadOnlyList authenticatedGroups ) : void
userId System.Guid
authenticatedGroups IReadOnlyList
Результат void
        private void SetUserGroups(Guid userId, IReadOnlyList<string> authenticatedGroups)
        {
            IEnumerable<Group> groups = GetGroupsWithExternalGroup(queryService.GetGroups());

            foreach (var group in groups)
            {
                if (authenticatedGroups.Any(o => group.ExternalGroupName.Equals(o, StringComparison.OrdinalIgnoreCase)))
                {
                    AddGroup(userId, group.Id);
                }
                else
                {
                    RemoveGroup(userId, group.Id);
                }
            }
        }