Exemple #1
0
        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.FibExample(stub);

                MathExamples.SumExample(stub);

                MathExamples.DivManyExample(stub);
            }

            GrpcEnvironment.Shutdown();
        }
Exemple #2
0
        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();
        }
Exemple #3
0
        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();
        }
Exemple #4
0
        public static void Main(string[] args)
        {
            GrpcEnvironment.Initialize();

            using (Channel channel = new Channel("127.0.0.1:23456"))
            {
                Math.IMathClient stub = new Math.MathClient(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();
        }