blob: 61f2ed4015a0234a2c47b2621906b9c5d447b44d [file] [log] [blame]
Jan Tattermusch7eb3a762015-05-07 14:26:13 -07001// Generated by the protocol buffer compiler. DO NOT EDIT!
Jan Tattermusch72ce4422016-01-20 13:54:38 -08002// source: src/proto/grpc/testing/test.proto
Jan Tattermuschbfee01d2016-04-28 10:52:41 -07003// Original file comments:
4// Copyright 2015-2016, Google Inc.
5// All rights reserved.
6//
7// Redistribution and use in source and binary forms, with or without
8// modification, are permitted provided that the following conditions are
9// met:
10//
11// * Redistributions of source code must retain the above copyright
12// notice, this list of conditions and the following disclaimer.
13// * Redistributions in binary form must reproduce the above
14// copyright notice, this list of conditions and the following disclaimer
15// in the documentation and/or other materials provided with the
16// distribution.
17// * Neither the name of Google Inc. nor the names of its
18// contributors may be used to endorse or promote products derived from
19// this software without specific prior written permission.
20//
21// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
25// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
27// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32//
33// An integration test service that covers all the method signature permutations
34// of unary/streaming requests/responses.
35//
Jan Tattermusch7eb3a762015-05-07 14:26:13 -070036#region Designer generated code
37
38using System;
39using System.Threading;
40using System.Threading.Tasks;
41using Grpc.Core;
42
Jan Tattermusch5c42d8d2015-08-03 08:14:30 -070043namespace Grpc.Testing {
Jan Tattermuschbfee01d2016-04-28 10:52:41 -070044 /// <summary>
45 /// A simple service to test the various types of RPCs and experiment with
46 /// performance with various types of payload.
47 /// </summary>
Jan Tattermusch7eb3a762015-05-07 14:26:13 -070048 public static class TestService
49 {
50 static readonly string __ServiceName = "grpc.testing.TestService";
51
Jan Tattermusch475f75a2015-08-03 09:46:04 -070052 static readonly Marshaller<global::Grpc.Testing.Empty> __Marshaller_Empty = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.Empty.Parser.ParseFrom);
53 static readonly Marshaller<global::Grpc.Testing.SimpleRequest> __Marshaller_SimpleRequest = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.SimpleRequest.Parser.ParseFrom);
54 static readonly Marshaller<global::Grpc.Testing.SimpleResponse> __Marshaller_SimpleResponse = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.SimpleResponse.Parser.ParseFrom);
55 static readonly Marshaller<global::Grpc.Testing.StreamingOutputCallRequest> __Marshaller_StreamingOutputCallRequest = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.StreamingOutputCallRequest.Parser.ParseFrom);
56 static readonly Marshaller<global::Grpc.Testing.StreamingOutputCallResponse> __Marshaller_StreamingOutputCallResponse = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.StreamingOutputCallResponse.Parser.ParseFrom);
57 static readonly Marshaller<global::Grpc.Testing.StreamingInputCallRequest> __Marshaller_StreamingInputCallRequest = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.StreamingInputCallRequest.Parser.ParseFrom);
58 static readonly Marshaller<global::Grpc.Testing.StreamingInputCallResponse> __Marshaller_StreamingInputCallResponse = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.StreamingInputCallResponse.Parser.ParseFrom);
Jan Tattermusch7eb3a762015-05-07 14:26:13 -070059
Jan Tattermusch5c42d8d2015-08-03 08:14:30 -070060 static readonly Method<global::Grpc.Testing.Empty, global::Grpc.Testing.Empty> __Method_EmptyCall = new Method<global::Grpc.Testing.Empty, global::Grpc.Testing.Empty>(
Jan Tattermusch7eb3a762015-05-07 14:26:13 -070061 MethodType.Unary,
Jan Tattermuschcc97fed2015-08-05 00:44:29 -070062 __ServiceName,
Jan Tattermusch7eb3a762015-05-07 14:26:13 -070063 "EmptyCall",
64 __Marshaller_Empty,
65 __Marshaller_Empty);
66
Jan Tattermusch5c42d8d2015-08-03 08:14:30 -070067 static readonly Method<global::Grpc.Testing.SimpleRequest, global::Grpc.Testing.SimpleResponse> __Method_UnaryCall = new Method<global::Grpc.Testing.SimpleRequest, global::Grpc.Testing.SimpleResponse>(
Jan Tattermusch7eb3a762015-05-07 14:26:13 -070068 MethodType.Unary,
Jan Tattermuschcc97fed2015-08-05 00:44:29 -070069 __ServiceName,
Jan Tattermusch7eb3a762015-05-07 14:26:13 -070070 "UnaryCall",
71 __Marshaller_SimpleRequest,
72 __Marshaller_SimpleResponse);
73
Jan Tattermusch5c42d8d2015-08-03 08:14:30 -070074 static readonly Method<global::Grpc.Testing.StreamingOutputCallRequest, global::Grpc.Testing.StreamingOutputCallResponse> __Method_StreamingOutputCall = new Method<global::Grpc.Testing.StreamingOutputCallRequest, global::Grpc.Testing.StreamingOutputCallResponse>(
Jan Tattermusch7eb3a762015-05-07 14:26:13 -070075 MethodType.ServerStreaming,
Jan Tattermuschcc97fed2015-08-05 00:44:29 -070076 __ServiceName,
Jan Tattermusch7eb3a762015-05-07 14:26:13 -070077 "StreamingOutputCall",
78 __Marshaller_StreamingOutputCallRequest,
79 __Marshaller_StreamingOutputCallResponse);
80
Jan Tattermusch5c42d8d2015-08-03 08:14:30 -070081 static readonly Method<global::Grpc.Testing.StreamingInputCallRequest, global::Grpc.Testing.StreamingInputCallResponse> __Method_StreamingInputCall = new Method<global::Grpc.Testing.StreamingInputCallRequest, global::Grpc.Testing.StreamingInputCallResponse>(
Jan Tattermusch7eb3a762015-05-07 14:26:13 -070082 MethodType.ClientStreaming,
Jan Tattermuschcc97fed2015-08-05 00:44:29 -070083 __ServiceName,
Jan Tattermusch7eb3a762015-05-07 14:26:13 -070084 "StreamingInputCall",
85 __Marshaller_StreamingInputCallRequest,
86 __Marshaller_StreamingInputCallResponse);
87
Jan Tattermusch5c42d8d2015-08-03 08:14:30 -070088 static readonly Method<global::Grpc.Testing.StreamingOutputCallRequest, global::Grpc.Testing.StreamingOutputCallResponse> __Method_FullDuplexCall = new Method<global::Grpc.Testing.StreamingOutputCallRequest, global::Grpc.Testing.StreamingOutputCallResponse>(
Jan Tattermusch7eb3a762015-05-07 14:26:13 -070089 MethodType.DuplexStreaming,
Jan Tattermuschcc97fed2015-08-05 00:44:29 -070090 __ServiceName,
Jan Tattermusch7eb3a762015-05-07 14:26:13 -070091 "FullDuplexCall",
92 __Marshaller_StreamingOutputCallRequest,
93 __Marshaller_StreamingOutputCallResponse);
94
Jan Tattermusch5c42d8d2015-08-03 08:14:30 -070095 static readonly Method<global::Grpc.Testing.StreamingOutputCallRequest, global::Grpc.Testing.StreamingOutputCallResponse> __Method_HalfDuplexCall = new Method<global::Grpc.Testing.StreamingOutputCallRequest, global::Grpc.Testing.StreamingOutputCallResponse>(
Jan Tattermusch7eb3a762015-05-07 14:26:13 -070096 MethodType.DuplexStreaming,
Jan Tattermuschcc97fed2015-08-05 00:44:29 -070097 __ServiceName,
Jan Tattermusch7eb3a762015-05-07 14:26:13 -070098 "HalfDuplexCall",
99 __Marshaller_StreamingOutputCallRequest,
100 __Marshaller_StreamingOutputCallResponse);
101
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700102 /// <summary>Service descriptor</summary>
Jan Tattermusche6af5d12015-08-03 10:57:43 -0700103 public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor
104 {
Jan Tattermusch72ce4422016-01-20 13:54:38 -0800105 get { return global::Grpc.Testing.TestReflection.Descriptor.Services[0]; }
Jan Tattermusche6af5d12015-08-03 10:57:43 -0700106 }
107
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700108 /// <summary>Base class for server-side implementations of TestService</summary>
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700109 public abstract class TestServiceBase
110 {
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700111 /// <summary>
112 /// One empty request followed by one empty response.
113 /// </summary>
Jan Tattermuschd83f7912016-05-09 10:28:10 -0700114 public virtual global::System.Threading.Tasks.Task<global::Grpc.Testing.Empty> EmptyCall(global::Grpc.Testing.Empty request, ServerCallContext context)
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700115 {
116 throw new RpcException(new Status(StatusCode.Unimplemented, ""));
117 }
118
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700119 /// <summary>
120 /// One request followed by one response.
121 /// </summary>
Jan Tattermuschd83f7912016-05-09 10:28:10 -0700122 public virtual global::System.Threading.Tasks.Task<global::Grpc.Testing.SimpleResponse> UnaryCall(global::Grpc.Testing.SimpleRequest request, ServerCallContext context)
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700123 {
124 throw new RpcException(new Status(StatusCode.Unimplemented, ""));
125 }
126
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700127 /// <summary>
128 /// One request followed by a sequence of responses (streamed download).
129 /// The server returns the payload with client desired type and sizes.
130 /// </summary>
Jan Tattermuschd83f7912016-05-09 10:28:10 -0700131 public virtual global::System.Threading.Tasks.Task StreamingOutputCall(global::Grpc.Testing.StreamingOutputCallRequest request, IServerStreamWriter<global::Grpc.Testing.StreamingOutputCallResponse> responseStream, ServerCallContext context)
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700132 {
133 throw new RpcException(new Status(StatusCode.Unimplemented, ""));
134 }
135
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700136 /// <summary>
137 /// A sequence of requests followed by one response (streamed upload).
138 /// The server returns the aggregated size of client payload as the result.
139 /// </summary>
Jan Tattermuschd83f7912016-05-09 10:28:10 -0700140 public virtual global::System.Threading.Tasks.Task<global::Grpc.Testing.StreamingInputCallResponse> StreamingInputCall(IAsyncStreamReader<global::Grpc.Testing.StreamingInputCallRequest> requestStream, ServerCallContext context)
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700141 {
142 throw new RpcException(new Status(StatusCode.Unimplemented, ""));
143 }
144
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700145 /// <summary>
146 /// A sequence of requests with each request served by the server immediately.
147 /// As one request could lead to multiple responses, this interface
148 /// demonstrates the idea of full duplexing.
149 /// </summary>
Jan Tattermuschd83f7912016-05-09 10:28:10 -0700150 public virtual global::System.Threading.Tasks.Task FullDuplexCall(IAsyncStreamReader<global::Grpc.Testing.StreamingOutputCallRequest> requestStream, IServerStreamWriter<global::Grpc.Testing.StreamingOutputCallResponse> responseStream, ServerCallContext context)
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700151 {
152 throw new RpcException(new Status(StatusCode.Unimplemented, ""));
153 }
154
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700155 /// <summary>
156 /// A sequence of requests followed by a sequence of responses.
157 /// The server buffers all the client requests and then serves them in order. A
158 /// stream of responses are returned to the client when the server starts with
159 /// first request.
160 /// </summary>
Jan Tattermuschd83f7912016-05-09 10:28:10 -0700161 public virtual global::System.Threading.Tasks.Task HalfDuplexCall(IAsyncStreamReader<global::Grpc.Testing.StreamingOutputCallRequest> requestStream, IServerStreamWriter<global::Grpc.Testing.StreamingOutputCallResponse> responseStream, ServerCallContext context)
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700162 {
163 throw new RpcException(new Status(StatusCode.Unimplemented, ""));
164 }
165
166 }
167
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700168 /// <summary>Client for TestService</summary>
Jan Tattermuschfcc8d972016-06-06 09:44:02 -0700169 public class TestServiceClient : ClientBase<TestServiceClient>
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700170 {
Jan Tattermusched6ea4c2016-06-22 12:38:44 -0700171 /// <summary>Creates a new client for TestService</summary>
172 /// <param name="channel">The channel to use to make remote calls.</param>
Jan Tattermuschb5332812015-07-14 19:29:35 -0700173 public TestServiceClient(Channel channel) : base(channel)
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700174 {
175 }
Jan Tattermusched6ea4c2016-06-22 12:38:44 -0700176 /// <summary>Creates a new client for TestService that uses a custom <c>CallInvoker</c>.</summary>
177 /// <param name="callInvoker">The callInvoker to use to make remote calls.</param>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700178 public TestServiceClient(CallInvoker callInvoker) : base(callInvoker)
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700179 {
Jan Tattermuschcc97fed2015-08-05 00:44:29 -0700180 }
Jan Tattermusched6ea4c2016-06-22 12:38:44 -0700181 /// <summary>Protected parameterless constructor to allow creation of test doubles.</summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700182 protected TestServiceClient() : base()
Jan Tattermuschcc97fed2015-08-05 00:44:29 -0700183 {
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700184 }
Jan Tattermusched6ea4c2016-06-22 12:38:44 -0700185 /// <summary>Protected constructor to allow creation of configured clients.</summary>
186 /// <param name="configuration">The client configuration.</param>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700187 protected TestServiceClient(ClientBaseConfiguration configuration) : base(configuration)
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700188 {
Jan Tattermuschcc97fed2015-08-05 00:44:29 -0700189 }
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700190
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700191 /// <summary>
192 /// One empty request followed by one empty response.
193 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700194 public virtual global::Grpc.Testing.Empty EmptyCall(global::Grpc.Testing.Empty request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
Jan Tattermuschcc97fed2015-08-05 00:44:29 -0700195 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700196 return EmptyCall(request, new CallOptions(headers, deadline, cancellationToken));
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700197 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700198 /// <summary>
199 /// One empty request followed by one empty response.
200 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700201 public virtual global::Grpc.Testing.Empty EmptyCall(global::Grpc.Testing.Empty request, CallOptions options)
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700202 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700203 return CallInvoker.BlockingUnaryCall(__Method_EmptyCall, null, options, request);
Jan Tattermuschcc97fed2015-08-05 00:44:29 -0700204 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700205 /// <summary>
206 /// One empty request followed by one empty response.
207 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700208 public virtual AsyncUnaryCall<global::Grpc.Testing.Empty> EmptyCallAsync(global::Grpc.Testing.Empty request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
Jan Tattermuschcc97fed2015-08-05 00:44:29 -0700209 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700210 return EmptyCallAsync(request, new CallOptions(headers, deadline, cancellationToken));
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700211 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700212 /// <summary>
213 /// One empty request followed by one empty response.
214 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700215 public virtual AsyncUnaryCall<global::Grpc.Testing.Empty> EmptyCallAsync(global::Grpc.Testing.Empty request, CallOptions options)
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700216 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700217 return CallInvoker.AsyncUnaryCall(__Method_EmptyCall, null, options, request);
Jan Tattermuschcc97fed2015-08-05 00:44:29 -0700218 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700219 /// <summary>
220 /// One request followed by one response.
221 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700222 public virtual global::Grpc.Testing.SimpleResponse UnaryCall(global::Grpc.Testing.SimpleRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
Jan Tattermuschcc97fed2015-08-05 00:44:29 -0700223 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700224 return UnaryCall(request, new CallOptions(headers, deadline, cancellationToken));
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700225 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700226 /// <summary>
227 /// One request followed by one response.
228 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700229 public virtual global::Grpc.Testing.SimpleResponse UnaryCall(global::Grpc.Testing.SimpleRequest request, CallOptions options)
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700230 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700231 return CallInvoker.BlockingUnaryCall(__Method_UnaryCall, null, options, request);
Jan Tattermuschcc97fed2015-08-05 00:44:29 -0700232 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700233 /// <summary>
234 /// One request followed by one response.
235 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700236 public virtual AsyncUnaryCall<global::Grpc.Testing.SimpleResponse> UnaryCallAsync(global::Grpc.Testing.SimpleRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
Jan Tattermuschcc97fed2015-08-05 00:44:29 -0700237 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700238 return UnaryCallAsync(request, new CallOptions(headers, deadline, cancellationToken));
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700239 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700240 /// <summary>
241 /// One request followed by one response.
242 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700243 public virtual AsyncUnaryCall<global::Grpc.Testing.SimpleResponse> UnaryCallAsync(global::Grpc.Testing.SimpleRequest request, CallOptions options)
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700244 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700245 return CallInvoker.AsyncUnaryCall(__Method_UnaryCall, null, options, request);
Jan Tattermuschcc97fed2015-08-05 00:44:29 -0700246 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700247 /// <summary>
248 /// One request followed by a sequence of responses (streamed download).
249 /// The server returns the payload with client desired type and sizes.
250 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700251 public virtual AsyncServerStreamingCall<global::Grpc.Testing.StreamingOutputCallResponse> StreamingOutputCall(global::Grpc.Testing.StreamingOutputCallRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
Jan Tattermuschcc97fed2015-08-05 00:44:29 -0700252 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700253 return StreamingOutputCall(request, new CallOptions(headers, deadline, cancellationToken));
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700254 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700255 /// <summary>
256 /// One request followed by a sequence of responses (streamed download).
257 /// The server returns the payload with client desired type and sizes.
258 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700259 public virtual AsyncServerStreamingCall<global::Grpc.Testing.StreamingOutputCallResponse> StreamingOutputCall(global::Grpc.Testing.StreamingOutputCallRequest request, CallOptions options)
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700260 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700261 return CallInvoker.AsyncServerStreamingCall(__Method_StreamingOutputCall, null, options, request);
Jan Tattermuschcc97fed2015-08-05 00:44:29 -0700262 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700263 /// <summary>
264 /// A sequence of requests followed by one response (streamed upload).
265 /// The server returns the aggregated size of client payload as the result.
266 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700267 public virtual AsyncClientStreamingCall<global::Grpc.Testing.StreamingInputCallRequest, global::Grpc.Testing.StreamingInputCallResponse> StreamingInputCall(Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
Jan Tattermuschcc97fed2015-08-05 00:44:29 -0700268 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700269 return StreamingInputCall(new CallOptions(headers, deadline, cancellationToken));
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700270 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700271 /// <summary>
272 /// A sequence of requests followed by one response (streamed upload).
273 /// The server returns the aggregated size of client payload as the result.
274 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700275 public virtual AsyncClientStreamingCall<global::Grpc.Testing.StreamingInputCallRequest, global::Grpc.Testing.StreamingInputCallResponse> StreamingInputCall(CallOptions options)
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700276 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700277 return CallInvoker.AsyncClientStreamingCall(__Method_StreamingInputCall, null, options);
Jan Tattermuschcc97fed2015-08-05 00:44:29 -0700278 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700279 /// <summary>
280 /// A sequence of requests with each request served by the server immediately.
281 /// As one request could lead to multiple responses, this interface
282 /// demonstrates the idea of full duplexing.
283 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700284 public virtual AsyncDuplexStreamingCall<global::Grpc.Testing.StreamingOutputCallRequest, global::Grpc.Testing.StreamingOutputCallResponse> FullDuplexCall(Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
Jan Tattermuschcc97fed2015-08-05 00:44:29 -0700285 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700286 return FullDuplexCall(new CallOptions(headers, deadline, cancellationToken));
287 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700288 /// <summary>
289 /// A sequence of requests with each request served by the server immediately.
290 /// As one request could lead to multiple responses, this interface
291 /// demonstrates the idea of full duplexing.
292 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700293 public virtual AsyncDuplexStreamingCall<global::Grpc.Testing.StreamingOutputCallRequest, global::Grpc.Testing.StreamingOutputCallResponse> FullDuplexCall(CallOptions options)
294 {
295 return CallInvoker.AsyncDuplexStreamingCall(__Method_FullDuplexCall, null, options);
296 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700297 /// <summary>
298 /// A sequence of requests followed by a sequence of responses.
299 /// The server buffers all the client requests and then serves them in order. A
300 /// stream of responses are returned to the client when the server starts with
301 /// first request.
302 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700303 public virtual AsyncDuplexStreamingCall<global::Grpc.Testing.StreamingOutputCallRequest, global::Grpc.Testing.StreamingOutputCallResponse> HalfDuplexCall(Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
304 {
305 return HalfDuplexCall(new CallOptions(headers, deadline, cancellationToken));
306 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700307 /// <summary>
308 /// A sequence of requests followed by a sequence of responses.
309 /// The server buffers all the client requests and then serves them in order. A
310 /// stream of responses are returned to the client when the server starts with
311 /// first request.
312 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700313 public virtual AsyncDuplexStreamingCall<global::Grpc.Testing.StreamingOutputCallRequest, global::Grpc.Testing.StreamingOutputCallResponse> HalfDuplexCall(CallOptions options)
314 {
315 return CallInvoker.AsyncDuplexStreamingCall(__Method_HalfDuplexCall, null, options);
316 }
Jan Tattermusch10098d12016-10-06 13:15:12 +0200317 /// <summary>Creates a new instance of client from given <c>ClientBaseConfiguration</c>.</summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700318 protected override TestServiceClient NewInstance(ClientBaseConfiguration configuration)
319 {
320 return new TestServiceClient(configuration);
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700321 }
322 }
323
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700324 /// <summary>Creates service definition that can be registered with a server</summary>
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700325 public static ServerServiceDefinition BindService(TestServiceBase serviceImpl)
326 {
Jan Tattermusch562cd052016-06-06 08:47:17 -0700327 return ServerServiceDefinition.CreateBuilder()
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700328 .AddMethod(__Method_EmptyCall, serviceImpl.EmptyCall)
329 .AddMethod(__Method_UnaryCall, serviceImpl.UnaryCall)
330 .AddMethod(__Method_StreamingOutputCall, serviceImpl.StreamingOutputCall)
331 .AddMethod(__Method_StreamingInputCall, serviceImpl.StreamingInputCall)
332 .AddMethod(__Method_FullDuplexCall, serviceImpl.FullDuplexCall)
333 .AddMethod(__Method_HalfDuplexCall, serviceImpl.HalfDuplexCall).Build();
334 }
335
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700336 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700337 /// <summary>
338 /// A simple service NOT implemented at servers so clients can test for
339 /// that case.
340 /// </summary>
Jan Tattermusch70f86522015-10-07 18:23:51 -0700341 public static class UnimplementedService
342 {
343 static readonly string __ServiceName = "grpc.testing.UnimplementedService";
344
345 static readonly Marshaller<global::Grpc.Testing.Empty> __Marshaller_Empty = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.Empty.Parser.ParseFrom);
346
347 static readonly Method<global::Grpc.Testing.Empty, global::Grpc.Testing.Empty> __Method_UnimplementedCall = new Method<global::Grpc.Testing.Empty, global::Grpc.Testing.Empty>(
348 MethodType.Unary,
349 __ServiceName,
350 "UnimplementedCall",
351 __Marshaller_Empty,
352 __Marshaller_Empty);
353
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700354 /// <summary>Service descriptor</summary>
Jan Tattermusch70f86522015-10-07 18:23:51 -0700355 public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor
356 {
Jan Tattermusch72ce4422016-01-20 13:54:38 -0800357 get { return global::Grpc.Testing.TestReflection.Descriptor.Services[1]; }
Jan Tattermusch70f86522015-10-07 18:23:51 -0700358 }
359
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700360 /// <summary>Base class for server-side implementations of UnimplementedService</summary>
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700361 public abstract class UnimplementedServiceBase
362 {
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700363 /// <summary>
364 /// A call that no server should implement
365 /// </summary>
Jan Tattermuschd83f7912016-05-09 10:28:10 -0700366 public virtual global::System.Threading.Tasks.Task<global::Grpc.Testing.Empty> UnimplementedCall(global::Grpc.Testing.Empty request, ServerCallContext context)
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700367 {
368 throw new RpcException(new Status(StatusCode.Unimplemented, ""));
369 }
370
371 }
372
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700373 /// <summary>Client for UnimplementedService</summary>
Jan Tattermuschfcc8d972016-06-06 09:44:02 -0700374 public class UnimplementedServiceClient : ClientBase<UnimplementedServiceClient>
Jan Tattermusch70f86522015-10-07 18:23:51 -0700375 {
Jan Tattermusched6ea4c2016-06-22 12:38:44 -0700376 /// <summary>Creates a new client for UnimplementedService</summary>
377 /// <param name="channel">The channel to use to make remote calls.</param>
Jan Tattermusch70f86522015-10-07 18:23:51 -0700378 public UnimplementedServiceClient(Channel channel) : base(channel)
379 {
380 }
Jan Tattermusched6ea4c2016-06-22 12:38:44 -0700381 /// <summary>Creates a new client for UnimplementedService that uses a custom <c>CallInvoker</c>.</summary>
382 /// <param name="callInvoker">The callInvoker to use to make remote calls.</param>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700383 public UnimplementedServiceClient(CallInvoker callInvoker) : base(callInvoker)
Jan Tattermusch70f86522015-10-07 18:23:51 -0700384 {
Jan Tattermusch70f86522015-10-07 18:23:51 -0700385 }
Jan Tattermusched6ea4c2016-06-22 12:38:44 -0700386 /// <summary>Protected parameterless constructor to allow creation of test doubles.</summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700387 protected UnimplementedServiceClient() : base()
Jan Tattermusch70f86522015-10-07 18:23:51 -0700388 {
Jan Tattermusch70f86522015-10-07 18:23:51 -0700389 }
Jan Tattermusched6ea4c2016-06-22 12:38:44 -0700390 /// <summary>Protected constructor to allow creation of configured clients.</summary>
391 /// <param name="configuration">The client configuration.</param>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700392 protected UnimplementedServiceClient(ClientBaseConfiguration configuration) : base(configuration)
Jan Tattermusch70f86522015-10-07 18:23:51 -0700393 {
Jan Tattermusch70f86522015-10-07 18:23:51 -0700394 }
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700395
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700396 /// <summary>
397 /// A call that no server should implement
398 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700399 public virtual global::Grpc.Testing.Empty UnimplementedCall(global::Grpc.Testing.Empty request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
Jan Tattermusch70f86522015-10-07 18:23:51 -0700400 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700401 return UnimplementedCall(request, new CallOptions(headers, deadline, cancellationToken));
402 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700403 /// <summary>
404 /// A call that no server should implement
405 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700406 public virtual global::Grpc.Testing.Empty UnimplementedCall(global::Grpc.Testing.Empty request, CallOptions options)
407 {
408 return CallInvoker.BlockingUnaryCall(__Method_UnimplementedCall, null, options, request);
409 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700410 /// <summary>
411 /// A call that no server should implement
412 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700413 public virtual AsyncUnaryCall<global::Grpc.Testing.Empty> UnimplementedCallAsync(global::Grpc.Testing.Empty request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
414 {
415 return UnimplementedCallAsync(request, new CallOptions(headers, deadline, cancellationToken));
416 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700417 /// <summary>
418 /// A call that no server should implement
419 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700420 public virtual AsyncUnaryCall<global::Grpc.Testing.Empty> UnimplementedCallAsync(global::Grpc.Testing.Empty request, CallOptions options)
421 {
422 return CallInvoker.AsyncUnaryCall(__Method_UnimplementedCall, null, options, request);
423 }
Jan Tattermusch10098d12016-10-06 13:15:12 +0200424 /// <summary>Creates a new instance of client from given <c>ClientBaseConfiguration</c>.</summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700425 protected override UnimplementedServiceClient NewInstance(ClientBaseConfiguration configuration)
426 {
427 return new UnimplementedServiceClient(configuration);
Jan Tattermusch70f86522015-10-07 18:23:51 -0700428 }
429 }
430
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700431 /// <summary>Creates service definition that can be registered with a server</summary>
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700432 public static ServerServiceDefinition BindService(UnimplementedServiceBase serviceImpl)
433 {
Jan Tattermusch562cd052016-06-06 08:47:17 -0700434 return ServerServiceDefinition.CreateBuilder()
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700435 .AddMethod(__Method_UnimplementedCall, serviceImpl.UnimplementedCall).Build();
436 }
437
Jan Tattermusch70f86522015-10-07 18:23:51 -0700438 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700439 /// <summary>
440 /// A service used to control reconnect server.
441 /// </summary>
Jan Tattermusch70f86522015-10-07 18:23:51 -0700442 public static class ReconnectService
443 {
444 static readonly string __ServiceName = "grpc.testing.ReconnectService";
445
vjpai87bac952016-04-20 09:35:35 -0700446 static readonly Marshaller<global::Grpc.Testing.ReconnectParams> __Marshaller_ReconnectParams = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.ReconnectParams.Parser.ParseFrom);
Jan Tattermusch70f86522015-10-07 18:23:51 -0700447 static readonly Marshaller<global::Grpc.Testing.Empty> __Marshaller_Empty = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.Empty.Parser.ParseFrom);
448 static readonly Marshaller<global::Grpc.Testing.ReconnectInfo> __Marshaller_ReconnectInfo = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.ReconnectInfo.Parser.ParseFrom);
449
vjpai87bac952016-04-20 09:35:35 -0700450 static readonly Method<global::Grpc.Testing.ReconnectParams, global::Grpc.Testing.Empty> __Method_Start = new Method<global::Grpc.Testing.ReconnectParams, global::Grpc.Testing.Empty>(
Jan Tattermusch70f86522015-10-07 18:23:51 -0700451 MethodType.Unary,
452 __ServiceName,
453 "Start",
vjpai87bac952016-04-20 09:35:35 -0700454 __Marshaller_ReconnectParams,
Jan Tattermusch70f86522015-10-07 18:23:51 -0700455 __Marshaller_Empty);
456
457 static readonly Method<global::Grpc.Testing.Empty, global::Grpc.Testing.ReconnectInfo> __Method_Stop = new Method<global::Grpc.Testing.Empty, global::Grpc.Testing.ReconnectInfo>(
458 MethodType.Unary,
459 __ServiceName,
460 "Stop",
461 __Marshaller_Empty,
462 __Marshaller_ReconnectInfo);
463
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700464 /// <summary>Service descriptor</summary>
Jan Tattermusch70f86522015-10-07 18:23:51 -0700465 public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor
466 {
Jan Tattermusch72ce4422016-01-20 13:54:38 -0800467 get { return global::Grpc.Testing.TestReflection.Descriptor.Services[2]; }
Jan Tattermusch70f86522015-10-07 18:23:51 -0700468 }
469
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700470 /// <summary>Base class for server-side implementations of ReconnectService</summary>
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700471 public abstract class ReconnectServiceBase
472 {
Jan Tattermuschd83f7912016-05-09 10:28:10 -0700473 public virtual global::System.Threading.Tasks.Task<global::Grpc.Testing.Empty> Start(global::Grpc.Testing.ReconnectParams request, ServerCallContext context)
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700474 {
475 throw new RpcException(new Status(StatusCode.Unimplemented, ""));
476 }
477
Jan Tattermuschd83f7912016-05-09 10:28:10 -0700478 public virtual global::System.Threading.Tasks.Task<global::Grpc.Testing.ReconnectInfo> Stop(global::Grpc.Testing.Empty request, ServerCallContext context)
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700479 {
480 throw new RpcException(new Status(StatusCode.Unimplemented, ""));
481 }
482
483 }
484
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700485 /// <summary>Client for ReconnectService</summary>
Jan Tattermuschfcc8d972016-06-06 09:44:02 -0700486 public class ReconnectServiceClient : ClientBase<ReconnectServiceClient>
Jan Tattermusch70f86522015-10-07 18:23:51 -0700487 {
Jan Tattermusched6ea4c2016-06-22 12:38:44 -0700488 /// <summary>Creates a new client for ReconnectService</summary>
489 /// <param name="channel">The channel to use to make remote calls.</param>
Jan Tattermusch70f86522015-10-07 18:23:51 -0700490 public ReconnectServiceClient(Channel channel) : base(channel)
491 {
492 }
Jan Tattermusched6ea4c2016-06-22 12:38:44 -0700493 /// <summary>Creates a new client for ReconnectService that uses a custom <c>CallInvoker</c>.</summary>
494 /// <param name="callInvoker">The callInvoker to use to make remote calls.</param>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700495 public ReconnectServiceClient(CallInvoker callInvoker) : base(callInvoker)
Jan Tattermusch70f86522015-10-07 18:23:51 -0700496 {
Jan Tattermusch70f86522015-10-07 18:23:51 -0700497 }
Jan Tattermusched6ea4c2016-06-22 12:38:44 -0700498 /// <summary>Protected parameterless constructor to allow creation of test doubles.</summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700499 protected ReconnectServiceClient() : base()
Jan Tattermusch70f86522015-10-07 18:23:51 -0700500 {
Jan Tattermusch70f86522015-10-07 18:23:51 -0700501 }
Jan Tattermusched6ea4c2016-06-22 12:38:44 -0700502 /// <summary>Protected constructor to allow creation of configured clients.</summary>
503 /// <param name="configuration">The client configuration.</param>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700504 protected ReconnectServiceClient(ClientBaseConfiguration configuration) : base(configuration)
Jan Tattermusch70f86522015-10-07 18:23:51 -0700505 {
Jan Tattermusch70f86522015-10-07 18:23:51 -0700506 }
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700507
vjpai87bac952016-04-20 09:35:35 -0700508 public virtual global::Grpc.Testing.Empty Start(global::Grpc.Testing.ReconnectParams request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
Jan Tattermusch70f86522015-10-07 18:23:51 -0700509 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700510 return Start(request, new CallOptions(headers, deadline, cancellationToken));
Jan Tattermusch70f86522015-10-07 18:23:51 -0700511 }
vjpai87bac952016-04-20 09:35:35 -0700512 public virtual global::Grpc.Testing.Empty Start(global::Grpc.Testing.ReconnectParams request, CallOptions options)
Jan Tattermusch70f86522015-10-07 18:23:51 -0700513 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700514 return CallInvoker.BlockingUnaryCall(__Method_Start, null, options, request);
Jan Tattermusch70f86522015-10-07 18:23:51 -0700515 }
vjpai87bac952016-04-20 09:35:35 -0700516 public virtual AsyncUnaryCall<global::Grpc.Testing.Empty> StartAsync(global::Grpc.Testing.ReconnectParams request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
Jan Tattermusch70f86522015-10-07 18:23:51 -0700517 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700518 return StartAsync(request, new CallOptions(headers, deadline, cancellationToken));
Jan Tattermusch70f86522015-10-07 18:23:51 -0700519 }
vjpai87bac952016-04-20 09:35:35 -0700520 public virtual AsyncUnaryCall<global::Grpc.Testing.Empty> StartAsync(global::Grpc.Testing.ReconnectParams request, CallOptions options)
Jan Tattermusch70f86522015-10-07 18:23:51 -0700521 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700522 return CallInvoker.AsyncUnaryCall(__Method_Start, null, options, request);
Jan Tattermusch70f86522015-10-07 18:23:51 -0700523 }
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700524 public virtual global::Grpc.Testing.ReconnectInfo Stop(global::Grpc.Testing.Empty request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
Jan Tattermusch70f86522015-10-07 18:23:51 -0700525 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700526 return Stop(request, new CallOptions(headers, deadline, cancellationToken));
527 }
528 public virtual global::Grpc.Testing.ReconnectInfo Stop(global::Grpc.Testing.Empty request, CallOptions options)
529 {
530 return CallInvoker.BlockingUnaryCall(__Method_Stop, null, options, request);
531 }
532 public virtual AsyncUnaryCall<global::Grpc.Testing.ReconnectInfo> StopAsync(global::Grpc.Testing.Empty request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
533 {
534 return StopAsync(request, new CallOptions(headers, deadline, cancellationToken));
535 }
536 public virtual AsyncUnaryCall<global::Grpc.Testing.ReconnectInfo> StopAsync(global::Grpc.Testing.Empty request, CallOptions options)
537 {
538 return CallInvoker.AsyncUnaryCall(__Method_Stop, null, options, request);
539 }
Jan Tattermusch10098d12016-10-06 13:15:12 +0200540 /// <summary>Creates a new instance of client from given <c>ClientBaseConfiguration</c>.</summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700541 protected override ReconnectServiceClient NewInstance(ClientBaseConfiguration configuration)
542 {
543 return new ReconnectServiceClient(configuration);
Jan Tattermusch70f86522015-10-07 18:23:51 -0700544 }
545 }
546
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700547 /// <summary>Creates service definition that can be registered with a server</summary>
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700548 public static ServerServiceDefinition BindService(ReconnectServiceBase serviceImpl)
549 {
Jan Tattermusch562cd052016-06-06 08:47:17 -0700550 return ServerServiceDefinition.CreateBuilder()
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700551 .AddMethod(__Method_Start, serviceImpl.Start)
552 .AddMethod(__Method_Stop, serviceImpl.Stop).Build();
553 }
554
Jan Tattermusch70f86522015-10-07 18:23:51 -0700555 }
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700556}
Jan Tattermuschcd7e3132015-05-07 15:10:23 -0700557#endregion