Exemple #1
0
 static void Main(string[] args)
 {
     using (var proxy = new CalculationServiceClient())
     {
         Console.WriteLine(proxy.Add(1, 2));
         Console.ReadLine();
     }
 }
Exemple #2
0
        static public CalculationServiceClient GetCalculationServiceClient(string serviceUrl)
        {
            if (_client == null)
            {
                var channel = GrpcChannel.ForAddress(serviceUrl);
                _client = new CalculationServiceClient(channel);
            }

            return(_client);
        }