예제 #1
0
        public static void WarmupGrpc()
        {
            Channel channel = new Channel("127.0.0.1:9001", ChannelCredentials.Insecure);
            var     client  = new DataTest.DataTestClient(channel);

            client.Warmup(new EmptyMessge());
        }
예제 #2
0
        public static void GetDataGrpc()
        {
            Channel channel  = new Channel("127.0.0.1:9001", ChannelCredentials.Insecure);
            var     client   = new DataTest.DataTestClient(channel);
            var     response = client.GetTestData(new DataRequest {
                Type = DataRequest.Types.DataType.User
            });

            if (response != null && response.Data != null)
            {
                Console.WriteLine("Total GRPC Data Records: {0}", response.Data.Count);
            }
        }