public Task ListenForNewPeople(ListenForNewPeopleRequest request, IServerStreamWriter<Person> responseStream, ServerCallContext context)
 {
     LogRpc(context);
     _personRepository.PersonCreated += async (sender, arg) => await responseStream.WriteAsync(arg.Person);
     _manualResetEvent.Wait();
     return Task.FromResult(0);
 }
示例#2
0
        public Task ListenForNewPeople(ListenForNewPeopleRequest request, IServerStreamWriter <Person> responseStream, ServerCallContext context)
        {
            LogRpc(context);
            _personRepository.PersonCreated += async(sender, arg) => await responseStream.WriteAsync(arg.Person);

            _manualResetEvent.Wait();
            return(Task.FromResult(0));
        }