From d8f7c8ae0e80f787b2c1791adecf35c8b0ef9171 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Mon, 21 Mar 2016 19:02:58 -0700 Subject: migrate from client side interface to client side abstract class --- .../Grpc.IntegrationTesting/InteropClient.cs | 24 +++++++++++----------- 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'src/csharp/Grpc.IntegrationTesting/InteropClient.cs') diff --git a/src/csharp/Grpc.IntegrationTesting/InteropClient.cs b/src/csharp/Grpc.IntegrationTesting/InteropClient.cs index b0e33e49f7..9a1323a79b 100644 --- a/src/csharp/Grpc.IntegrationTesting/InteropClient.cs +++ b/src/csharp/Grpc.IntegrationTesting/InteropClient.cs @@ -217,7 +217,7 @@ namespace Grpc.IntegrationTesting } } - public static void RunEmptyUnary(TestService.ITestServiceClient client) + public static void RunEmptyUnary(TestService.TestServiceClientBase client) { Console.WriteLine("running empty_unary"); var response = client.EmptyCall(new Empty()); @@ -225,7 +225,7 @@ namespace Grpc.IntegrationTesting Console.WriteLine("Passed!"); } - public static void RunLargeUnary(TestService.ITestServiceClient client) + public static void RunLargeUnary(TestService.TestServiceClientBase client) { Console.WriteLine("running large_unary"); var request = new SimpleRequest @@ -241,7 +241,7 @@ namespace Grpc.IntegrationTesting Console.WriteLine("Passed!"); } - public static async Task RunClientStreamingAsync(TestService.ITestServiceClient client) + public static async Task RunClientStreamingAsync(TestService.TestServiceClientBase client) { Console.WriteLine("running client_streaming"); @@ -257,7 +257,7 @@ namespace Grpc.IntegrationTesting Console.WriteLine("Passed!"); } - public static async Task RunServerStreamingAsync(TestService.ITestServiceClient client) + public static async Task RunServerStreamingAsync(TestService.TestServiceClientBase client) { Console.WriteLine("running server_streaming"); @@ -281,7 +281,7 @@ namespace Grpc.IntegrationTesting Console.WriteLine("Passed!"); } - public static async Task RunPingPongAsync(TestService.ITestServiceClient client) + public static async Task RunPingPongAsync(TestService.TestServiceClientBase client) { Console.WriteLine("running ping_pong"); @@ -338,7 +338,7 @@ namespace Grpc.IntegrationTesting Console.WriteLine("Passed!"); } - public static async Task RunEmptyStreamAsync(TestService.ITestServiceClient client) + public static async Task RunEmptyStreamAsync(TestService.TestServiceClientBase client) { Console.WriteLine("running empty_stream"); using (var call = client.FullDuplexCall()) @@ -434,7 +434,7 @@ namespace Grpc.IntegrationTesting Console.WriteLine("Passed!"); } - public static async Task RunCancelAfterBeginAsync(TestService.ITestServiceClient client) + public static async Task RunCancelAfterBeginAsync(TestService.TestServiceClientBase client) { Console.WriteLine("running cancel_after_begin"); @@ -451,7 +451,7 @@ namespace Grpc.IntegrationTesting Console.WriteLine("Passed!"); } - public static async Task RunCancelAfterFirstResponseAsync(TestService.ITestServiceClient client) + public static async Task RunCancelAfterFirstResponseAsync(TestService.TestServiceClientBase client) { Console.WriteLine("running cancel_after_first_response"); @@ -477,7 +477,7 @@ namespace Grpc.IntegrationTesting Console.WriteLine("Passed!"); } - public static async Task RunTimeoutOnSleepingServerAsync(TestService.ITestServiceClient client) + public static async Task RunTimeoutOnSleepingServerAsync(TestService.TestServiceClientBase client) { Console.WriteLine("running timeout_on_sleeping_server"); @@ -499,7 +499,7 @@ namespace Grpc.IntegrationTesting Console.WriteLine("Passed!"); } - public static async Task RunCustomMetadataAsync(TestService.ITestServiceClient client) + public static async Task RunCustomMetadataAsync(TestService.TestServiceClientBase client) { Console.WriteLine("running custom_metadata"); { @@ -546,7 +546,7 @@ namespace Grpc.IntegrationTesting Console.WriteLine("Passed!"); } - public static async Task RunStatusCodeAndMessageAsync(TestService.ITestServiceClient client) + public static async Task RunStatusCodeAndMessageAsync(TestService.TestServiceClientBase client) { Console.WriteLine("running status_code_and_message"); var echoStatus = new EchoStatus @@ -580,7 +580,7 @@ namespace Grpc.IntegrationTesting Console.WriteLine("Passed!"); } - public static void RunUnimplementedMethod(UnimplementedService.IUnimplementedServiceClient client) + public static void RunUnimplementedMethod(UnimplementedService.UnimplementedServiceClientBase client) { Console.WriteLine("running unimplemented_method"); var e = Assert.Throws(() => client.UnimplementedCall(new Empty())); -- cgit v1.2.3 From 809148d6c5702a6a5a35d175ccb39c447acf9204 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Tue, 22 Mar 2016 15:09:41 -0700 Subject: migrate code to single client-side class --- src/csharp/Grpc.Examples.MathClient/MathClient.cs | 2 +- src/csharp/Grpc.Examples/MathExamples.cs | 12 +++++------ .../HealthClientServerTest.cs | 2 +- .../Grpc.IntegrationTesting/ClientRunners.cs | 2 +- .../Grpc.IntegrationTesting/InteropClient.cs | 24 +++++++++++----------- .../InteropClientServerTest.cs | 2 +- .../Grpc.IntegrationTesting/SslCredentialsTest.cs | 2 +- 7 files changed, 23 insertions(+), 23 deletions(-) (limited to 'src/csharp/Grpc.IntegrationTesting/InteropClient.cs') diff --git a/src/csharp/Grpc.Examples.MathClient/MathClient.cs b/src/csharp/Grpc.Examples.MathClient/MathClient.cs index 3bea38fe98..2f3ef85b4d 100644 --- a/src/csharp/Grpc.Examples.MathClient/MathClient.cs +++ b/src/csharp/Grpc.Examples.MathClient/MathClient.cs @@ -40,7 +40,7 @@ namespace Math public static void Main(string[] args) { var channel = new Channel("127.0.0.1", 23456, ChannelCredentials.Insecure); - Math.MathClientBase client = new Math.MathClient(channel); + Math.MathClient client = new Math.MathClient(channel); MathExamples.DivExample(client); MathExamples.DivAsyncExample(client).Wait(); diff --git a/src/csharp/Grpc.Examples/MathExamples.cs b/src/csharp/Grpc.Examples/MathExamples.cs index 4ba1f71f78..95417d9034 100644 --- a/src/csharp/Grpc.Examples/MathExamples.cs +++ b/src/csharp/Grpc.Examples/MathExamples.cs @@ -38,19 +38,19 @@ namespace Math { public static class MathExamples { - public static void DivExample(Math.MathClientBase client) + public static void DivExample(Math.MathClient client) { DivReply result = client.Div(new DivArgs { Dividend = 10, Divisor = 3 }); Console.WriteLine("Div Result: " + result); } - public static async Task DivAsyncExample(Math.MathClientBase client) + public static async Task DivAsyncExample(Math.MathClient client) { DivReply result = await client.DivAsync(new DivArgs { Dividend = 4, Divisor = 5 }); Console.WriteLine("DivAsync Result: " + result); } - public static async Task FibExample(Math.MathClientBase client) + public static async Task FibExample(Math.MathClient client) { using (var call = client.Fib(new FibArgs { Limit = 5 })) { @@ -59,7 +59,7 @@ namespace Math } } - public static async Task SumExample(Math.MathClientBase client) + public static async Task SumExample(Math.MathClient client) { var numbers = new List { @@ -75,7 +75,7 @@ namespace Math } } - public static async Task DivManyExample(Math.MathClientBase client) + public static async Task DivManyExample(Math.MathClient client) { var divArgsList = new List { @@ -90,7 +90,7 @@ namespace Math } } - public static async Task DependendRequestsExample(Math.MathClientBase client) + public static async Task DependendRequestsExample(Math.MathClient client) { var numbers = new List { diff --git a/src/csharp/Grpc.HealthCheck.Tests/HealthClientServerTest.cs b/src/csharp/Grpc.HealthCheck.Tests/HealthClientServerTest.cs index d85f1cf8bb..fb292945a6 100644 --- a/src/csharp/Grpc.HealthCheck.Tests/HealthClientServerTest.cs +++ b/src/csharp/Grpc.HealthCheck.Tests/HealthClientServerTest.cs @@ -49,7 +49,7 @@ namespace Grpc.HealthCheck.Tests const string Host = "localhost"; Server server; Channel channel; - Grpc.Health.V1.Health.HealthClientBase client; + Grpc.Health.V1.Health.HealthClient client; Grpc.HealthCheck.HealthServiceImpl serviceImpl; [TestFixtureSetUp] diff --git a/src/csharp/Grpc.IntegrationTesting/ClientRunners.cs b/src/csharp/Grpc.IntegrationTesting/ClientRunners.cs index 302094ef8d..0bcacf76e5 100644 --- a/src/csharp/Grpc.IntegrationTesting/ClientRunners.cs +++ b/src/csharp/Grpc.IntegrationTesting/ClientRunners.cs @@ -112,7 +112,7 @@ namespace Grpc.IntegrationTesting readonly PayloadConfig payloadConfig; readonly Histogram histogram; - readonly BenchmarkService.BenchmarkServiceClientBase client; + readonly BenchmarkService.BenchmarkServiceClient client; readonly Task runnerTask; readonly CancellationTokenSource stoppedCts; readonly WallClockStopwatch wallClockStopwatch = new WallClockStopwatch(); diff --git a/src/csharp/Grpc.IntegrationTesting/InteropClient.cs b/src/csharp/Grpc.IntegrationTesting/InteropClient.cs index 9a1323a79b..ec001ffaa4 100644 --- a/src/csharp/Grpc.IntegrationTesting/InteropClient.cs +++ b/src/csharp/Grpc.IntegrationTesting/InteropClient.cs @@ -217,7 +217,7 @@ namespace Grpc.IntegrationTesting } } - public static void RunEmptyUnary(TestService.TestServiceClientBase client) + public static void RunEmptyUnary(TestService.TestServiceClient client) { Console.WriteLine("running empty_unary"); var response = client.EmptyCall(new Empty()); @@ -225,7 +225,7 @@ namespace Grpc.IntegrationTesting Console.WriteLine("Passed!"); } - public static void RunLargeUnary(TestService.TestServiceClientBase client) + public static void RunLargeUnary(TestService.TestServiceClient client) { Console.WriteLine("running large_unary"); var request = new SimpleRequest @@ -241,7 +241,7 @@ namespace Grpc.IntegrationTesting Console.WriteLine("Passed!"); } - public static async Task RunClientStreamingAsync(TestService.TestServiceClientBase client) + public static async Task RunClientStreamingAsync(TestService.TestServiceClient client) { Console.WriteLine("running client_streaming"); @@ -257,7 +257,7 @@ namespace Grpc.IntegrationTesting Console.WriteLine("Passed!"); } - public static async Task RunServerStreamingAsync(TestService.TestServiceClientBase client) + public static async Task RunServerStreamingAsync(TestService.TestServiceClient client) { Console.WriteLine("running server_streaming"); @@ -281,7 +281,7 @@ namespace Grpc.IntegrationTesting Console.WriteLine("Passed!"); } - public static async Task RunPingPongAsync(TestService.TestServiceClientBase client) + public static async Task RunPingPongAsync(TestService.TestServiceClient client) { Console.WriteLine("running ping_pong"); @@ -338,7 +338,7 @@ namespace Grpc.IntegrationTesting Console.WriteLine("Passed!"); } - public static async Task RunEmptyStreamAsync(TestService.TestServiceClientBase client) + public static async Task RunEmptyStreamAsync(TestService.TestServiceClient client) { Console.WriteLine("running empty_stream"); using (var call = client.FullDuplexCall()) @@ -434,7 +434,7 @@ namespace Grpc.IntegrationTesting Console.WriteLine("Passed!"); } - public static async Task RunCancelAfterBeginAsync(TestService.TestServiceClientBase client) + public static async Task RunCancelAfterBeginAsync(TestService.TestServiceClient client) { Console.WriteLine("running cancel_after_begin"); @@ -451,7 +451,7 @@ namespace Grpc.IntegrationTesting Console.WriteLine("Passed!"); } - public static async Task RunCancelAfterFirstResponseAsync(TestService.TestServiceClientBase client) + public static async Task RunCancelAfterFirstResponseAsync(TestService.TestServiceClient client) { Console.WriteLine("running cancel_after_first_response"); @@ -477,7 +477,7 @@ namespace Grpc.IntegrationTesting Console.WriteLine("Passed!"); } - public static async Task RunTimeoutOnSleepingServerAsync(TestService.TestServiceClientBase client) + public static async Task RunTimeoutOnSleepingServerAsync(TestService.TestServiceClient client) { Console.WriteLine("running timeout_on_sleeping_server"); @@ -499,7 +499,7 @@ namespace Grpc.IntegrationTesting Console.WriteLine("Passed!"); } - public static async Task RunCustomMetadataAsync(TestService.TestServiceClientBase client) + public static async Task RunCustomMetadataAsync(TestService.TestServiceClient client) { Console.WriteLine("running custom_metadata"); { @@ -546,7 +546,7 @@ namespace Grpc.IntegrationTesting Console.WriteLine("Passed!"); } - public static async Task RunStatusCodeAndMessageAsync(TestService.TestServiceClientBase client) + public static async Task RunStatusCodeAndMessageAsync(TestService.TestServiceClient client) { Console.WriteLine("running status_code_and_message"); var echoStatus = new EchoStatus @@ -580,7 +580,7 @@ namespace Grpc.IntegrationTesting Console.WriteLine("Passed!"); } - public static void RunUnimplementedMethod(UnimplementedService.UnimplementedServiceClientBase client) + public static void RunUnimplementedMethod(UnimplementedService.UnimplementedServiceClient client) { Console.WriteLine("running unimplemented_method"); var e = Assert.Throws(() => client.UnimplementedCall(new Empty())); diff --git a/src/csharp/Grpc.IntegrationTesting/InteropClientServerTest.cs b/src/csharp/Grpc.IntegrationTesting/InteropClientServerTest.cs index 41efa33017..4ee1ff5ec8 100644 --- a/src/csharp/Grpc.IntegrationTesting/InteropClientServerTest.cs +++ b/src/csharp/Grpc.IntegrationTesting/InteropClientServerTest.cs @@ -51,7 +51,7 @@ namespace Grpc.IntegrationTesting const string Host = "localhost"; Server server; Channel channel; - TestService.TestServiceClientBase client; + TestService.TestServiceClient client; [TestFixtureSetUp] public void Init() diff --git a/src/csharp/Grpc.IntegrationTesting/SslCredentialsTest.cs b/src/csharp/Grpc.IntegrationTesting/SslCredentialsTest.cs index ed402c5f77..c7792f75f3 100644 --- a/src/csharp/Grpc.IntegrationTesting/SslCredentialsTest.cs +++ b/src/csharp/Grpc.IntegrationTesting/SslCredentialsTest.cs @@ -53,7 +53,7 @@ namespace Grpc.IntegrationTesting const string Host = "localhost"; Server server; Channel channel; - TestService.TestServiceClientBase client; + TestService.TestServiceClient client; [TestFixtureSetUp] public void Init() -- cgit v1.2.3 From acb842c205dc8e2feecba7e150fa39071db7c894 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Fri, 25 Mar 2016 16:54:14 -0700 Subject: fix copyrights --- src/csharp/Grpc.Core/CallInvoker.cs | 2 +- src/csharp/Grpc.Core/ClientBase.cs | 2 +- src/csharp/Grpc.Core/DefaultCallInvoker.cs | 2 +- src/csharp/Grpc.Core/Internal/InterceptingCallInvoker.cs | 2 +- src/csharp/Grpc.Core/Internal/UnimplementedCallInvoker.cs | 2 +- src/csharp/Grpc.Examples.MathClient/MathClient.cs | 2 +- src/csharp/Grpc.Examples/MathExamples.cs | 2 +- src/csharp/Grpc.IntegrationTesting/InteropClient.cs | 2 +- src/csharp/Grpc.IntegrationTesting/MetadataCredentialsTest.cs | 2 +- src/csharp/Grpc.IntegrationTesting/SslCredentialsTest.cs | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) (limited to 'src/csharp/Grpc.IntegrationTesting/InteropClient.cs') diff --git a/src/csharp/Grpc.Core/CallInvoker.cs b/src/csharp/Grpc.Core/CallInvoker.cs index cec5255692..39199b1fd5 100644 --- a/src/csharp/Grpc.Core/CallInvoker.cs +++ b/src/csharp/Grpc.Core/CallInvoker.cs @@ -1,6 +1,6 @@ #region Copyright notice and license -// Copyright 2015, Google Inc. +// Copyright 2015-2016, Google Inc. // All rights reserved. // // Redistribution and use in source and binary forms, with or without diff --git a/src/csharp/Grpc.Core/ClientBase.cs b/src/csharp/Grpc.Core/ClientBase.cs index e2e47893cc..5517233e3c 100644 --- a/src/csharp/Grpc.Core/ClientBase.cs +++ b/src/csharp/Grpc.Core/ClientBase.cs @@ -1,6 +1,6 @@ #region Copyright notice and license -// Copyright 2015, Google Inc. +// Copyright 2015-2016, Google Inc. // All rights reserved. // // Redistribution and use in source and binary forms, with or without diff --git a/src/csharp/Grpc.Core/DefaultCallInvoker.cs b/src/csharp/Grpc.Core/DefaultCallInvoker.cs index 912cbaa604..1a99e41153 100644 --- a/src/csharp/Grpc.Core/DefaultCallInvoker.cs +++ b/src/csharp/Grpc.Core/DefaultCallInvoker.cs @@ -1,6 +1,6 @@ #region Copyright notice and license -// Copyright 2015, Google Inc. +// Copyright 2015-2016, Google Inc. // All rights reserved. // // Redistribution and use in source and binary forms, with or without diff --git a/src/csharp/Grpc.Core/Internal/InterceptingCallInvoker.cs b/src/csharp/Grpc.Core/Internal/InterceptingCallInvoker.cs index 53569760ac..ef48dc7121 100644 --- a/src/csharp/Grpc.Core/Internal/InterceptingCallInvoker.cs +++ b/src/csharp/Grpc.Core/Internal/InterceptingCallInvoker.cs @@ -1,6 +1,6 @@ #region Copyright notice and license -// Copyright 2015, Google Inc. +// Copyright 2015-2016, Google Inc. // All rights reserved. // // Redistribution and use in source and binary forms, with or without diff --git a/src/csharp/Grpc.Core/Internal/UnimplementedCallInvoker.cs b/src/csharp/Grpc.Core/Internal/UnimplementedCallInvoker.cs index c8f2a1ee7e..0c7340873b 100644 --- a/src/csharp/Grpc.Core/Internal/UnimplementedCallInvoker.cs +++ b/src/csharp/Grpc.Core/Internal/UnimplementedCallInvoker.cs @@ -1,6 +1,6 @@ #region Copyright notice and license -// Copyright 2015, Google Inc. +// Copyright 2015-2016, Google Inc. // All rights reserved. // // Redistribution and use in source and binary forms, with or without diff --git a/src/csharp/Grpc.Examples.MathClient/MathClient.cs b/src/csharp/Grpc.Examples.MathClient/MathClient.cs index 2f3ef85b4d..aadef6833d 100644 --- a/src/csharp/Grpc.Examples.MathClient/MathClient.cs +++ b/src/csharp/Grpc.Examples.MathClient/MathClient.cs @@ -1,5 +1,5 @@ #region Copyright notice and license -// Copyright 2015, Google Inc. +// Copyright 2015-2016, Google Inc. // All rights reserved. // // Redistribution and use in source and binary forms, with or without diff --git a/src/csharp/Grpc.Examples/MathExamples.cs b/src/csharp/Grpc.Examples/MathExamples.cs index 95417d9034..6075420974 100644 --- a/src/csharp/Grpc.Examples/MathExamples.cs +++ b/src/csharp/Grpc.Examples/MathExamples.cs @@ -1,5 +1,5 @@ #region Copyright notice and license -// Copyright 2015, Google Inc. +// Copyright 2015-2016, Google Inc. // All rights reserved. // // Redistribution and use in source and binary forms, with or without diff --git a/src/csharp/Grpc.IntegrationTesting/InteropClient.cs b/src/csharp/Grpc.IntegrationTesting/InteropClient.cs index ec001ffaa4..7ca5221936 100644 --- a/src/csharp/Grpc.IntegrationTesting/InteropClient.cs +++ b/src/csharp/Grpc.IntegrationTesting/InteropClient.cs @@ -1,6 +1,6 @@ #region Copyright notice and license -// Copyright 2015, Google Inc. +// Copyright 2015-2016, Google Inc. // All rights reserved. // // Redistribution and use in source and binary forms, with or without diff --git a/src/csharp/Grpc.IntegrationTesting/MetadataCredentialsTest.cs b/src/csharp/Grpc.IntegrationTesting/MetadataCredentialsTest.cs index eb4079e3a5..f95af5008f 100644 --- a/src/csharp/Grpc.IntegrationTesting/MetadataCredentialsTest.cs +++ b/src/csharp/Grpc.IntegrationTesting/MetadataCredentialsTest.cs @@ -1,6 +1,6 @@ #region Copyright notice and license -// Copyright 2015, Google Inc. +// Copyright 2015-2016, Google Inc. // All rights reserved. // // Redistribution and use in source and binary forms, with or without diff --git a/src/csharp/Grpc.IntegrationTesting/SslCredentialsTest.cs b/src/csharp/Grpc.IntegrationTesting/SslCredentialsTest.cs index c7792f75f3..3df45b5f70 100644 --- a/src/csharp/Grpc.IntegrationTesting/SslCredentialsTest.cs +++ b/src/csharp/Grpc.IntegrationTesting/SslCredentialsTest.cs @@ -1,6 +1,6 @@ #region Copyright notice and license -// Copyright 2015, Google Inc. +// Copyright 2015-2016, Google Inc. // All rights reserved. // // Redistribution and use in source and binary forms, with or without -- cgit v1.2.3