blob: f7071ebf6bebeeeec86c81c79cc72463e0cddec8 [file] [log] [blame]
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -07001// Generated by the protocol buffer compiler. DO NOT EDIT!
Jan Tattermusch72ce4422016-01-20 13:54:38 -08002// source: src/proto/grpc/testing/services.proto
Jan Tattermuschbfee01d2016-04-28 10:52:41 -07003// Original file comments:
4// Copyright 2015, 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.
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -070035#region Designer generated code
36
37using System;
38using System.Threading;
39using System.Threading.Tasks;
40using Grpc.Core;
41
42namespace Grpc.Testing {
43 public static class BenchmarkService
44 {
45 static readonly string __ServiceName = "grpc.testing.BenchmarkService";
46
47 static readonly Marshaller<global::Grpc.Testing.SimpleRequest> __Marshaller_SimpleRequest = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.SimpleRequest.Parser.ParseFrom);
48 static readonly Marshaller<global::Grpc.Testing.SimpleResponse> __Marshaller_SimpleResponse = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.SimpleResponse.Parser.ParseFrom);
49
50 static readonly Method<global::Grpc.Testing.SimpleRequest, global::Grpc.Testing.SimpleResponse> __Method_UnaryCall = new Method<global::Grpc.Testing.SimpleRequest, global::Grpc.Testing.SimpleResponse>(
51 MethodType.Unary,
52 __ServiceName,
53 "UnaryCall",
54 __Marshaller_SimpleRequest,
55 __Marshaller_SimpleResponse);
56
57 static readonly Method<global::Grpc.Testing.SimpleRequest, global::Grpc.Testing.SimpleResponse> __Method_StreamingCall = new Method<global::Grpc.Testing.SimpleRequest, global::Grpc.Testing.SimpleResponse>(
58 MethodType.DuplexStreaming,
59 __ServiceName,
60 "StreamingCall",
61 __Marshaller_SimpleRequest,
62 __Marshaller_SimpleResponse);
63
Jan Tattermuschbfee01d2016-04-28 10:52:41 -070064 /// <summary>Service descriptor</summary>
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -070065 public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor
66 {
Jan Tattermusch72ce4422016-01-20 13:54:38 -080067 get { return global::Grpc.Testing.ServicesReflection.Descriptor.Services[0]; }
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -070068 }
69
Jan Tattermuschbfee01d2016-04-28 10:52:41 -070070 /// <summary>Client for BenchmarkService</summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -070071 [System.Obsolete("Client side interfaced will be removed in the next release. Use client class directly.")]
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -070072 public interface IBenchmarkServiceClient
73 {
Jan Tattermuschbfee01d2016-04-28 10:52:41 -070074 /// <summary>
75 /// One request followed by one response.
76 /// The server returns the client payload as-is.
77 /// </summary>
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -070078 global::Grpc.Testing.SimpleResponse UnaryCall(global::Grpc.Testing.SimpleRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
Jan Tattermuschbfee01d2016-04-28 10:52:41 -070079 /// <summary>
80 /// One request followed by one response.
81 /// The server returns the client payload as-is.
82 /// </summary>
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -070083 global::Grpc.Testing.SimpleResponse UnaryCall(global::Grpc.Testing.SimpleRequest request, CallOptions options);
Jan Tattermuschbfee01d2016-04-28 10:52:41 -070084 /// <summary>
85 /// One request followed by one response.
86 /// The server returns the client payload as-is.
87 /// </summary>
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -070088 AsyncUnaryCall<global::Grpc.Testing.SimpleResponse> UnaryCallAsync(global::Grpc.Testing.SimpleRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
Jan Tattermuschbfee01d2016-04-28 10:52:41 -070089 /// <summary>
90 /// One request followed by one response.
91 /// The server returns the client payload as-is.
92 /// </summary>
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -070093 AsyncUnaryCall<global::Grpc.Testing.SimpleResponse> UnaryCallAsync(global::Grpc.Testing.SimpleRequest request, CallOptions options);
Jan Tattermuschbfee01d2016-04-28 10:52:41 -070094 /// <summary>
95 /// One request followed by one response.
96 /// The server returns the client payload as-is.
97 /// </summary>
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -070098 AsyncDuplexStreamingCall<global::Grpc.Testing.SimpleRequest, global::Grpc.Testing.SimpleResponse> StreamingCall(Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
Jan Tattermuschbfee01d2016-04-28 10:52:41 -070099 /// <summary>
100 /// One request followed by one response.
101 /// The server returns the client payload as-is.
102 /// </summary>
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700103 AsyncDuplexStreamingCall<global::Grpc.Testing.SimpleRequest, global::Grpc.Testing.SimpleResponse> StreamingCall(CallOptions options);
104 }
105
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700106 /// <summary>Interface of server-side implementations of BenchmarkService</summary>
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700107 [System.Obsolete("Service implementations should inherit from the generated abstract base class instead.")]
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700108 public interface IBenchmarkService
109 {
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700110 /// <summary>
111 /// One request followed by one response.
112 /// The server returns the client payload as-is.
113 /// </summary>
Jan Tattermuschd83f7912016-05-09 10:28:10 -0700114 global::System.Threading.Tasks.Task<global::Grpc.Testing.SimpleResponse> UnaryCall(global::Grpc.Testing.SimpleRequest request, ServerCallContext context);
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700115 /// <summary>
116 /// One request followed by one response.
117 /// The server returns the client payload as-is.
118 /// </summary>
Jan Tattermuschd83f7912016-05-09 10:28:10 -0700119 global::System.Threading.Tasks.Task StreamingCall(IAsyncStreamReader<global::Grpc.Testing.SimpleRequest> requestStream, IServerStreamWriter<global::Grpc.Testing.SimpleResponse> responseStream, ServerCallContext context);
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700120 }
121
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700122 /// <summary>Base class for server-side implementations of BenchmarkService</summary>
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700123 public abstract class BenchmarkServiceBase
124 {
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700125 /// <summary>
126 /// One request followed by one response.
127 /// The server returns the client payload as-is.
128 /// </summary>
Jan Tattermuschd83f7912016-05-09 10:28:10 -0700129 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 -0700130 {
131 throw new RpcException(new Status(StatusCode.Unimplemented, ""));
132 }
133
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700134 /// <summary>
135 /// One request followed by one response.
136 /// The server returns the client payload as-is.
137 /// </summary>
Jan Tattermuschd83f7912016-05-09 10:28:10 -0700138 public virtual global::System.Threading.Tasks.Task StreamingCall(IAsyncStreamReader<global::Grpc.Testing.SimpleRequest> requestStream, IServerStreamWriter<global::Grpc.Testing.SimpleResponse> responseStream, ServerCallContext context)
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700139 {
140 throw new RpcException(new Status(StatusCode.Unimplemented, ""));
141 }
142
143 }
144
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700145 /// <summary>Client for BenchmarkService</summary>
Jan Tattermusch55fad172016-04-25 13:42:28 -0700146 #pragma warning disable 0618
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700147 public class BenchmarkServiceClient : ClientBase<BenchmarkServiceClient>, IBenchmarkServiceClient
Jan Tattermusch55fad172016-04-25 13:42:28 -0700148 #pragma warning restore 0618
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700149 {
150 public BenchmarkServiceClient(Channel channel) : base(channel)
151 {
152 }
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700153 public BenchmarkServiceClient(CallInvoker callInvoker) : base(callInvoker)
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700154 {
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700155 }
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700156 ///<summary>Protected parameterless constructor to allow creation of test doubles.</summary>
157 protected BenchmarkServiceClient() : base()
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700158 {
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700159 }
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700160 ///<summary>Protected constructor to allow creation of configured clients.</summary>
161 protected BenchmarkServiceClient(ClientBaseConfiguration configuration) : base(configuration)
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700162 {
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700163 }
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700164
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700165 /// <summary>
166 /// One request followed by one response.
167 /// The server returns the client payload as-is.
168 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700169 public virtual global::Grpc.Testing.SimpleResponse UnaryCall(global::Grpc.Testing.SimpleRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700170 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700171 return UnaryCall(request, new CallOptions(headers, deadline, cancellationToken));
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700172 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700173 /// <summary>
174 /// One request followed by one response.
175 /// The server returns the client payload as-is.
176 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700177 public virtual global::Grpc.Testing.SimpleResponse UnaryCall(global::Grpc.Testing.SimpleRequest request, CallOptions options)
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700178 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700179 return CallInvoker.BlockingUnaryCall(__Method_UnaryCall, null, options, request);
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700180 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700181 /// <summary>
182 /// One request followed by one response.
183 /// The server returns the client payload as-is.
184 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700185 public virtual AsyncUnaryCall<global::Grpc.Testing.SimpleResponse> UnaryCallAsync(global::Grpc.Testing.SimpleRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700186 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700187 return UnaryCallAsync(request, new CallOptions(headers, deadline, cancellationToken));
188 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700189 /// <summary>
190 /// One request followed by one response.
191 /// The server returns the client payload as-is.
192 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700193 public virtual AsyncUnaryCall<global::Grpc.Testing.SimpleResponse> UnaryCallAsync(global::Grpc.Testing.SimpleRequest request, CallOptions options)
194 {
195 return CallInvoker.AsyncUnaryCall(__Method_UnaryCall, null, options, request);
196 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700197 /// <summary>
198 /// One request followed by one response.
199 /// The server returns the client payload as-is.
200 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700201 public virtual AsyncDuplexStreamingCall<global::Grpc.Testing.SimpleRequest, global::Grpc.Testing.SimpleResponse> StreamingCall(Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
202 {
203 return StreamingCall(new CallOptions(headers, deadline, cancellationToken));
204 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700205 /// <summary>
206 /// One request followed by one response.
207 /// The server returns the client payload as-is.
208 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700209 public virtual AsyncDuplexStreamingCall<global::Grpc.Testing.SimpleRequest, global::Grpc.Testing.SimpleResponse> StreamingCall(CallOptions options)
210 {
211 return CallInvoker.AsyncDuplexStreamingCall(__Method_StreamingCall, null, options);
212 }
213 protected override BenchmarkServiceClient NewInstance(ClientBaseConfiguration configuration)
214 {
215 return new BenchmarkServiceClient(configuration);
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700216 }
217 }
218
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700219 /// <summary>Creates a new client for BenchmarkService</summary>
Jan Tattermusch7c0e1ee2016-04-25 16:00:34 -0700220 public static BenchmarkServiceClient NewClient(Channel channel)
221 {
222 return new BenchmarkServiceClient(channel);
223 }
224
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700225 /// <summary>Creates service definition that can be registered with a server</summary>
Jan Tattermusch55fad172016-04-25 13:42:28 -0700226 #pragma warning disable 0618
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700227 public static ServerServiceDefinition BindService(IBenchmarkService serviceImpl)
Jan Tattermusch55fad172016-04-25 13:42:28 -0700228 #pragma warning restore 0618
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700229 {
230 return ServerServiceDefinition.CreateBuilder(__ServiceName)
231 .AddMethod(__Method_UnaryCall, serviceImpl.UnaryCall)
232 .AddMethod(__Method_StreamingCall, serviceImpl.StreamingCall).Build();
233 }
234
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700235 /// <summary>Creates service definition that can be registered with a server</summary>
Jan Tattermusch55fad172016-04-25 13:42:28 -0700236 #pragma warning disable 0618
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700237 public static ServerServiceDefinition BindService(BenchmarkServiceBase serviceImpl)
Jan Tattermusch55fad172016-04-25 13:42:28 -0700238 #pragma warning restore 0618
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700239 {
240 return ServerServiceDefinition.CreateBuilder(__ServiceName)
241 .AddMethod(__Method_UnaryCall, serviceImpl.UnaryCall)
242 .AddMethod(__Method_StreamingCall, serviceImpl.StreamingCall).Build();
243 }
244
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700245 }
246 public static class WorkerService
247 {
248 static readonly string __ServiceName = "grpc.testing.WorkerService";
249
250 static readonly Marshaller<global::Grpc.Testing.ServerArgs> __Marshaller_ServerArgs = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.ServerArgs.Parser.ParseFrom);
251 static readonly Marshaller<global::Grpc.Testing.ServerStatus> __Marshaller_ServerStatus = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.ServerStatus.Parser.ParseFrom);
252 static readonly Marshaller<global::Grpc.Testing.ClientArgs> __Marshaller_ClientArgs = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.ClientArgs.Parser.ParseFrom);
253 static readonly Marshaller<global::Grpc.Testing.ClientStatus> __Marshaller_ClientStatus = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.ClientStatus.Parser.ParseFrom);
Jan Tattermusch1cbb5672016-02-18 14:27:28 -0800254 static readonly Marshaller<global::Grpc.Testing.CoreRequest> __Marshaller_CoreRequest = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.CoreRequest.Parser.ParseFrom);
255 static readonly Marshaller<global::Grpc.Testing.CoreResponse> __Marshaller_CoreResponse = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.CoreResponse.Parser.ParseFrom);
256 static readonly Marshaller<global::Grpc.Testing.Void> __Marshaller_Void = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.Void.Parser.ParseFrom);
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700257
258 static readonly Method<global::Grpc.Testing.ServerArgs, global::Grpc.Testing.ServerStatus> __Method_RunServer = new Method<global::Grpc.Testing.ServerArgs, global::Grpc.Testing.ServerStatus>(
259 MethodType.DuplexStreaming,
260 __ServiceName,
261 "RunServer",
262 __Marshaller_ServerArgs,
263 __Marshaller_ServerStatus);
264
265 static readonly Method<global::Grpc.Testing.ClientArgs, global::Grpc.Testing.ClientStatus> __Method_RunClient = new Method<global::Grpc.Testing.ClientArgs, global::Grpc.Testing.ClientStatus>(
266 MethodType.DuplexStreaming,
267 __ServiceName,
268 "RunClient",
269 __Marshaller_ClientArgs,
270 __Marshaller_ClientStatus);
271
Jan Tattermusch1cbb5672016-02-18 14:27:28 -0800272 static readonly Method<global::Grpc.Testing.CoreRequest, global::Grpc.Testing.CoreResponse> __Method_CoreCount = new Method<global::Grpc.Testing.CoreRequest, global::Grpc.Testing.CoreResponse>(
273 MethodType.Unary,
274 __ServiceName,
275 "CoreCount",
276 __Marshaller_CoreRequest,
277 __Marshaller_CoreResponse);
278
279 static readonly Method<global::Grpc.Testing.Void, global::Grpc.Testing.Void> __Method_QuitWorker = new Method<global::Grpc.Testing.Void, global::Grpc.Testing.Void>(
280 MethodType.Unary,
281 __ServiceName,
282 "QuitWorker",
283 __Marshaller_Void,
284 __Marshaller_Void);
285
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700286 /// <summary>Service descriptor</summary>
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700287 public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor
288 {
Jan Tattermusch72ce4422016-01-20 13:54:38 -0800289 get { return global::Grpc.Testing.ServicesReflection.Descriptor.Services[1]; }
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700290 }
291
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700292 /// <summary>Client for WorkerService</summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700293 [System.Obsolete("Client side interfaced will be removed in the next release. Use client class directly.")]
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700294 public interface IWorkerServiceClient
295 {
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700296 /// <summary>
297 /// Start server with specified workload.
298 /// First request sent specifies the ServerConfig followed by ServerStatus
299 /// response. After that, a "Mark" can be sent anytime to request the latest
300 /// stats. Closing the stream will initiate shutdown of the test server
301 /// and once the shutdown has finished, the OK status is sent to terminate
302 /// this RPC.
303 /// </summary>
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700304 AsyncDuplexStreamingCall<global::Grpc.Testing.ServerArgs, global::Grpc.Testing.ServerStatus> RunServer(Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700305 /// <summary>
306 /// Start server with specified workload.
307 /// First request sent specifies the ServerConfig followed by ServerStatus
308 /// response. After that, a "Mark" can be sent anytime to request the latest
309 /// stats. Closing the stream will initiate shutdown of the test server
310 /// and once the shutdown has finished, the OK status is sent to terminate
311 /// this RPC.
312 /// </summary>
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700313 AsyncDuplexStreamingCall<global::Grpc.Testing.ServerArgs, global::Grpc.Testing.ServerStatus> RunServer(CallOptions options);
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700314 /// <summary>
315 /// Start client with specified workload.
316 /// First request sent specifies the ClientConfig followed by ClientStatus
317 /// response. After that, a "Mark" can be sent anytime to request the latest
318 /// stats. Closing the stream will initiate shutdown of the test client
319 /// and once the shutdown has finished, the OK status is sent to terminate
320 /// this RPC.
321 /// </summary>
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700322 AsyncDuplexStreamingCall<global::Grpc.Testing.ClientArgs, global::Grpc.Testing.ClientStatus> RunClient(Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700323 /// <summary>
324 /// Start client with specified workload.
325 /// First request sent specifies the ClientConfig followed by ClientStatus
326 /// response. After that, a "Mark" can be sent anytime to request the latest
327 /// stats. Closing the stream will initiate shutdown of the test client
328 /// and once the shutdown has finished, the OK status is sent to terminate
329 /// this RPC.
330 /// </summary>
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700331 AsyncDuplexStreamingCall<global::Grpc.Testing.ClientArgs, global::Grpc.Testing.ClientStatus> RunClient(CallOptions options);
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700332 /// <summary>
333 /// Just return the core count - unary call
334 /// </summary>
Jan Tattermusch1cbb5672016-02-18 14:27:28 -0800335 global::Grpc.Testing.CoreResponse CoreCount(global::Grpc.Testing.CoreRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700336 /// <summary>
337 /// Just return the core count - unary call
338 /// </summary>
Jan Tattermusch1cbb5672016-02-18 14:27:28 -0800339 global::Grpc.Testing.CoreResponse CoreCount(global::Grpc.Testing.CoreRequest request, CallOptions options);
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700340 /// <summary>
341 /// Just return the core count - unary call
342 /// </summary>
Jan Tattermusch1cbb5672016-02-18 14:27:28 -0800343 AsyncUnaryCall<global::Grpc.Testing.CoreResponse> CoreCountAsync(global::Grpc.Testing.CoreRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700344 /// <summary>
345 /// Just return the core count - unary call
346 /// </summary>
Jan Tattermusch1cbb5672016-02-18 14:27:28 -0800347 AsyncUnaryCall<global::Grpc.Testing.CoreResponse> CoreCountAsync(global::Grpc.Testing.CoreRequest request, CallOptions options);
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700348 /// <summary>
349 /// Quit this worker
350 /// </summary>
Jan Tattermusch1cbb5672016-02-18 14:27:28 -0800351 global::Grpc.Testing.Void QuitWorker(global::Grpc.Testing.Void request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700352 /// <summary>
353 /// Quit this worker
354 /// </summary>
Jan Tattermusch1cbb5672016-02-18 14:27:28 -0800355 global::Grpc.Testing.Void QuitWorker(global::Grpc.Testing.Void request, CallOptions options);
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700356 /// <summary>
357 /// Quit this worker
358 /// </summary>
Jan Tattermusch1cbb5672016-02-18 14:27:28 -0800359 AsyncUnaryCall<global::Grpc.Testing.Void> QuitWorkerAsync(global::Grpc.Testing.Void request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700360 /// <summary>
361 /// Quit this worker
362 /// </summary>
Jan Tattermusch1cbb5672016-02-18 14:27:28 -0800363 AsyncUnaryCall<global::Grpc.Testing.Void> QuitWorkerAsync(global::Grpc.Testing.Void request, CallOptions options);
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700364 }
365
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700366 /// <summary>Interface of server-side implementations of WorkerService</summary>
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700367 [System.Obsolete("Service implementations should inherit from the generated abstract base class instead.")]
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700368 public interface IWorkerService
369 {
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700370 /// <summary>
371 /// Start server with specified workload.
372 /// First request sent specifies the ServerConfig followed by ServerStatus
373 /// response. After that, a "Mark" can be sent anytime to request the latest
374 /// stats. Closing the stream will initiate shutdown of the test server
375 /// and once the shutdown has finished, the OK status is sent to terminate
376 /// this RPC.
377 /// </summary>
Jan Tattermuschd83f7912016-05-09 10:28:10 -0700378 global::System.Threading.Tasks.Task RunServer(IAsyncStreamReader<global::Grpc.Testing.ServerArgs> requestStream, IServerStreamWriter<global::Grpc.Testing.ServerStatus> responseStream, ServerCallContext context);
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700379 /// <summary>
380 /// Start client with specified workload.
381 /// First request sent specifies the ClientConfig followed by ClientStatus
382 /// response. After that, a "Mark" can be sent anytime to request the latest
383 /// stats. Closing the stream will initiate shutdown of the test client
384 /// and once the shutdown has finished, the OK status is sent to terminate
385 /// this RPC.
386 /// </summary>
Jan Tattermuschd83f7912016-05-09 10:28:10 -0700387 global::System.Threading.Tasks.Task RunClient(IAsyncStreamReader<global::Grpc.Testing.ClientArgs> requestStream, IServerStreamWriter<global::Grpc.Testing.ClientStatus> responseStream, ServerCallContext context);
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700388 /// <summary>
389 /// Just return the core count - unary call
390 /// </summary>
Jan Tattermuschd83f7912016-05-09 10:28:10 -0700391 global::System.Threading.Tasks.Task<global::Grpc.Testing.CoreResponse> CoreCount(global::Grpc.Testing.CoreRequest request, ServerCallContext context);
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700392 /// <summary>
393 /// Quit this worker
394 /// </summary>
Jan Tattermuschd83f7912016-05-09 10:28:10 -0700395 global::System.Threading.Tasks.Task<global::Grpc.Testing.Void> QuitWorker(global::Grpc.Testing.Void request, ServerCallContext context);
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700396 }
397
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700398 /// <summary>Base class for server-side implementations of WorkerService</summary>
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700399 public abstract class WorkerServiceBase
400 {
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700401 /// <summary>
402 /// Start server with specified workload.
403 /// First request sent specifies the ServerConfig followed by ServerStatus
404 /// response. After that, a "Mark" can be sent anytime to request the latest
405 /// stats. Closing the stream will initiate shutdown of the test server
406 /// and once the shutdown has finished, the OK status is sent to terminate
407 /// this RPC.
408 /// </summary>
Jan Tattermuschd83f7912016-05-09 10:28:10 -0700409 public virtual global::System.Threading.Tasks.Task RunServer(IAsyncStreamReader<global::Grpc.Testing.ServerArgs> requestStream, IServerStreamWriter<global::Grpc.Testing.ServerStatus> responseStream, ServerCallContext context)
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700410 {
411 throw new RpcException(new Status(StatusCode.Unimplemented, ""));
412 }
413
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700414 /// <summary>
415 /// Start client with specified workload.
416 /// First request sent specifies the ClientConfig followed by ClientStatus
417 /// response. After that, a "Mark" can be sent anytime to request the latest
418 /// stats. Closing the stream will initiate shutdown of the test client
419 /// and once the shutdown has finished, the OK status is sent to terminate
420 /// this RPC.
421 /// </summary>
Jan Tattermuschd83f7912016-05-09 10:28:10 -0700422 public virtual global::System.Threading.Tasks.Task RunClient(IAsyncStreamReader<global::Grpc.Testing.ClientArgs> requestStream, IServerStreamWriter<global::Grpc.Testing.ClientStatus> responseStream, ServerCallContext context)
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700423 {
424 throw new RpcException(new Status(StatusCode.Unimplemented, ""));
425 }
426
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700427 /// <summary>
428 /// Just return the core count - unary call
429 /// </summary>
Jan Tattermuschd83f7912016-05-09 10:28:10 -0700430 public virtual global::System.Threading.Tasks.Task<global::Grpc.Testing.CoreResponse> CoreCount(global::Grpc.Testing.CoreRequest request, ServerCallContext context)
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700431 {
432 throw new RpcException(new Status(StatusCode.Unimplemented, ""));
433 }
434
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700435 /// <summary>
436 /// Quit this worker
437 /// </summary>
Jan Tattermuschd83f7912016-05-09 10:28:10 -0700438 public virtual global::System.Threading.Tasks.Task<global::Grpc.Testing.Void> QuitWorker(global::Grpc.Testing.Void request, ServerCallContext context)
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700439 {
440 throw new RpcException(new Status(StatusCode.Unimplemented, ""));
441 }
442
443 }
444
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700445 /// <summary>Client for WorkerService</summary>
Jan Tattermusch55fad172016-04-25 13:42:28 -0700446 #pragma warning disable 0618
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700447 public class WorkerServiceClient : ClientBase<WorkerServiceClient>, IWorkerServiceClient
Jan Tattermusch55fad172016-04-25 13:42:28 -0700448 #pragma warning restore 0618
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700449 {
450 public WorkerServiceClient(Channel channel) : base(channel)
451 {
452 }
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700453 public WorkerServiceClient(CallInvoker callInvoker) : base(callInvoker)
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700454 {
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700455 }
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700456 ///<summary>Protected parameterless constructor to allow creation of test doubles.</summary>
457 protected WorkerServiceClient() : base()
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700458 {
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700459 }
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700460 ///<summary>Protected constructor to allow creation of configured clients.</summary>
461 protected WorkerServiceClient(ClientBaseConfiguration configuration) : base(configuration)
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700462 {
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700463 }
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700464
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700465 /// <summary>
466 /// Start server with specified workload.
467 /// First request sent specifies the ServerConfig followed by ServerStatus
468 /// response. After that, a "Mark" can be sent anytime to request the latest
469 /// stats. Closing the stream will initiate shutdown of the test server
470 /// and once the shutdown has finished, the OK status is sent to terminate
471 /// this RPC.
472 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700473 public virtual AsyncDuplexStreamingCall<global::Grpc.Testing.ServerArgs, global::Grpc.Testing.ServerStatus> RunServer(Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700474 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700475 return RunServer(new CallOptions(headers, deadline, cancellationToken));
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700476 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700477 /// <summary>
478 /// Start server with specified workload.
479 /// First request sent specifies the ServerConfig followed by ServerStatus
480 /// response. After that, a "Mark" can be sent anytime to request the latest
481 /// stats. Closing the stream will initiate shutdown of the test server
482 /// and once the shutdown has finished, the OK status is sent to terminate
483 /// this RPC.
484 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700485 public virtual AsyncDuplexStreamingCall<global::Grpc.Testing.ServerArgs, global::Grpc.Testing.ServerStatus> RunServer(CallOptions options)
Jan Tattermusch1cbb5672016-02-18 14:27:28 -0800486 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700487 return CallInvoker.AsyncDuplexStreamingCall(__Method_RunServer, null, options);
Jan Tattermusch1cbb5672016-02-18 14:27:28 -0800488 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700489 /// <summary>
490 /// Start client with specified workload.
491 /// First request sent specifies the ClientConfig followed by ClientStatus
492 /// response. After that, a "Mark" can be sent anytime to request the latest
493 /// stats. Closing the stream will initiate shutdown of the test client
494 /// and once the shutdown has finished, the OK status is sent to terminate
495 /// this RPC.
496 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700497 public virtual AsyncDuplexStreamingCall<global::Grpc.Testing.ClientArgs, global::Grpc.Testing.ClientStatus> RunClient(Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
Jan Tattermusch1cbb5672016-02-18 14:27:28 -0800498 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700499 return RunClient(new CallOptions(headers, deadline, cancellationToken));
Jan Tattermusch1cbb5672016-02-18 14:27:28 -0800500 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700501 /// <summary>
502 /// Start client with specified workload.
503 /// First request sent specifies the ClientConfig followed by ClientStatus
504 /// response. After that, a "Mark" can be sent anytime to request the latest
505 /// stats. Closing the stream will initiate shutdown of the test client
506 /// and once the shutdown has finished, the OK status is sent to terminate
507 /// this RPC.
508 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700509 public virtual AsyncDuplexStreamingCall<global::Grpc.Testing.ClientArgs, global::Grpc.Testing.ClientStatus> RunClient(CallOptions options)
Jan Tattermusch1cbb5672016-02-18 14:27:28 -0800510 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700511 return CallInvoker.AsyncDuplexStreamingCall(__Method_RunClient, null, options);
Jan Tattermusch1cbb5672016-02-18 14:27:28 -0800512 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700513 /// <summary>
514 /// Just return the core count - unary call
515 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700516 public virtual global::Grpc.Testing.CoreResponse CoreCount(global::Grpc.Testing.CoreRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
Jan Tattermusch1cbb5672016-02-18 14:27:28 -0800517 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700518 return CoreCount(request, new CallOptions(headers, deadline, cancellationToken));
Jan Tattermusch1cbb5672016-02-18 14:27:28 -0800519 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700520 /// <summary>
521 /// Just return the core count - unary call
522 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700523 public virtual global::Grpc.Testing.CoreResponse CoreCount(global::Grpc.Testing.CoreRequest request, CallOptions options)
Jan Tattermusch1cbb5672016-02-18 14:27:28 -0800524 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700525 return CallInvoker.BlockingUnaryCall(__Method_CoreCount, null, options, request);
Jan Tattermusch1cbb5672016-02-18 14:27:28 -0800526 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700527 /// <summary>
528 /// Just return the core count - unary call
529 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700530 public virtual AsyncUnaryCall<global::Grpc.Testing.CoreResponse> CoreCountAsync(global::Grpc.Testing.CoreRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
Jan Tattermusch1cbb5672016-02-18 14:27:28 -0800531 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700532 return CoreCountAsync(request, new CallOptions(headers, deadline, cancellationToken));
Jan Tattermusch1cbb5672016-02-18 14:27:28 -0800533 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700534 /// <summary>
535 /// Just return the core count - unary call
536 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700537 public virtual AsyncUnaryCall<global::Grpc.Testing.CoreResponse> CoreCountAsync(global::Grpc.Testing.CoreRequest request, CallOptions options)
Jan Tattermusch1cbb5672016-02-18 14:27:28 -0800538 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700539 return CallInvoker.AsyncUnaryCall(__Method_CoreCount, null, options, request);
Jan Tattermusch1cbb5672016-02-18 14:27:28 -0800540 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700541 /// <summary>
542 /// Quit this worker
543 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700544 public virtual global::Grpc.Testing.Void QuitWorker(global::Grpc.Testing.Void request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
Jan Tattermusch1cbb5672016-02-18 14:27:28 -0800545 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700546 return QuitWorker(request, new CallOptions(headers, deadline, cancellationToken));
547 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700548 /// <summary>
549 /// Quit this worker
550 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700551 public virtual global::Grpc.Testing.Void QuitWorker(global::Grpc.Testing.Void request, CallOptions options)
552 {
553 return CallInvoker.BlockingUnaryCall(__Method_QuitWorker, null, options, request);
554 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700555 /// <summary>
556 /// Quit this worker
557 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700558 public virtual AsyncUnaryCall<global::Grpc.Testing.Void> QuitWorkerAsync(global::Grpc.Testing.Void request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
559 {
560 return QuitWorkerAsync(request, new CallOptions(headers, deadline, cancellationToken));
561 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700562 /// <summary>
563 /// Quit this worker
564 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700565 public virtual AsyncUnaryCall<global::Grpc.Testing.Void> QuitWorkerAsync(global::Grpc.Testing.Void request, CallOptions options)
566 {
567 return CallInvoker.AsyncUnaryCall(__Method_QuitWorker, null, options, request);
568 }
569 protected override WorkerServiceClient NewInstance(ClientBaseConfiguration configuration)
570 {
571 return new WorkerServiceClient(configuration);
Jan Tattermusch1cbb5672016-02-18 14:27:28 -0800572 }
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700573 }
574
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700575 /// <summary>Creates a new client for WorkerService</summary>
Jan Tattermusch7c0e1ee2016-04-25 16:00:34 -0700576 public static WorkerServiceClient NewClient(Channel channel)
577 {
578 return new WorkerServiceClient(channel);
579 }
580
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700581 /// <summary>Creates service definition that can be registered with a server</summary>
Jan Tattermusch55fad172016-04-25 13:42:28 -0700582 #pragma warning disable 0618
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700583 public static ServerServiceDefinition BindService(IWorkerService serviceImpl)
Jan Tattermusch55fad172016-04-25 13:42:28 -0700584 #pragma warning restore 0618
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700585 {
586 return ServerServiceDefinition.CreateBuilder(__ServiceName)
587 .AddMethod(__Method_RunServer, serviceImpl.RunServer)
Jan Tattermusch1cbb5672016-02-18 14:27:28 -0800588 .AddMethod(__Method_RunClient, serviceImpl.RunClient)
589 .AddMethod(__Method_CoreCount, serviceImpl.CoreCount)
590 .AddMethod(__Method_QuitWorker, serviceImpl.QuitWorker).Build();
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700591 }
592
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700593 /// <summary>Creates service definition that can be registered with a server</summary>
Jan Tattermusch55fad172016-04-25 13:42:28 -0700594 #pragma warning disable 0618
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700595 public static ServerServiceDefinition BindService(WorkerServiceBase serviceImpl)
Jan Tattermusch55fad172016-04-25 13:42:28 -0700596 #pragma warning restore 0618
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700597 {
598 return ServerServiceDefinition.CreateBuilder(__ServiceName)
599 .AddMethod(__Method_RunServer, serviceImpl.RunServer)
600 .AddMethod(__Method_RunClient, serviceImpl.RunClient)
601 .AddMethod(__Method_CoreCount, serviceImpl.CoreCount)
602 .AddMethod(__Method_QuitWorker, serviceImpl.QuitWorker).Build();
603 }
604
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700605 }
606}
607#endregion