From 253769e92d5ff1883c1623fd0ee130ae4ce4b380 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Mon, 21 Mar 2016 16:25:59 -0700 Subject: add ASYNC_GENERIC_SERVER support for C# --- src/csharp/Grpc.IntegrationTesting/ClientRunners.cs | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) (limited to 'src/csharp/Grpc.IntegrationTesting/ClientRunners.cs') diff --git a/src/csharp/Grpc.IntegrationTesting/ClientRunners.cs b/src/csharp/Grpc.IntegrationTesting/ClientRunners.cs index a749f4a8a3..e6dc2321c4 100644 --- a/src/csharp/Grpc.IntegrationTesting/ClientRunners.cs +++ b/src/csharp/Grpc.IntegrationTesting/ClientRunners.cs @@ -94,7 +94,7 @@ namespace Grpc.IntegrationTesting } var channel = new Channel(target, credentials, channelOptions); - return new SimpleClientRunner(channel, + return new ClientRunnerImpl(channel, config.ClientType, config.RpcType, config.PayloadConfig, @@ -102,23 +102,10 @@ namespace Grpc.IntegrationTesting } } - /// - /// Simple protobuf client. - /// - public class SimpleClientRunner : IClientRunner + public class ClientRunnerImpl : IClientRunner { const double SecondsToNanos = 1e9; - readonly static Marshaller ByteArrayMarshaller = new Marshaller((b) => b, (b) => b); - - readonly static Method StreamingCallMethod = new Method( - MethodType.DuplexStreaming, - "grpc.testing.BenchmarkService", - "StreamingCall", - ByteArrayMarshaller, - ByteArrayMarshaller - ); - readonly Channel channel; readonly ClientType clientType; readonly RpcType rpcType; @@ -130,7 +117,7 @@ namespace Grpc.IntegrationTesting readonly CancellationTokenSource stoppedCts; readonly WallClockStopwatch wallClockStopwatch = new WallClockStopwatch(); - public SimpleClientRunner(Channel channel, ClientType clientType, RpcType rpcType, PayloadConfig payloadConfig, HistogramParams histogramParams) + public ClientRunnerImpl(Channel channel, ClientType clientType, RpcType rpcType, PayloadConfig payloadConfig, HistogramParams histogramParams) { this.channel = GrpcPreconditions.CheckNotNull(channel); this.clientType = clientType; @@ -228,7 +215,7 @@ namespace Grpc.IntegrationTesting var request = CreateByteBufferRequest(); var stopwatch = new Stopwatch(); - var callDetails = new CallInvocationDetails(channel, StreamingCallMethod, new CallOptions()); + var callDetails = new CallInvocationDetails(channel, GenericService.StreamingCallMethod, new CallOptions()); using (var call = Calls.AsyncDuplexStreamingCall(callDetails)) { -- cgit v1.2.3