blob: f969d3aa8383414b269149e373da2bf50b6442ef [file] [log] [blame]
Jan Tattermuscha7fff862015-02-13 11:08:08 -08001#region Copyright notice and license
Jan Tattermusch7897ae92017-06-07 22:57:36 +02002// Copyright 2015-2016 gRPC authors.
Craig Tiller190d3602015-02-18 09:23:38 -08003//
Jan Tattermusch7897ae92017-06-07 22:57:36 +02004// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
Craig Tiller190d3602015-02-18 09:23:38 -08007//
Jan Tattermusch7897ae92017-06-07 22:57:36 +02008// http://www.apache.org/licenses/LICENSE-2.0
Craig Tiller190d3602015-02-18 09:23:38 -08009//
Jan Tattermusch7897ae92017-06-07 22:57:36 +020010// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
Jan Tattermuscha7fff862015-02-13 11:08:08 -080015#endregion
Jan Tattermuscha7608b02015-02-03 17:54:38 -080016using System;
17using System.Runtime.InteropServices;
Jan Tattermuscha7608b02015-02-03 17:54:38 -080018using System.Threading;
Jan Tattermusch30868622015-02-19 09:22:33 -080019using Grpc.Core;
Jan Tattermuscha7608b02015-02-03 17:54:38 -080020
Jan Tattermusch28526312015-08-03 09:21:38 -070021namespace Math
Jan Tattermuscha7608b02015-02-03 17:54:38 -080022{
Jan Tattermusch13cd1252015-03-06 10:11:50 -080023 class MathClient
Jan Tattermuscha7608b02015-02-03 17:54:38 -080024 {
Jan Tattermusch13cd1252015-03-06 10:11:50 -080025 public static void Main(string[] args)
26 {
Jan Tattermusch5bd70052015-10-06 16:47:49 -070027 var channel = new Channel("127.0.0.1", 23456, ChannelCredentials.Insecure);
Jan Tattermusch809148d2016-03-22 15:09:41 -070028 Math.MathClient client = new Math.MathClient(channel);
Jan Tattermusch2b357952015-08-20 14:54:33 -070029 MathExamples.DivExample(client);
Jan Tattermuscha7608b02015-02-03 17:54:38 -080030
Jan Tattermusch2b357952015-08-20 14:54:33 -070031 MathExamples.DivAsyncExample(client).Wait();
Jan Tattermuscha7608b02015-02-03 17:54:38 -080032
Jan Tattermusch2b357952015-08-20 14:54:33 -070033 MathExamples.FibExample(client).Wait();
Jan Tattermuscha7608b02015-02-03 17:54:38 -080034
Jan Tattermusch2b357952015-08-20 14:54:33 -070035 MathExamples.SumExample(client).Wait();
Jan Tattermusch8c61db92015-04-02 15:22:31 -070036
Jan Tattermusch2b357952015-08-20 14:54:33 -070037 MathExamples.DivManyExample(client).Wait();
Jan Tattermusch8c61db92015-04-02 15:22:31 -070038
Jan Tattermusch2b357952015-08-20 14:54:33 -070039 MathExamples.DependendRequestsExample(client).Wait();
Craig Tiller190d3602015-02-18 09:23:38 -080040
Jan Tattermusch2b357952015-08-20 14:54:33 -070041 channel.ShutdownAsync().Wait();
Jan Tattermusch13cd1252015-03-06 10:11:50 -080042 }
43 }
Jan Tattermuscha7608b02015-02-03 17:54:38 -080044}