Ejemplo n.º 1
0
 public async Task StructAsyncUnaryCall()
 {
     for (int i = 0; i < ClientRepeatCount; ++i)
     {
         TestRequestStruct  request  = UnitTest1.GetRequestStruct(1);
         TestResponseStruct response = await UnitTest1.Client.StructAsyncUnaryCall(request).ConfigureAwait(false);
     }
 }
Ejemplo n.º 2
0
 public void StructBlockingUnaryCall()
 {
     for (int i = 0; i < ClientRepeatCount; ++i)
     {
         TestRequestStruct  request  = UnitTest1.GetRequestStruct(1);
         TestResponseStruct response = UnitTest1.Client.StructBlockingUnaryCall(request);
     }
 }
Ejemplo n.º 3
0
 public async Task StructServerStreaming()
 {
     using (var call = UnitTest1.Client.StructServerStreaming(UnitTest1.GetRequestStruct(ServerRepeatCount)))
     {
         while (await call.ResponseStream.MoveNext(System.Threading.CancellationToken.None).ConfigureAwait(false))
         {
             TestResponseStruct response = call.ResponseStream.Current;
         }
     }
 }
Ejemplo n.º 4
0
        public async Task StructClientStreaming()
        {
            using (var call = UnitTest1.Client.StructClientStreaming())
            {
                for (int i = 0; i < ClientRepeatCount; ++i)
                {
                    await call.RequestStream.WriteAsync(UnitTest1.GetRequestStruct(1)).ConfigureAwait(false);
                }
                await call.RequestStream.CompleteAsync().ConfigureAwait(false);

                TestResponseStruct response = await call.ResponseAsync.ConfigureAwait(false);
            }
        }