Exemple #1
0
        private static void RemoveUsersFromGroup()
        {
            if (_groupMemberUsers == null || _groupMemberUsers.Length == 0 || _createdGroup == null)
            {
                return;
            }

            Console.WriteLine();

            // Remove selected group member
            Console.WriteLine();
            Console.WriteLine("Start Group Member Deletion...");

            foreach (var user in _groupMemberUsers)
            {
                Console.WriteLine();
                Console.WriteLine($"\tRemoving user {user.EmailAddress} from group {_createdGroup.Id}.");
                GroupMembersService.DeleteGroupMember(
                    _createdGroup.Id,
                    user.EmailAddress);
            }

            Console.WriteLine();
            Console.WriteLine("Finish Group Member Deletion.");
        }
Exemple #2
0
        private static void AddUsersToGroup()
        {
            if (_createdUsers == null || _createdUsers.Length == 0 || _createdGroup == null)
            {
                return;
            }

            Console.WriteLine();
            Console.WriteLine("Start Adding Group Members...");

            _groupMemberUsers = GroupMembersService.AddGroupMembers(
                _createdGroup.Id,
                _createdUsers
                );

            Console.WriteLine();

            if (_groupMemberUsers == null || _groupMemberUsers.Length == 0)
            {
                var addedCount = _groupMemberUsers?.Length ?? 0;
                Console.WriteLine($"Error Occurred During Adding Some Of Members. Number of Added Members: {addedCount}");

                return;
            }

            Console.WriteLine("Finish Adding Group Members.");
        }
Exemple #3
0
 public GroupMembersController(GroupMembersService gms)
 {
     _gms = gms;
 }
Exemple #4
0
 public GroupsController(GroupsService gs, GroupMoviesService gmov, GroupMembersService gmem)
 {
     _gs   = gs;
     _gmov = gmov;
     _gmem = gmem;
 }