示例#1
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();
        }
示例#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();
        }
示例#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();
        }
示例#4
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();
        }
示例#5
0
文件: MathClient.cs 项目: mway08/grpc
        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();
        }
示例#6
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();
        }