Index: third_party/grpc/src/csharp/Grpc.Examples.MathClient/MathClient.cs |
diff --git a/third_party/protobuf/csharp/src/Google.Protobuf.Test/SampleEnum.cs b/third_party/grpc/src/csharp/Grpc.Examples.MathClient/MathClient.cs |
similarity index 66% |
copy from third_party/protobuf/csharp/src/Google.Protobuf.Test/SampleEnum.cs |
copy to third_party/grpc/src/csharp/Grpc.Examples.MathClient/MathClient.cs |
index 77447afa127340046298081d9bfca4dd51c14f6c..64e429ed5a32001bf89b10172ad73c40adb79ad0 100644 |
--- a/third_party/protobuf/csharp/src/Google.Protobuf.Test/SampleEnum.cs |
+++ b/third_party/grpc/src/csharp/Grpc.Examples.MathClient/MathClient.cs |
@@ -1,7 +1,6 @@ |
#region Copyright notice and license |
-// Protocol Buffers - Google's data interchange format |
-// Copyright 2015 Google Inc. All rights reserved. |
-// https://developers.google.com/protocol-buffers/ |
+// Copyright 2015, Google Inc. |
+// All rights reserved. |
// |
// Redistribution and use in source and binary forms, with or without |
// modification, are permitted provided that the following conditions are |
@@ -29,14 +28,32 @@ |
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
#endregion |
- |
-namespace Google.Protobuf |
+using System; |
+using System.Runtime.InteropServices; |
+using System.Threading; |
+using Grpc.Core; |
+ |
+namespace Math |
{ |
- // Just a sample enum with positive and negative values to be used in tests. |
- internal enum SampleEnum |
+ class MathClient |
{ |
- NegativeValue = -2, |
- None = 0, |
- PositiveValue = 3 |
+ public static void Main(string[] args) |
+ { |
+ var channel = new Channel("127.0.0.1", 23456, ChannelCredentials.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(); |
+ } |
} |
} |