blob: 4efd35f81fd174e9e6ae3c1ab9d95f35c43c37da [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 Tattermusch7eb3a762015-05-07 14:26:13 -07003#region Designer generated code
4
5using System;
6using System.Threading;
7using System.Threading.Tasks;
8using Grpc.Core;
9
Jan Tattermusch5c42d8d2015-08-03 08:14:30 -070010namespace Grpc.Testing {
Jan Tattermusch7eb3a762015-05-07 14:26:13 -070011 public static class TestService
12 {
13 static readonly string __ServiceName = "grpc.testing.TestService";
14
Jan Tattermusch475f75a2015-08-03 09:46:04 -070015 static readonly Marshaller<global::Grpc.Testing.Empty> __Marshaller_Empty = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.Empty.Parser.ParseFrom);
16 static readonly Marshaller<global::Grpc.Testing.SimpleRequest> __Marshaller_SimpleRequest = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.SimpleRequest.Parser.ParseFrom);
17 static readonly Marshaller<global::Grpc.Testing.SimpleResponse> __Marshaller_SimpleResponse = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.SimpleResponse.Parser.ParseFrom);
18 static readonly Marshaller<global::Grpc.Testing.StreamingOutputCallRequest> __Marshaller_StreamingOutputCallRequest = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.StreamingOutputCallRequest.Parser.ParseFrom);
19 static readonly Marshaller<global::Grpc.Testing.StreamingOutputCallResponse> __Marshaller_StreamingOutputCallResponse = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.StreamingOutputCallResponse.Parser.ParseFrom);
20 static readonly Marshaller<global::Grpc.Testing.StreamingInputCallRequest> __Marshaller_StreamingInputCallRequest = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.StreamingInputCallRequest.Parser.ParseFrom);
21 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 -070022
Jan Tattermusch5c42d8d2015-08-03 08:14:30 -070023 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 -070024 MethodType.Unary,
Jan Tattermuschcc97fed2015-08-05 00:44:29 -070025 __ServiceName,
Jan Tattermusch7eb3a762015-05-07 14:26:13 -070026 "EmptyCall",
27 __Marshaller_Empty,
28 __Marshaller_Empty);
29
Jan Tattermusch5c42d8d2015-08-03 08:14:30 -070030 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 -070031 MethodType.Unary,
Jan Tattermuschcc97fed2015-08-05 00:44:29 -070032 __ServiceName,
Jan Tattermusch7eb3a762015-05-07 14:26:13 -070033 "UnaryCall",
34 __Marshaller_SimpleRequest,
35 __Marshaller_SimpleResponse);
36
Jan Tattermusch5c42d8d2015-08-03 08:14:30 -070037 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 -070038 MethodType.ServerStreaming,
Jan Tattermuschcc97fed2015-08-05 00:44:29 -070039 __ServiceName,
Jan Tattermusch7eb3a762015-05-07 14:26:13 -070040 "StreamingOutputCall",
41 __Marshaller_StreamingOutputCallRequest,
42 __Marshaller_StreamingOutputCallResponse);
43
Jan Tattermusch5c42d8d2015-08-03 08:14:30 -070044 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 -070045 MethodType.ClientStreaming,
Jan Tattermuschcc97fed2015-08-05 00:44:29 -070046 __ServiceName,
Jan Tattermusch7eb3a762015-05-07 14:26:13 -070047 "StreamingInputCall",
48 __Marshaller_StreamingInputCallRequest,
49 __Marshaller_StreamingInputCallResponse);
50
Jan Tattermusch5c42d8d2015-08-03 08:14:30 -070051 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 -070052 MethodType.DuplexStreaming,
Jan Tattermuschcc97fed2015-08-05 00:44:29 -070053 __ServiceName,
Jan Tattermusch7eb3a762015-05-07 14:26:13 -070054 "FullDuplexCall",
55 __Marshaller_StreamingOutputCallRequest,
56 __Marshaller_StreamingOutputCallResponse);
57
Jan Tattermusch5c42d8d2015-08-03 08:14:30 -070058 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 -070059 MethodType.DuplexStreaming,
Jan Tattermuschcc97fed2015-08-05 00:44:29 -070060 __ServiceName,
Jan Tattermusch7eb3a762015-05-07 14:26:13 -070061 "HalfDuplexCall",
62 __Marshaller_StreamingOutputCallRequest,
63 __Marshaller_StreamingOutputCallResponse);
64
Jan Tattermusche6af5d12015-08-03 10:57:43 -070065 // service descriptor
66 public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor
67 {
Jan Tattermusch72ce4422016-01-20 13:54:38 -080068 get { return global::Grpc.Testing.TestReflection.Descriptor.Services[0]; }
Jan Tattermusche6af5d12015-08-03 10:57:43 -070069 }
70
Jan Tattermuschb5332812015-07-14 19:29:35 -070071 // client interface
Jan Tattermuschddc4e342016-03-21 19:03:14 -070072 [System.Obsolete("Client side interfaced will be removed in the next release. Use client class directly.")]
Jan Tattermusch7eb3a762015-05-07 14:26:13 -070073 public interface ITestServiceClient
74 {
Jan Tattermusch5c42d8d2015-08-03 08:14:30 -070075 global::Grpc.Testing.Empty EmptyCall(global::Grpc.Testing.Empty request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
Jan Tattermusch38536a72015-08-08 00:45:52 -070076 global::Grpc.Testing.Empty EmptyCall(global::Grpc.Testing.Empty request, CallOptions options);
Jan Tattermusch5c42d8d2015-08-03 08:14:30 -070077 AsyncUnaryCall<global::Grpc.Testing.Empty> EmptyCallAsync(global::Grpc.Testing.Empty request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
Jan Tattermusch38536a72015-08-08 00:45:52 -070078 AsyncUnaryCall<global::Grpc.Testing.Empty> EmptyCallAsync(global::Grpc.Testing.Empty request, CallOptions options);
Jan Tattermusch5c42d8d2015-08-03 08:14:30 -070079 global::Grpc.Testing.SimpleResponse UnaryCall(global::Grpc.Testing.SimpleRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
Jan Tattermusch38536a72015-08-08 00:45:52 -070080 global::Grpc.Testing.SimpleResponse UnaryCall(global::Grpc.Testing.SimpleRequest request, CallOptions options);
Jan Tattermusch5c42d8d2015-08-03 08:14:30 -070081 AsyncUnaryCall<global::Grpc.Testing.SimpleResponse> UnaryCallAsync(global::Grpc.Testing.SimpleRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
Jan Tattermusch38536a72015-08-08 00:45:52 -070082 AsyncUnaryCall<global::Grpc.Testing.SimpleResponse> UnaryCallAsync(global::Grpc.Testing.SimpleRequest request, CallOptions options);
Jan Tattermusch5c42d8d2015-08-03 08:14:30 -070083 AsyncServerStreamingCall<global::Grpc.Testing.StreamingOutputCallResponse> StreamingOutputCall(global::Grpc.Testing.StreamingOutputCallRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
Jan Tattermusch38536a72015-08-08 00:45:52 -070084 AsyncServerStreamingCall<global::Grpc.Testing.StreamingOutputCallResponse> StreamingOutputCall(global::Grpc.Testing.StreamingOutputCallRequest request, CallOptions options);
Jan Tattermusch5c42d8d2015-08-03 08:14:30 -070085 AsyncClientStreamingCall<global::Grpc.Testing.StreamingInputCallRequest, global::Grpc.Testing.StreamingInputCallResponse> StreamingInputCall(Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
Jan Tattermusch38536a72015-08-08 00:45:52 -070086 AsyncClientStreamingCall<global::Grpc.Testing.StreamingInputCallRequest, global::Grpc.Testing.StreamingInputCallResponse> StreamingInputCall(CallOptions options);
Jan Tattermusch5c42d8d2015-08-03 08:14:30 -070087 AsyncDuplexStreamingCall<global::Grpc.Testing.StreamingOutputCallRequest, global::Grpc.Testing.StreamingOutputCallResponse> FullDuplexCall(Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
Jan Tattermusch38536a72015-08-08 00:45:52 -070088 AsyncDuplexStreamingCall<global::Grpc.Testing.StreamingOutputCallRequest, global::Grpc.Testing.StreamingOutputCallResponse> FullDuplexCall(CallOptions options);
Jan Tattermusch5c42d8d2015-08-03 08:14:30 -070089 AsyncDuplexStreamingCall<global::Grpc.Testing.StreamingOutputCallRequest, global::Grpc.Testing.StreamingOutputCallResponse> HalfDuplexCall(Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
Jan Tattermusch38536a72015-08-08 00:45:52 -070090 AsyncDuplexStreamingCall<global::Grpc.Testing.StreamingOutputCallRequest, global::Grpc.Testing.StreamingOutputCallResponse> HalfDuplexCall(CallOptions options);
Jan Tattermusch7eb3a762015-05-07 14:26:13 -070091 }
92
93 // server-side interface
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -070094 [System.Obsolete("Service implementations should inherit from the generated abstract base class instead.")]
Jan Tattermusch7eb3a762015-05-07 14:26:13 -070095 public interface ITestService
96 {
Jan Tattermusch5c42d8d2015-08-03 08:14:30 -070097 Task<global::Grpc.Testing.Empty> EmptyCall(global::Grpc.Testing.Empty request, ServerCallContext context);
98 Task<global::Grpc.Testing.SimpleResponse> UnaryCall(global::Grpc.Testing.SimpleRequest request, ServerCallContext context);
99 Task StreamingOutputCall(global::Grpc.Testing.StreamingOutputCallRequest request, IServerStreamWriter<global::Grpc.Testing.StreamingOutputCallResponse> responseStream, ServerCallContext context);
100 Task<global::Grpc.Testing.StreamingInputCallResponse> StreamingInputCall(IAsyncStreamReader<global::Grpc.Testing.StreamingInputCallRequest> requestStream, ServerCallContext context);
101 Task FullDuplexCall(IAsyncStreamReader<global::Grpc.Testing.StreamingOutputCallRequest> requestStream, IServerStreamWriter<global::Grpc.Testing.StreamingOutputCallResponse> responseStream, ServerCallContext context);
102 Task HalfDuplexCall(IAsyncStreamReader<global::Grpc.Testing.StreamingOutputCallRequest> requestStream, IServerStreamWriter<global::Grpc.Testing.StreamingOutputCallResponse> responseStream, ServerCallContext context);
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700103 }
104
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700105 // server-side abstract class
106 public abstract class TestServiceBase
107 {
108 public virtual Task<global::Grpc.Testing.Empty> EmptyCall(global::Grpc.Testing.Empty request, ServerCallContext context)
109 {
110 throw new RpcException(new Status(StatusCode.Unimplemented, ""));
111 }
112
113 public virtual Task<global::Grpc.Testing.SimpleResponse> UnaryCall(global::Grpc.Testing.SimpleRequest request, ServerCallContext context)
114 {
115 throw new RpcException(new Status(StatusCode.Unimplemented, ""));
116 }
117
118 public virtual Task StreamingOutputCall(global::Grpc.Testing.StreamingOutputCallRequest request, IServerStreamWriter<global::Grpc.Testing.StreamingOutputCallResponse> responseStream, ServerCallContext context)
119 {
120 throw new RpcException(new Status(StatusCode.Unimplemented, ""));
121 }
122
123 public virtual Task<global::Grpc.Testing.StreamingInputCallResponse> StreamingInputCall(IAsyncStreamReader<global::Grpc.Testing.StreamingInputCallRequest> requestStream, ServerCallContext context)
124 {
125 throw new RpcException(new Status(StatusCode.Unimplemented, ""));
126 }
127
128 public virtual Task FullDuplexCall(IAsyncStreamReader<global::Grpc.Testing.StreamingOutputCallRequest> requestStream, IServerStreamWriter<global::Grpc.Testing.StreamingOutputCallResponse> responseStream, ServerCallContext context)
129 {
130 throw new RpcException(new Status(StatusCode.Unimplemented, ""));
131 }
132
133 public virtual Task HalfDuplexCall(IAsyncStreamReader<global::Grpc.Testing.StreamingOutputCallRequest> requestStream, IServerStreamWriter<global::Grpc.Testing.StreamingOutputCallResponse> responseStream, ServerCallContext context)
134 {
135 throw new RpcException(new Status(StatusCode.Unimplemented, ""));
136 }
137
138 }
139
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700140 // client stub
Jan Tattermusch55fad172016-04-25 13:42:28 -0700141 #pragma warning disable 0618
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700142 public class TestServiceClient : ClientBase<TestServiceClient>, ITestServiceClient
Jan Tattermusch55fad172016-04-25 13:42:28 -0700143 #pragma warning restore 0618
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700144 {
Jan Tattermuschb5332812015-07-14 19:29:35 -0700145 public TestServiceClient(Channel channel) : base(channel)
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700146 {
147 }
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700148 public TestServiceClient(CallInvoker callInvoker) : base(callInvoker)
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700149 {
Jan Tattermuschcc97fed2015-08-05 00:44:29 -0700150 }
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700151 ///<summary>Protected parameterless constructor to allow creation of test doubles.</summary>
152 protected TestServiceClient() : base()
Jan Tattermuschcc97fed2015-08-05 00:44:29 -0700153 {
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700154 }
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700155 ///<summary>Protected constructor to allow creation of configured clients.</summary>
156 protected TestServiceClient(ClientBaseConfiguration configuration) : base(configuration)
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700157 {
Jan Tattermuschcc97fed2015-08-05 00:44:29 -0700158 }
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700159
160 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 -0700161 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700162 return EmptyCall(request, new CallOptions(headers, deadline, cancellationToken));
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700163 }
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700164 public virtual global::Grpc.Testing.Empty EmptyCall(global::Grpc.Testing.Empty request, CallOptions options)
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700165 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700166 return CallInvoker.BlockingUnaryCall(__Method_EmptyCall, null, options, request);
Jan Tattermuschcc97fed2015-08-05 00:44:29 -0700167 }
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700168 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 -0700169 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700170 return EmptyCallAsync(request, new CallOptions(headers, deadline, cancellationToken));
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700171 }
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700172 public virtual AsyncUnaryCall<global::Grpc.Testing.Empty> EmptyCallAsync(global::Grpc.Testing.Empty request, CallOptions options)
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700173 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700174 return CallInvoker.AsyncUnaryCall(__Method_EmptyCall, null, options, request);
Jan Tattermuschcc97fed2015-08-05 00:44:29 -0700175 }
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700176 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 -0700177 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700178 return UnaryCall(request, new CallOptions(headers, deadline, cancellationToken));
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700179 }
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700180 public virtual global::Grpc.Testing.SimpleResponse UnaryCall(global::Grpc.Testing.SimpleRequest request, CallOptions options)
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700181 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700182 return CallInvoker.BlockingUnaryCall(__Method_UnaryCall, null, options, request);
Jan Tattermuschcc97fed2015-08-05 00:44:29 -0700183 }
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700184 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 -0700185 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700186 return UnaryCallAsync(request, new CallOptions(headers, deadline, cancellationToken));
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700187 }
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700188 public virtual AsyncUnaryCall<global::Grpc.Testing.SimpleResponse> UnaryCallAsync(global::Grpc.Testing.SimpleRequest request, CallOptions options)
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700189 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700190 return CallInvoker.AsyncUnaryCall(__Method_UnaryCall, null, options, request);
Jan Tattermuschcc97fed2015-08-05 00:44:29 -0700191 }
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700192 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 -0700193 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700194 return StreamingOutputCall(request, new CallOptions(headers, deadline, cancellationToken));
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700195 }
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700196 public virtual AsyncServerStreamingCall<global::Grpc.Testing.StreamingOutputCallResponse> StreamingOutputCall(global::Grpc.Testing.StreamingOutputCallRequest request, CallOptions options)
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700197 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700198 return CallInvoker.AsyncServerStreamingCall(__Method_StreamingOutputCall, null, options, request);
Jan Tattermuschcc97fed2015-08-05 00:44:29 -0700199 }
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700200 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 -0700201 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700202 return StreamingInputCall(new CallOptions(headers, deadline, cancellationToken));
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700203 }
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700204 public virtual AsyncClientStreamingCall<global::Grpc.Testing.StreamingInputCallRequest, global::Grpc.Testing.StreamingInputCallResponse> StreamingInputCall(CallOptions options)
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700205 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700206 return CallInvoker.AsyncClientStreamingCall(__Method_StreamingInputCall, null, options);
Jan Tattermuschcc97fed2015-08-05 00:44:29 -0700207 }
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700208 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 -0700209 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700210 return FullDuplexCall(new CallOptions(headers, deadline, cancellationToken));
211 }
212 public virtual AsyncDuplexStreamingCall<global::Grpc.Testing.StreamingOutputCallRequest, global::Grpc.Testing.StreamingOutputCallResponse> FullDuplexCall(CallOptions options)
213 {
214 return CallInvoker.AsyncDuplexStreamingCall(__Method_FullDuplexCall, null, options);
215 }
216 public virtual AsyncDuplexStreamingCall<global::Grpc.Testing.StreamingOutputCallRequest, global::Grpc.Testing.StreamingOutputCallResponse> HalfDuplexCall(Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
217 {
218 return HalfDuplexCall(new CallOptions(headers, deadline, cancellationToken));
219 }
220 public virtual AsyncDuplexStreamingCall<global::Grpc.Testing.StreamingOutputCallRequest, global::Grpc.Testing.StreamingOutputCallResponse> HalfDuplexCall(CallOptions options)
221 {
222 return CallInvoker.AsyncDuplexStreamingCall(__Method_HalfDuplexCall, null, options);
223 }
224 protected override TestServiceClient NewInstance(ClientBaseConfiguration configuration)
225 {
226 return new TestServiceClient(configuration);
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700227 }
228 }
229
Jan Tattermusch7c0e1ee2016-04-25 16:00:34 -0700230 // creates a new client
231 public static TestServiceClient NewClient(Channel channel)
232 {
233 return new TestServiceClient(channel);
234 }
235
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700236 // creates service definition that can be registered with a server
Jan Tattermusch55fad172016-04-25 13:42:28 -0700237 #pragma warning disable 0618
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700238 public static ServerServiceDefinition BindService(ITestService serviceImpl)
Jan Tattermusch55fad172016-04-25 13:42:28 -0700239 #pragma warning restore 0618
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700240 {
241 return ServerServiceDefinition.CreateBuilder(__ServiceName)
242 .AddMethod(__Method_EmptyCall, serviceImpl.EmptyCall)
243 .AddMethod(__Method_UnaryCall, serviceImpl.UnaryCall)
244 .AddMethod(__Method_StreamingOutputCall, serviceImpl.StreamingOutputCall)
245 .AddMethod(__Method_StreamingInputCall, serviceImpl.StreamingInputCall)
246 .AddMethod(__Method_FullDuplexCall, serviceImpl.FullDuplexCall)
247 .AddMethod(__Method_HalfDuplexCall, serviceImpl.HalfDuplexCall).Build();
248 }
249
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700250 // creates service definition that can be registered with a server
Jan Tattermusch55fad172016-04-25 13:42:28 -0700251 #pragma warning disable 0618
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700252 public static ServerServiceDefinition BindService(TestServiceBase serviceImpl)
Jan Tattermusch55fad172016-04-25 13:42:28 -0700253 #pragma warning restore 0618
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700254 {
255 return ServerServiceDefinition.CreateBuilder(__ServiceName)
256 .AddMethod(__Method_EmptyCall, serviceImpl.EmptyCall)
257 .AddMethod(__Method_UnaryCall, serviceImpl.UnaryCall)
258 .AddMethod(__Method_StreamingOutputCall, serviceImpl.StreamingOutputCall)
259 .AddMethod(__Method_StreamingInputCall, serviceImpl.StreamingInputCall)
260 .AddMethod(__Method_FullDuplexCall, serviceImpl.FullDuplexCall)
261 .AddMethod(__Method_HalfDuplexCall, serviceImpl.HalfDuplexCall).Build();
262 }
263
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700264 }
Jan Tattermusch70f86522015-10-07 18:23:51 -0700265 public static class UnimplementedService
266 {
267 static readonly string __ServiceName = "grpc.testing.UnimplementedService";
268
269 static readonly Marshaller<global::Grpc.Testing.Empty> __Marshaller_Empty = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.Empty.Parser.ParseFrom);
270
271 static readonly Method<global::Grpc.Testing.Empty, global::Grpc.Testing.Empty> __Method_UnimplementedCall = new Method<global::Grpc.Testing.Empty, global::Grpc.Testing.Empty>(
272 MethodType.Unary,
273 __ServiceName,
274 "UnimplementedCall",
275 __Marshaller_Empty,
276 __Marshaller_Empty);
277
278 // service descriptor
279 public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor
280 {
Jan Tattermusch72ce4422016-01-20 13:54:38 -0800281 get { return global::Grpc.Testing.TestReflection.Descriptor.Services[1]; }
Jan Tattermusch70f86522015-10-07 18:23:51 -0700282 }
283
284 // client interface
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700285 [System.Obsolete("Client side interfaced will be removed in the next release. Use client class directly.")]
Jan Tattermusch70f86522015-10-07 18:23:51 -0700286 public interface IUnimplementedServiceClient
287 {
288 global::Grpc.Testing.Empty UnimplementedCall(global::Grpc.Testing.Empty request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
289 global::Grpc.Testing.Empty UnimplementedCall(global::Grpc.Testing.Empty request, CallOptions options);
290 AsyncUnaryCall<global::Grpc.Testing.Empty> UnimplementedCallAsync(global::Grpc.Testing.Empty request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
291 AsyncUnaryCall<global::Grpc.Testing.Empty> UnimplementedCallAsync(global::Grpc.Testing.Empty request, CallOptions options);
292 }
293
294 // server-side interface
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700295 [System.Obsolete("Service implementations should inherit from the generated abstract base class instead.")]
Jan Tattermusch70f86522015-10-07 18:23:51 -0700296 public interface IUnimplementedService
297 {
298 Task<global::Grpc.Testing.Empty> UnimplementedCall(global::Grpc.Testing.Empty request, ServerCallContext context);
299 }
300
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700301 // server-side abstract class
302 public abstract class UnimplementedServiceBase
303 {
304 public virtual Task<global::Grpc.Testing.Empty> UnimplementedCall(global::Grpc.Testing.Empty request, ServerCallContext context)
305 {
306 throw new RpcException(new Status(StatusCode.Unimplemented, ""));
307 }
308
309 }
310
Jan Tattermusch70f86522015-10-07 18:23:51 -0700311 // client stub
Jan Tattermusch55fad172016-04-25 13:42:28 -0700312 #pragma warning disable 0618
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700313 public class UnimplementedServiceClient : ClientBase<UnimplementedServiceClient>, IUnimplementedServiceClient
Jan Tattermusch55fad172016-04-25 13:42:28 -0700314 #pragma warning restore 0618
Jan Tattermusch70f86522015-10-07 18:23:51 -0700315 {
316 public UnimplementedServiceClient(Channel channel) : base(channel)
317 {
318 }
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700319 public UnimplementedServiceClient(CallInvoker callInvoker) : base(callInvoker)
Jan Tattermusch70f86522015-10-07 18:23:51 -0700320 {
Jan Tattermusch70f86522015-10-07 18:23:51 -0700321 }
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700322 ///<summary>Protected parameterless constructor to allow creation of test doubles.</summary>
323 protected UnimplementedServiceClient() : base()
Jan Tattermusch70f86522015-10-07 18:23:51 -0700324 {
Jan Tattermusch70f86522015-10-07 18:23:51 -0700325 }
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700326 ///<summary>Protected constructor to allow creation of configured clients.</summary>
327 protected UnimplementedServiceClient(ClientBaseConfiguration configuration) : base(configuration)
Jan Tattermusch70f86522015-10-07 18:23:51 -0700328 {
Jan Tattermusch70f86522015-10-07 18:23:51 -0700329 }
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700330
331 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 -0700332 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700333 return UnimplementedCall(request, new CallOptions(headers, deadline, cancellationToken));
334 }
335 public virtual global::Grpc.Testing.Empty UnimplementedCall(global::Grpc.Testing.Empty request, CallOptions options)
336 {
337 return CallInvoker.BlockingUnaryCall(__Method_UnimplementedCall, null, options, request);
338 }
339 public virtual AsyncUnaryCall<global::Grpc.Testing.Empty> UnimplementedCallAsync(global::Grpc.Testing.Empty request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
340 {
341 return UnimplementedCallAsync(request, new CallOptions(headers, deadline, cancellationToken));
342 }
343 public virtual AsyncUnaryCall<global::Grpc.Testing.Empty> UnimplementedCallAsync(global::Grpc.Testing.Empty request, CallOptions options)
344 {
345 return CallInvoker.AsyncUnaryCall(__Method_UnimplementedCall, null, options, request);
346 }
347 protected override UnimplementedServiceClient NewInstance(ClientBaseConfiguration configuration)
348 {
349 return new UnimplementedServiceClient(configuration);
Jan Tattermusch70f86522015-10-07 18:23:51 -0700350 }
351 }
352
Jan Tattermusch7c0e1ee2016-04-25 16:00:34 -0700353 // creates a new client
354 public static UnimplementedServiceClient NewClient(Channel channel)
355 {
356 return new UnimplementedServiceClient(channel);
357 }
358
Jan Tattermusch70f86522015-10-07 18:23:51 -0700359 // creates service definition that can be registered with a server
Jan Tattermusch55fad172016-04-25 13:42:28 -0700360 #pragma warning disable 0618
Jan Tattermusch70f86522015-10-07 18:23:51 -0700361 public static ServerServiceDefinition BindService(IUnimplementedService serviceImpl)
Jan Tattermusch55fad172016-04-25 13:42:28 -0700362 #pragma warning restore 0618
Jan Tattermusch70f86522015-10-07 18:23:51 -0700363 {
364 return ServerServiceDefinition.CreateBuilder(__ServiceName)
365 .AddMethod(__Method_UnimplementedCall, serviceImpl.UnimplementedCall).Build();
366 }
367
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700368 // creates service definition that can be registered with a server
Jan Tattermusch55fad172016-04-25 13:42:28 -0700369 #pragma warning disable 0618
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700370 public static ServerServiceDefinition BindService(UnimplementedServiceBase serviceImpl)
Jan Tattermusch55fad172016-04-25 13:42:28 -0700371 #pragma warning restore 0618
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700372 {
373 return ServerServiceDefinition.CreateBuilder(__ServiceName)
374 .AddMethod(__Method_UnimplementedCall, serviceImpl.UnimplementedCall).Build();
375 }
376
Jan Tattermusch70f86522015-10-07 18:23:51 -0700377 }
378 public static class ReconnectService
379 {
380 static readonly string __ServiceName = "grpc.testing.ReconnectService";
381
vjpai87bac952016-04-20 09:35:35 -0700382 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 -0700383 static readonly Marshaller<global::Grpc.Testing.Empty> __Marshaller_Empty = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.Empty.Parser.ParseFrom);
384 static readonly Marshaller<global::Grpc.Testing.ReconnectInfo> __Marshaller_ReconnectInfo = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.ReconnectInfo.Parser.ParseFrom);
385
vjpai87bac952016-04-20 09:35:35 -0700386 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 -0700387 MethodType.Unary,
388 __ServiceName,
389 "Start",
vjpai87bac952016-04-20 09:35:35 -0700390 __Marshaller_ReconnectParams,
Jan Tattermusch70f86522015-10-07 18:23:51 -0700391 __Marshaller_Empty);
392
393 static readonly Method<global::Grpc.Testing.Empty, global::Grpc.Testing.ReconnectInfo> __Method_Stop = new Method<global::Grpc.Testing.Empty, global::Grpc.Testing.ReconnectInfo>(
394 MethodType.Unary,
395 __ServiceName,
396 "Stop",
397 __Marshaller_Empty,
398 __Marshaller_ReconnectInfo);
399
400 // service descriptor
401 public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor
402 {
Jan Tattermusch72ce4422016-01-20 13:54:38 -0800403 get { return global::Grpc.Testing.TestReflection.Descriptor.Services[2]; }
Jan Tattermusch70f86522015-10-07 18:23:51 -0700404 }
405
406 // client interface
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700407 [System.Obsolete("Client side interfaced will be removed in the next release. Use client class directly.")]
Jan Tattermusch70f86522015-10-07 18:23:51 -0700408 public interface IReconnectServiceClient
409 {
vjpai87bac952016-04-20 09:35:35 -0700410 global::Grpc.Testing.Empty Start(global::Grpc.Testing.ReconnectParams request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
411 global::Grpc.Testing.Empty Start(global::Grpc.Testing.ReconnectParams request, CallOptions options);
412 AsyncUnaryCall<global::Grpc.Testing.Empty> StartAsync(global::Grpc.Testing.ReconnectParams request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
413 AsyncUnaryCall<global::Grpc.Testing.Empty> StartAsync(global::Grpc.Testing.ReconnectParams request, CallOptions options);
Jan Tattermusch70f86522015-10-07 18:23:51 -0700414 global::Grpc.Testing.ReconnectInfo Stop(global::Grpc.Testing.Empty request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
415 global::Grpc.Testing.ReconnectInfo Stop(global::Grpc.Testing.Empty request, CallOptions options);
416 AsyncUnaryCall<global::Grpc.Testing.ReconnectInfo> StopAsync(global::Grpc.Testing.Empty request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
417 AsyncUnaryCall<global::Grpc.Testing.ReconnectInfo> StopAsync(global::Grpc.Testing.Empty request, CallOptions options);
418 }
419
420 // server-side interface
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700421 [System.Obsolete("Service implementations should inherit from the generated abstract base class instead.")]
Jan Tattermusch70f86522015-10-07 18:23:51 -0700422 public interface IReconnectService
423 {
vjpai87bac952016-04-20 09:35:35 -0700424 Task<global::Grpc.Testing.Empty> Start(global::Grpc.Testing.ReconnectParams request, ServerCallContext context);
Jan Tattermusch70f86522015-10-07 18:23:51 -0700425 Task<global::Grpc.Testing.ReconnectInfo> Stop(global::Grpc.Testing.Empty request, ServerCallContext context);
426 }
427
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700428 // server-side abstract class
429 public abstract class ReconnectServiceBase
430 {
vjpai87bac952016-04-20 09:35:35 -0700431 public virtual Task<global::Grpc.Testing.Empty> Start(global::Grpc.Testing.ReconnectParams request, ServerCallContext context)
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700432 {
433 throw new RpcException(new Status(StatusCode.Unimplemented, ""));
434 }
435
436 public virtual Task<global::Grpc.Testing.ReconnectInfo> Stop(global::Grpc.Testing.Empty request, ServerCallContext context)
437 {
438 throw new RpcException(new Status(StatusCode.Unimplemented, ""));
439 }
440
441 }
442
Jan Tattermusch70f86522015-10-07 18:23:51 -0700443 // client stub
Jan Tattermusch55fad172016-04-25 13:42:28 -0700444 #pragma warning disable 0618
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700445 public class ReconnectServiceClient : ClientBase<ReconnectServiceClient>, IReconnectServiceClient
Jan Tattermusch55fad172016-04-25 13:42:28 -0700446 #pragma warning restore 0618
Jan Tattermusch70f86522015-10-07 18:23:51 -0700447 {
448 public ReconnectServiceClient(Channel channel) : base(channel)
449 {
450 }
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700451 public ReconnectServiceClient(CallInvoker callInvoker) : base(callInvoker)
Jan Tattermusch70f86522015-10-07 18:23:51 -0700452 {
Jan Tattermusch70f86522015-10-07 18:23:51 -0700453 }
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700454 ///<summary>Protected parameterless constructor to allow creation of test doubles.</summary>
455 protected ReconnectServiceClient() : base()
Jan Tattermusch70f86522015-10-07 18:23:51 -0700456 {
Jan Tattermusch70f86522015-10-07 18:23:51 -0700457 }
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700458 ///<summary>Protected constructor to allow creation of configured clients.</summary>
459 protected ReconnectServiceClient(ClientBaseConfiguration configuration) : base(configuration)
Jan Tattermusch70f86522015-10-07 18:23:51 -0700460 {
Jan Tattermusch70f86522015-10-07 18:23:51 -0700461 }
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700462
vjpai87bac952016-04-20 09:35:35 -0700463 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 -0700464 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700465 return Start(request, new CallOptions(headers, deadline, cancellationToken));
Jan Tattermusch70f86522015-10-07 18:23:51 -0700466 }
vjpai87bac952016-04-20 09:35:35 -0700467 public virtual global::Grpc.Testing.Empty Start(global::Grpc.Testing.ReconnectParams request, CallOptions options)
Jan Tattermusch70f86522015-10-07 18:23:51 -0700468 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700469 return CallInvoker.BlockingUnaryCall(__Method_Start, null, options, request);
Jan Tattermusch70f86522015-10-07 18:23:51 -0700470 }
vjpai87bac952016-04-20 09:35:35 -0700471 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 -0700472 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700473 return StartAsync(request, new CallOptions(headers, deadline, cancellationToken));
Jan Tattermusch70f86522015-10-07 18:23:51 -0700474 }
vjpai87bac952016-04-20 09:35:35 -0700475 public virtual AsyncUnaryCall<global::Grpc.Testing.Empty> StartAsync(global::Grpc.Testing.ReconnectParams request, CallOptions options)
Jan Tattermusch70f86522015-10-07 18:23:51 -0700476 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700477 return CallInvoker.AsyncUnaryCall(__Method_Start, null, options, request);
Jan Tattermusch70f86522015-10-07 18:23:51 -0700478 }
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700479 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 -0700480 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700481 return Stop(request, new CallOptions(headers, deadline, cancellationToken));
482 }
483 public virtual global::Grpc.Testing.ReconnectInfo Stop(global::Grpc.Testing.Empty request, CallOptions options)
484 {
485 return CallInvoker.BlockingUnaryCall(__Method_Stop, null, options, request);
486 }
487 public virtual AsyncUnaryCall<global::Grpc.Testing.ReconnectInfo> StopAsync(global::Grpc.Testing.Empty request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
488 {
489 return StopAsync(request, new CallOptions(headers, deadline, cancellationToken));
490 }
491 public virtual AsyncUnaryCall<global::Grpc.Testing.ReconnectInfo> StopAsync(global::Grpc.Testing.Empty request, CallOptions options)
492 {
493 return CallInvoker.AsyncUnaryCall(__Method_Stop, null, options, request);
494 }
495 protected override ReconnectServiceClient NewInstance(ClientBaseConfiguration configuration)
496 {
497 return new ReconnectServiceClient(configuration);
Jan Tattermusch70f86522015-10-07 18:23:51 -0700498 }
499 }
500
Jan Tattermusch7c0e1ee2016-04-25 16:00:34 -0700501 // creates a new client
502 public static ReconnectServiceClient NewClient(Channel channel)
503 {
504 return new ReconnectServiceClient(channel);
505 }
506
Jan Tattermusch70f86522015-10-07 18:23:51 -0700507 // creates service definition that can be registered with a server
Jan Tattermusch55fad172016-04-25 13:42:28 -0700508 #pragma warning disable 0618
Jan Tattermusch70f86522015-10-07 18:23:51 -0700509 public static ServerServiceDefinition BindService(IReconnectService serviceImpl)
Jan Tattermusch55fad172016-04-25 13:42:28 -0700510 #pragma warning restore 0618
Jan Tattermusch70f86522015-10-07 18:23:51 -0700511 {
512 return ServerServiceDefinition.CreateBuilder(__ServiceName)
513 .AddMethod(__Method_Start, serviceImpl.Start)
514 .AddMethod(__Method_Stop, serviceImpl.Stop).Build();
515 }
516
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700517 // creates service definition that can be registered with a server
Jan Tattermusch55fad172016-04-25 13:42:28 -0700518 #pragma warning disable 0618
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700519 public static ServerServiceDefinition BindService(ReconnectServiceBase serviceImpl)
Jan Tattermusch55fad172016-04-25 13:42:28 -0700520 #pragma warning restore 0618
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700521 {
522 return ServerServiceDefinition.CreateBuilder(__ServiceName)
523 .AddMethod(__Method_Start, serviceImpl.Start)
524 .AddMethod(__Method_Stop, serviceImpl.Stop).Build();
525 }
526
Jan Tattermusch70f86522015-10-07 18:23:51 -0700527 }
Jan Tattermusch7eb3a762015-05-07 14:26:13 -0700528}
Jan Tattermuschcd7e3132015-05-07 15:10:23 -0700529#endregion