示例#1
0
        private static async Task GetUsersInGroupStream(User.UserClient userServiceClient)
        {
            var getUsersInGroupViewModel = new GetUsersInGroupViewModel
            {
                GroupId = 1,
            };

            using var call = userServiceClient.GetUsersInGroupStream(getUsersInGroupViewModel);
            while (await call.ResponseStream.MoveNext())
            {
                var user = call.ResponseStream.Current;

                Console.WriteLine($"{user.Id} - {user.FirstName} {user.Surname} - {user.EmailAddress} - {user.Role}|{user.MembershipId}");
            }
        }