示例#1
0
文件: Program.cs 项目: advi1012/AVG
 public async Task FindAllProducts()
 {
     Console.WriteLine("***** Task FindAllProducts *****");
     using (var call = _client.FindAllProducts(new Empty()))
     {
         int i = 1;
         while (await call.ResponseStream.MoveNext())
         {
             Console.WriteLine("***** Task FindAllProducts Iteration " + i + " *****");
             ProductRequest product = call.ResponseStream.Current;
             Console.WriteLine(i + " Received; Product: " + product.ToString());
             Console.WriteLine("***** Iteration " + i + " done *****");
             i++;
         }
     }
     Console.WriteLine("***** Task End *****");
 }