blob: d7ac5a8a38acd9bbad9876cada9799fa34a931f9 [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>
Alexander Polcync0f4c2c2016-11-07 10:24:35 -080048 public static partial class TestService
Jan Tattermusch7eb3a762015-05-07 14:26:13 -070049 {
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>
Alexander Polcync0f4c2c2016-11-07 10:24:35 -0800109 public abstract partial class TestServiceBase
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700110 {
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>
Alexander Polcync0f4c2c2016-11-07 10:24:35 -0800169 public partial 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 }
317 protected override TestServiceClient NewInstance(ClientBaseConfiguration configuration)
318 {
319 return new TestServiceClient(configuration);
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700320 }
321 }
322
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700323 /// <summary>Creates service definition that can be registered with a server</summary>
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700324 public static ServerServiceDefinition BindService(TestServiceBase serviceImpl)
325 {
Jan Tattermusch562cd052016-06-06 08:47:17 -0700326 return ServerServiceDefinition.CreateBuilder()
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700327 .AddMethod(__Method_EmptyCall, serviceImpl.EmptyCall)
328 .AddMethod(__Method_UnaryCall, serviceImpl.UnaryCall)
329 .AddMethod(__Method_StreamingOutputCall, serviceImpl.StreamingOutputCall)
330 .AddMethod(__Method_StreamingInputCall, serviceImpl.StreamingInputCall)
331 .AddMethod(__Method_FullDuplexCall, serviceImpl.FullDuplexCall)
332 .AddMethod(__Method_HalfDuplexCall, serviceImpl.HalfDuplexCall).Build();
333 }
334
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700335 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700336 /// <summary>
337 /// A simple service NOT implemented at servers so clients can test for
338 /// that case.
339 /// </summary>
Alexander Polcync0f4c2c2016-11-07 10:24:35 -0800340 public static partial class UnimplementedService
Jan Tattermusch70f86522015-10-07 18:23:51 -0700341 {
342 static readonly string __ServiceName = "grpc.testing.UnimplementedService";
343
344 static readonly Marshaller<global::Grpc.Testing.Empty> __Marshaller_Empty = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.Empty.Parser.ParseFrom);
345
346 static readonly Method<global::Grpc.Testing.Empty, global::Grpc.Testing.Empty> __Method_UnimplementedCall = new Method<global::Grpc.Testing.Empty, global::Grpc.Testing.Empty>(
347 MethodType.Unary,
348 __ServiceName,
349 "UnimplementedCall",
350 __Marshaller_Empty,
351 __Marshaller_Empty);
352
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700353 /// <summary>Service descriptor</summary>
Jan Tattermusch70f86522015-10-07 18:23:51 -0700354 public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor
355 {
Jan Tattermusch72ce4422016-01-20 13:54:38 -0800356 get { return global::Grpc.Testing.TestReflection.Descriptor.Services[1]; }
Jan Tattermusch70f86522015-10-07 18:23:51 -0700357 }
358
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700359 /// <summary>Base class for server-side implementations of UnimplementedService</summary>
Alexander Polcync0f4c2c2016-11-07 10:24:35 -0800360 public abstract partial class UnimplementedServiceBase
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700361 {
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700362 /// <summary>
363 /// A call that no server should implement
364 /// </summary>
Jan Tattermuschd83f7912016-05-09 10:28:10 -0700365 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 -0700366 {
367 throw new RpcException(new Status(StatusCode.Unimplemented, ""));
368 }
369
370 }
371
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700372 /// <summary>Client for UnimplementedService</summary>
Alexander Polcync0f4c2c2016-11-07 10:24:35 -0800373 public partial class UnimplementedServiceClient : ClientBase<UnimplementedServiceClient>
Jan Tattermusch70f86522015-10-07 18:23:51 -0700374 {
Jan Tattermusched6ea4c2016-06-22 12:38:44 -0700375 /// <summary>Creates a new client for UnimplementedService</summary>
376 /// <param name="channel">The channel to use to make remote calls.</param>
Jan Tattermusch70f86522015-10-07 18:23:51 -0700377 public UnimplementedServiceClient(Channel channel) : base(channel)
378 {
379 }
Jan Tattermusched6ea4c2016-06-22 12:38:44 -0700380 /// <summary>Creates a new client for UnimplementedService that uses a custom <c>CallInvoker</c>.</summary>
381 /// <param name="callInvoker">The callInvoker to use to make remote calls.</param>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700382 public UnimplementedServiceClient(CallInvoker callInvoker) : base(callInvoker)
Jan Tattermusch70f86522015-10-07 18:23:51 -0700383 {
Jan Tattermusch70f86522015-10-07 18:23:51 -0700384 }
Jan Tattermusched6ea4c2016-06-22 12:38:44 -0700385 /// <summary>Protected parameterless constructor to allow creation of test doubles.</summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700386 protected UnimplementedServiceClient() : base()
Jan Tattermusch70f86522015-10-07 18:23:51 -0700387 {
Jan Tattermusch70f86522015-10-07 18:23:51 -0700388 }
Jan Tattermusched6ea4c2016-06-22 12:38:44 -0700389 /// <summary>Protected constructor to allow creation of configured clients.</summary>
390 /// <param name="configuration">The client configuration.</param>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700391 protected UnimplementedServiceClient(ClientBaseConfiguration configuration) : base(configuration)
Jan Tattermusch70f86522015-10-07 18:23:51 -0700392 {
Jan Tattermusch70f86522015-10-07 18:23:51 -0700393 }
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700394
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700395 /// <summary>
396 /// A call that no server should implement
397 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700398 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 -0700399 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700400 return UnimplementedCall(request, new CallOptions(headers, deadline, cancellationToken));
401 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700402 /// <summary>
403 /// A call that no server should implement
404 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700405 public virtual global::Grpc.Testing.Empty UnimplementedCall(global::Grpc.Testing.Empty request, CallOptions options)
406 {
407 return CallInvoker.BlockingUnaryCall(__Method_UnimplementedCall, null, options, request);
408 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700409 /// <summary>
410 /// A call that no server should implement
411 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700412 public virtual AsyncUnaryCall<global::Grpc.Testing.Empty> UnimplementedCallAsync(global::Grpc.Testing.Empty request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
413 {
414 return UnimplementedCallAsync(request, new CallOptions(headers, deadline, cancellationToken));
415 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700416 /// <summary>
417 /// A call that no server should implement
418 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700419 public virtual AsyncUnaryCall<global::Grpc.Testing.Empty> UnimplementedCallAsync(global::Grpc.Testing.Empty request, CallOptions options)
420 {
421 return CallInvoker.AsyncUnaryCall(__Method_UnimplementedCall, null, options, request);
422 }
423 protected override UnimplementedServiceClient NewInstance(ClientBaseConfiguration configuration)
424 {
425 return new UnimplementedServiceClient(configuration);
Jan Tattermusch70f86522015-10-07 18:23:51 -0700426 }
427 }
428
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700429 /// <summary>Creates service definition that can be registered with a server</summary>
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700430 public static ServerServiceDefinition BindService(UnimplementedServiceBase serviceImpl)
431 {
Jan Tattermusch562cd052016-06-06 08:47:17 -0700432 return ServerServiceDefinition.CreateBuilder()
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700433 .AddMethod(__Method_UnimplementedCall, serviceImpl.UnimplementedCall).Build();
434 }
435
Jan Tattermusch70f86522015-10-07 18:23:51 -0700436 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700437 /// <summary>
438 /// A service used to control reconnect server.
439 /// </summary>
Alexander Polcync0f4c2c2016-11-07 10:24:35 -0800440 public static partial class ReconnectService
Jan Tattermusch70f86522015-10-07 18:23:51 -0700441 {
442 static readonly string __ServiceName = "grpc.testing.ReconnectService";
443
vjpai87bac952016-04-20 09:35:35 -0700444 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 -0700445 static readonly Marshaller<global::Grpc.Testing.Empty> __Marshaller_Empty = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.Empty.Parser.ParseFrom);
446 static readonly Marshaller<global::Grpc.Testing.ReconnectInfo> __Marshaller_ReconnectInfo = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.ReconnectInfo.Parser.ParseFrom);
447
vjpai87bac952016-04-20 09:35:35 -0700448 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 -0700449 MethodType.Unary,
450 __ServiceName,
451 "Start",
vjpai87bac952016-04-20 09:35:35 -0700452 __Marshaller_ReconnectParams,
Jan Tattermusch70f86522015-10-07 18:23:51 -0700453 __Marshaller_Empty);
454
455 static readonly Method<global::Grpc.Testing.Empty, global::Grpc.Testing.ReconnectInfo> __Method_Stop = new Method<global::Grpc.Testing.Empty, global::Grpc.Testing.ReconnectInfo>(
456 MethodType.Unary,
457 __ServiceName,
458 "Stop",
459 __Marshaller_Empty,
460 __Marshaller_ReconnectInfo);
461
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700462 /// <summary>Service descriptor</summary>
Jan Tattermusch70f86522015-10-07 18:23:51 -0700463 public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor
464 {
Jan Tattermusch72ce4422016-01-20 13:54:38 -0800465 get { return global::Grpc.Testing.TestReflection.Descriptor.Services[2]; }
Jan Tattermusch70f86522015-10-07 18:23:51 -0700466 }
467
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700468 /// <summary>Base class for server-side implementations of ReconnectService</summary>
Alexander Polcync0f4c2c2016-11-07 10:24:35 -0800469 public abstract partial class ReconnectServiceBase
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700470 {
Jan Tattermuschd83f7912016-05-09 10:28:10 -0700471 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 -0700472 {
473 throw new RpcException(new Status(StatusCode.Unimplemented, ""));
474 }
475
Jan Tattermuschd83f7912016-05-09 10:28:10 -0700476 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 -0700477 {
478 throw new RpcException(new Status(StatusCode.Unimplemented, ""));
479 }
480
481 }
482
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700483 /// <summary>Client for ReconnectService</summary>
Alexander Polcync0f4c2c2016-11-07 10:24:35 -0800484 public partial class ReconnectServiceClient : ClientBase<ReconnectServiceClient>
Jan Tattermusch70f86522015-10-07 18:23:51 -0700485 {
Jan Tattermusched6ea4c2016-06-22 12:38:44 -0700486 /// <summary>Creates a new client for ReconnectService</summary>
487 /// <param name="channel">The channel to use to make remote calls.</param>
Jan Tattermusch70f86522015-10-07 18:23:51 -0700488 public ReconnectServiceClient(Channel channel) : base(channel)
489 {
490 }
Jan Tattermusched6ea4c2016-06-22 12:38:44 -0700491 /// <summary>Creates a new client for ReconnectService that uses a custom <c>CallInvoker</c>.</summary>
492 /// <param name="callInvoker">The callInvoker to use to make remote calls.</param>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700493 public ReconnectServiceClient(CallInvoker callInvoker) : base(callInvoker)
Jan Tattermusch70f86522015-10-07 18:23:51 -0700494 {
Jan Tattermusch70f86522015-10-07 18:23:51 -0700495 }
Jan Tattermusched6ea4c2016-06-22 12:38:44 -0700496 /// <summary>Protected parameterless constructor to allow creation of test doubles.</summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700497 protected ReconnectServiceClient() : base()
Jan Tattermusch70f86522015-10-07 18:23:51 -0700498 {
Jan Tattermusch70f86522015-10-07 18:23:51 -0700499 }
Jan Tattermusched6ea4c2016-06-22 12:38:44 -0700500 /// <summary>Protected constructor to allow creation of configured clients.</summary>
501 /// <param name="configuration">The client configuration.</param>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700502 protected ReconnectServiceClient(ClientBaseConfiguration configuration) : base(configuration)
Jan Tattermusch70f86522015-10-07 18:23:51 -0700503 {
Jan Tattermusch70f86522015-10-07 18:23:51 -0700504 }
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700505
vjpai87bac952016-04-20 09:35:35 -0700506 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 -0700507 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700508 return Start(request, new CallOptions(headers, deadline, cancellationToken));
Jan Tattermusch70f86522015-10-07 18:23:51 -0700509 }
vjpai87bac952016-04-20 09:35:35 -0700510 public virtual global::Grpc.Testing.Empty Start(global::Grpc.Testing.ReconnectParams request, CallOptions options)
Jan Tattermusch70f86522015-10-07 18:23:51 -0700511 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700512 return CallInvoker.BlockingUnaryCall(__Method_Start, null, options, request);
Jan Tattermusch70f86522015-10-07 18:23:51 -0700513 }
vjpai87bac952016-04-20 09:35:35 -0700514 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 -0700515 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700516 return StartAsync(request, new CallOptions(headers, deadline, cancellationToken));
Jan Tattermusch70f86522015-10-07 18:23:51 -0700517 }
vjpai87bac952016-04-20 09:35:35 -0700518 public virtual AsyncUnaryCall<global::Grpc.Testing.Empty> StartAsync(global::Grpc.Testing.ReconnectParams request, CallOptions options)
Jan Tattermusch70f86522015-10-07 18:23:51 -0700519 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700520 return CallInvoker.AsyncUnaryCall(__Method_Start, null, options, request);
Jan Tattermusch70f86522015-10-07 18:23:51 -0700521 }
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700522 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 -0700523 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700524 return Stop(request, new CallOptions(headers, deadline, cancellationToken));
525 }
526 public virtual global::Grpc.Testing.ReconnectInfo Stop(global::Grpc.Testing.Empty request, CallOptions options)
527 {
528 return CallInvoker.BlockingUnaryCall(__Method_Stop, null, options, request);
529 }
530 public virtual AsyncUnaryCall<global::Grpc.Testing.ReconnectInfo> StopAsync(global::Grpc.Testing.Empty request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
531 {
532 return StopAsync(request, new CallOptions(headers, deadline, cancellationToken));
533 }
534 public virtual AsyncUnaryCall<global::Grpc.Testing.ReconnectInfo> StopAsync(global::Grpc.Testing.Empty request, CallOptions options)
535 {
536 return CallInvoker.AsyncUnaryCall(__Method_Stop, null, options, request);
537 }
538 protected override ReconnectServiceClient NewInstance(ClientBaseConfiguration configuration)
539 {
540 return new ReconnectServiceClient(configuration);
Jan Tattermusch70f86522015-10-07 18:23:51 -0700541 }
542 }
543
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700544 /// <summary>Creates service definition that can be registered with a server</summary>
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700545 public static ServerServiceDefinition BindService(ReconnectServiceBase serviceImpl)
546 {
Jan Tattermusch562cd052016-06-06 08:47:17 -0700547 return ServerServiceDefinition.CreateBuilder()
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700548 .AddMethod(__Method_Start, serviceImpl.Start)
549 .AddMethod(__Method_Stop, serviceImpl.Stop).Build();
550 }
551
Jan Tattermusch70f86522015-10-07 18:23:51 -0700552 }
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700553}
Jan Tattermuschcd7e3132015-05-07 15:10:23 -0700554#endregion