public static void Main(string[] args) { var channel = new Channel("127.0.0.1", 23456, Credentials.Insecure); Math.IMathClient client = new Math.MathClient(channel); MathExamples.DivExample(client); MathExamples.DivAsyncExample(client).Wait(); MathExamples.FibExample(client).Wait(); MathExamples.SumExample(client).Wait(); MathExamples.DivManyExample(client).Wait(); MathExamples.DependendRequestsExample(client).Wait(); channel.ShutdownAsync().Wait(); }
public static void Main(string[] args) { using (Channel channel = new Channel("127.0.0.1", 23456)) { Math.IMathClient client = new Math.MathClient(channel); MathExamples.DivExample(client); MathExamples.DivAsyncExample(client).Wait(); MathExamples.FibExample(client).Wait(); MathExamples.SumExample(client).Wait(); MathExamples.DivManyExample(client).Wait(); MathExamples.DependendRequestsExample(client).Wait(); } GrpcEnvironment.Shutdown(); }
public static void Main(string[] args) { GrpcEnvironment.Initialize(); using (Channel channel = new Channel("127.0.0.1:23456")) { MathGrpc.IMathServiceClient stub = new MathGrpc.MathServiceClientStub(channel); MathExamples.DivExample(stub); MathExamples.DivAsyncExample(stub).Wait(); MathExamples.FibExample(stub).Wait(); MathExamples.SumExample(stub).Wait(); MathExamples.DivManyExample(stub).Wait(); MathExamples.DependendRequestsExample(stub).Wait(); } GrpcEnvironment.Shutdown(); }