Jan Tattermusch | 7eb3a76 | 2015-05-07 14:26:13 -0700 | [diff] [blame] | 1 | // Generated by the protocol buffer compiler. DO NOT EDIT! |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 2 | // source: src/proto/grpc/testing/test.proto |
Jan Tattermusch | bfee01d | 2016-04-28 10:52:41 -0700 | [diff] [blame] | 3 | // Original file comments: |
Jan Tattermusch | 4d5c310 | 2017-06-07 10:23:56 +0200 | [diff] [blame] | 4 | // Copyright 2015-2016 gRPC authors. |
Jan Tattermusch | bfee01d | 2016-04-28 10:52:41 -0700 | [diff] [blame] | 5 | // |
Jan Tattermusch | 4d5c310 | 2017-06-07 10:23:56 +0200 | [diff] [blame] | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 7 | // you may not use this file except in compliance with the License. |
| 8 | // You may obtain a copy of the License at |
Jan Tattermusch | bfee01d | 2016-04-28 10:52:41 -0700 | [diff] [blame] | 9 | // |
Jan Tattermusch | 4d5c310 | 2017-06-07 10:23:56 +0200 | [diff] [blame] | 10 | // http://www.apache.org/licenses/LICENSE-2.0 |
Jan Tattermusch | bfee01d | 2016-04-28 10:52:41 -0700 | [diff] [blame] | 11 | // |
Jan Tattermusch | 4d5c310 | 2017-06-07 10:23:56 +0200 | [diff] [blame] | 12 | // Unless required by applicable law or agreed to in writing, software |
| 13 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 15 | // See the License for the specific language governing permissions and |
| 16 | // limitations under the License. |
Jan Tattermusch | bfee01d | 2016-04-28 10:52:41 -0700 | [diff] [blame] | 17 | // |
| 18 | // An integration test service that covers all the method signature permutations |
| 19 | // of unary/streaming requests/responses. |
| 20 | // |
Jan Tattermusch | ca25473 | 2017-08-09 08:47:34 +0200 | [diff] [blame] | 21 | #pragma warning disable 1591 |
Jan Tattermusch | 7eb3a76 | 2015-05-07 14:26:13 -0700 | [diff] [blame] | 22 | #region Designer generated code |
| 23 | |
| 24 | using System; |
| 25 | using System.Threading; |
| 26 | using System.Threading.Tasks; |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 27 | using grpc = global::Grpc.Core; |
Jan Tattermusch | 7eb3a76 | 2015-05-07 14:26:13 -0700 | [diff] [blame] | 28 | |
Jan Tattermusch | 5c42d8d | 2015-08-03 08:14:30 -0700 | [diff] [blame] | 29 | namespace Grpc.Testing { |
Jan Tattermusch | bfee01d | 2016-04-28 10:52:41 -0700 | [diff] [blame] | 30 | /// <summary> |
Jan Tattermusch | 726f40f | 2016-12-12 12:09:35 +0100 | [diff] [blame] | 31 | /// A simple service to test the various types of RPCs and experiment with |
| 32 | /// performance with various types of payload. |
Jan Tattermusch | bfee01d | 2016-04-28 10:52:41 -0700 | [diff] [blame] | 33 | /// </summary> |
Alexander Polcyn | c0f4c2c | 2016-11-07 10:24:35 -0800 | [diff] [blame] | 34 | public static partial class TestService |
Jan Tattermusch | 7eb3a76 | 2015-05-07 14:26:13 -0700 | [diff] [blame] | 35 | { |
| 36 | static readonly string __ServiceName = "grpc.testing.TestService"; |
| 37 | |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 38 | static readonly grpc::Marshaller<global::Grpc.Testing.Empty> __Marshaller_Empty = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.Empty.Parser.ParseFrom); |
| 39 | static readonly grpc::Marshaller<global::Grpc.Testing.SimpleRequest> __Marshaller_SimpleRequest = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.SimpleRequest.Parser.ParseFrom); |
| 40 | static readonly grpc::Marshaller<global::Grpc.Testing.SimpleResponse> __Marshaller_SimpleResponse = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.SimpleResponse.Parser.ParseFrom); |
| 41 | static readonly grpc::Marshaller<global::Grpc.Testing.StreamingOutputCallRequest> __Marshaller_StreamingOutputCallRequest = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.StreamingOutputCallRequest.Parser.ParseFrom); |
| 42 | static readonly grpc::Marshaller<global::Grpc.Testing.StreamingOutputCallResponse> __Marshaller_StreamingOutputCallResponse = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.StreamingOutputCallResponse.Parser.ParseFrom); |
| 43 | static readonly grpc::Marshaller<global::Grpc.Testing.StreamingInputCallRequest> __Marshaller_StreamingInputCallRequest = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.StreamingInputCallRequest.Parser.ParseFrom); |
| 44 | static readonly grpc::Marshaller<global::Grpc.Testing.StreamingInputCallResponse> __Marshaller_StreamingInputCallResponse = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.StreamingInputCallResponse.Parser.ParseFrom); |
Jan Tattermusch | 7eb3a76 | 2015-05-07 14:26:13 -0700 | [diff] [blame] | 45 | |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 46 | static readonly grpc::Method<global::Grpc.Testing.Empty, global::Grpc.Testing.Empty> __Method_EmptyCall = new grpc::Method<global::Grpc.Testing.Empty, global::Grpc.Testing.Empty>( |
| 47 | grpc::MethodType.Unary, |
Jan Tattermusch | cc97fed | 2015-08-05 00:44:29 -0700 | [diff] [blame] | 48 | __ServiceName, |
Jan Tattermusch | 7eb3a76 | 2015-05-07 14:26:13 -0700 | [diff] [blame] | 49 | "EmptyCall", |
| 50 | __Marshaller_Empty, |
| 51 | __Marshaller_Empty); |
| 52 | |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 53 | static readonly grpc::Method<global::Grpc.Testing.SimpleRequest, global::Grpc.Testing.SimpleResponse> __Method_UnaryCall = new grpc::Method<global::Grpc.Testing.SimpleRequest, global::Grpc.Testing.SimpleResponse>( |
| 54 | grpc::MethodType.Unary, |
Jan Tattermusch | cc97fed | 2015-08-05 00:44:29 -0700 | [diff] [blame] | 55 | __ServiceName, |
Jan Tattermusch | 7eb3a76 | 2015-05-07 14:26:13 -0700 | [diff] [blame] | 56 | "UnaryCall", |
| 57 | __Marshaller_SimpleRequest, |
| 58 | __Marshaller_SimpleResponse); |
| 59 | |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 60 | static readonly grpc::Method<global::Grpc.Testing.SimpleRequest, global::Grpc.Testing.SimpleResponse> __Method_CacheableUnaryCall = new grpc::Method<global::Grpc.Testing.SimpleRequest, global::Grpc.Testing.SimpleResponse>( |
| 61 | grpc::MethodType.Unary, |
Noah Eisen | b2a2647 | 2016-10-21 16:43:57 -0700 | [diff] [blame] | 62 | __ServiceName, |
| 63 | "CacheableUnaryCall", |
| 64 | __Marshaller_SimpleRequest, |
| 65 | __Marshaller_SimpleResponse); |
| 66 | |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 67 | static readonly grpc::Method<global::Grpc.Testing.StreamingOutputCallRequest, global::Grpc.Testing.StreamingOutputCallResponse> __Method_StreamingOutputCall = new grpc::Method<global::Grpc.Testing.StreamingOutputCallRequest, global::Grpc.Testing.StreamingOutputCallResponse>( |
| 68 | grpc::MethodType.ServerStreaming, |
Jan Tattermusch | cc97fed | 2015-08-05 00:44:29 -0700 | [diff] [blame] | 69 | __ServiceName, |
Jan Tattermusch | 7eb3a76 | 2015-05-07 14:26:13 -0700 | [diff] [blame] | 70 | "StreamingOutputCall", |
| 71 | __Marshaller_StreamingOutputCallRequest, |
| 72 | __Marshaller_StreamingOutputCallResponse); |
| 73 | |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 74 | static readonly grpc::Method<global::Grpc.Testing.StreamingInputCallRequest, global::Grpc.Testing.StreamingInputCallResponse> __Method_StreamingInputCall = new grpc::Method<global::Grpc.Testing.StreamingInputCallRequest, global::Grpc.Testing.StreamingInputCallResponse>( |
| 75 | grpc::MethodType.ClientStreaming, |
Jan Tattermusch | cc97fed | 2015-08-05 00:44:29 -0700 | [diff] [blame] | 76 | __ServiceName, |
Jan Tattermusch | 7eb3a76 | 2015-05-07 14:26:13 -0700 | [diff] [blame] | 77 | "StreamingInputCall", |
| 78 | __Marshaller_StreamingInputCallRequest, |
| 79 | __Marshaller_StreamingInputCallResponse); |
| 80 | |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 81 | static readonly grpc::Method<global::Grpc.Testing.StreamingOutputCallRequest, global::Grpc.Testing.StreamingOutputCallResponse> __Method_FullDuplexCall = new grpc::Method<global::Grpc.Testing.StreamingOutputCallRequest, global::Grpc.Testing.StreamingOutputCallResponse>( |
| 82 | grpc::MethodType.DuplexStreaming, |
Jan Tattermusch | cc97fed | 2015-08-05 00:44:29 -0700 | [diff] [blame] | 83 | __ServiceName, |
Jan Tattermusch | 7eb3a76 | 2015-05-07 14:26:13 -0700 | [diff] [blame] | 84 | "FullDuplexCall", |
| 85 | __Marshaller_StreamingOutputCallRequest, |
| 86 | __Marshaller_StreamingOutputCallResponse); |
| 87 | |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 88 | static readonly grpc::Method<global::Grpc.Testing.StreamingOutputCallRequest, global::Grpc.Testing.StreamingOutputCallResponse> __Method_HalfDuplexCall = new grpc::Method<global::Grpc.Testing.StreamingOutputCallRequest, global::Grpc.Testing.StreamingOutputCallResponse>( |
| 89 | grpc::MethodType.DuplexStreaming, |
Jan Tattermusch | cc97fed | 2015-08-05 00:44:29 -0700 | [diff] [blame] | 90 | __ServiceName, |
Jan Tattermusch | 7eb3a76 | 2015-05-07 14:26:13 -0700 | [diff] [blame] | 91 | "HalfDuplexCall", |
| 92 | __Marshaller_StreamingOutputCallRequest, |
| 93 | __Marshaller_StreamingOutputCallResponse); |
| 94 | |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 95 | static readonly grpc::Method<global::Grpc.Testing.Empty, global::Grpc.Testing.Empty> __Method_UnimplementedCall = new grpc::Method<global::Grpc.Testing.Empty, global::Grpc.Testing.Empty>( |
| 96 | grpc::MethodType.Unary, |
Noah Eisen | b2a2647 | 2016-10-21 16:43:57 -0700 | [diff] [blame] | 97 | __ServiceName, |
| 98 | "UnimplementedCall", |
| 99 | __Marshaller_Empty, |
| 100 | __Marshaller_Empty); |
| 101 | |
Jan Tattermusch | bfee01d | 2016-04-28 10:52:41 -0700 | [diff] [blame] | 102 | /// <summary>Service descriptor</summary> |
Jan Tattermusch | e6af5d1 | 2015-08-03 10:57:43 -0700 | [diff] [blame] | 103 | public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor |
| 104 | { |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 105 | get { return global::Grpc.Testing.TestReflection.Descriptor.Services[0]; } |
Jan Tattermusch | e6af5d1 | 2015-08-03 10:57:43 -0700 | [diff] [blame] | 106 | } |
| 107 | |
Jan Tattermusch | bfee01d | 2016-04-28 10:52:41 -0700 | [diff] [blame] | 108 | /// <summary>Base class for server-side implementations of TestService</summary> |
Alexander Polcyn | c0f4c2c | 2016-11-07 10:24:35 -0800 | [diff] [blame] | 109 | public abstract partial class TestServiceBase |
Jan Tattermusch | eeef5ed | 2016-03-14 16:08:39 -0700 | [diff] [blame] | 110 | { |
Jan Tattermusch | bfee01d | 2016-04-28 10:52:41 -0700 | [diff] [blame] | 111 | /// <summary> |
Jan Tattermusch | 726f40f | 2016-12-12 12:09:35 +0100 | [diff] [blame] | 112 | /// One empty request followed by one empty response. |
Jan Tattermusch | bfee01d | 2016-04-28 10:52:41 -0700 | [diff] [blame] | 113 | /// </summary> |
Jan Tattermusch | 00f6636 | 2016-12-12 13:02:29 +0100 | [diff] [blame] | 114 | /// <param name="request">The request received from the client.</param> |
| 115 | /// <param name="context">The context of the server-side call handler being invoked.</param> |
| 116 | /// <returns>The response to send back to the client (wrapped by a task).</returns> |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 117 | public virtual global::System.Threading.Tasks.Task<global::Grpc.Testing.Empty> EmptyCall(global::Grpc.Testing.Empty request, grpc::ServerCallContext context) |
Jan Tattermusch | eeef5ed | 2016-03-14 16:08:39 -0700 | [diff] [blame] | 118 | { |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 119 | throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); |
Jan Tattermusch | eeef5ed | 2016-03-14 16:08:39 -0700 | [diff] [blame] | 120 | } |
| 121 | |
Jan Tattermusch | bfee01d | 2016-04-28 10:52:41 -0700 | [diff] [blame] | 122 | /// <summary> |
Jan Tattermusch | 726f40f | 2016-12-12 12:09:35 +0100 | [diff] [blame] | 123 | /// One request followed by one response. |
Jan Tattermusch | bfee01d | 2016-04-28 10:52:41 -0700 | [diff] [blame] | 124 | /// </summary> |
Jan Tattermusch | 00f6636 | 2016-12-12 13:02:29 +0100 | [diff] [blame] | 125 | /// <param name="request">The request received from the client.</param> |
| 126 | /// <param name="context">The context of the server-side call handler being invoked.</param> |
| 127 | /// <returns>The response to send back to the client (wrapped by a task).</returns> |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 128 | public virtual global::System.Threading.Tasks.Task<global::Grpc.Testing.SimpleResponse> UnaryCall(global::Grpc.Testing.SimpleRequest request, grpc::ServerCallContext context) |
Jan Tattermusch | eeef5ed | 2016-03-14 16:08:39 -0700 | [diff] [blame] | 129 | { |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 130 | throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); |
Jan Tattermusch | eeef5ed | 2016-03-14 16:08:39 -0700 | [diff] [blame] | 131 | } |
| 132 | |
Jan Tattermusch | bfee01d | 2016-04-28 10:52:41 -0700 | [diff] [blame] | 133 | /// <summary> |
Jan Tattermusch | 726f40f | 2016-12-12 12:09:35 +0100 | [diff] [blame] | 134 | /// One request followed by one response. Response has cache control |
| 135 | /// headers set such that a caching HTTP proxy (such as GFE) can |
| 136 | /// satisfy subsequent requests. |
Noah Eisen | b2a2647 | 2016-10-21 16:43:57 -0700 | [diff] [blame] | 137 | /// </summary> |
Jan Tattermusch | 00f6636 | 2016-12-12 13:02:29 +0100 | [diff] [blame] | 138 | /// <param name="request">The request received from the client.</param> |
| 139 | /// <param name="context">The context of the server-side call handler being invoked.</param> |
| 140 | /// <returns>The response to send back to the client (wrapped by a task).</returns> |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 141 | public virtual global::System.Threading.Tasks.Task<global::Grpc.Testing.SimpleResponse> CacheableUnaryCall(global::Grpc.Testing.SimpleRequest request, grpc::ServerCallContext context) |
Noah Eisen | b2a2647 | 2016-10-21 16:43:57 -0700 | [diff] [blame] | 142 | { |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 143 | throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); |
Noah Eisen | b2a2647 | 2016-10-21 16:43:57 -0700 | [diff] [blame] | 144 | } |
| 145 | |
| 146 | /// <summary> |
Jan Tattermusch | 726f40f | 2016-12-12 12:09:35 +0100 | [diff] [blame] | 147 | /// One request followed by a sequence of responses (streamed download). |
| 148 | /// The server returns the payload with client desired type and sizes. |
Jan Tattermusch | bfee01d | 2016-04-28 10:52:41 -0700 | [diff] [blame] | 149 | /// </summary> |
Jan Tattermusch | 00f6636 | 2016-12-12 13:02:29 +0100 | [diff] [blame] | 150 | /// <param name="request">The request received from the client.</param> |
| 151 | /// <param name="responseStream">Used for sending responses back to the client.</param> |
| 152 | /// <param name="context">The context of the server-side call handler being invoked.</param> |
| 153 | /// <returns>A task indicating completion of the handler.</returns> |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 154 | public virtual global::System.Threading.Tasks.Task StreamingOutputCall(global::Grpc.Testing.StreamingOutputCallRequest request, grpc::IServerStreamWriter<global::Grpc.Testing.StreamingOutputCallResponse> responseStream, grpc::ServerCallContext context) |
Jan Tattermusch | eeef5ed | 2016-03-14 16:08:39 -0700 | [diff] [blame] | 155 | { |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 156 | throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); |
Jan Tattermusch | eeef5ed | 2016-03-14 16:08:39 -0700 | [diff] [blame] | 157 | } |
| 158 | |
Jan Tattermusch | bfee01d | 2016-04-28 10:52:41 -0700 | [diff] [blame] | 159 | /// <summary> |
Jan Tattermusch | 726f40f | 2016-12-12 12:09:35 +0100 | [diff] [blame] | 160 | /// A sequence of requests followed by one response (streamed upload). |
| 161 | /// The server returns the aggregated size of client payload as the result. |
Jan Tattermusch | bfee01d | 2016-04-28 10:52:41 -0700 | [diff] [blame] | 162 | /// </summary> |
Jan Tattermusch | 00f6636 | 2016-12-12 13:02:29 +0100 | [diff] [blame] | 163 | /// <param name="requestStream">Used for reading requests from the client.</param> |
| 164 | /// <param name="context">The context of the server-side call handler being invoked.</param> |
| 165 | /// <returns>The response to send back to the client (wrapped by a task).</returns> |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 166 | public virtual global::System.Threading.Tasks.Task<global::Grpc.Testing.StreamingInputCallResponse> StreamingInputCall(grpc::IAsyncStreamReader<global::Grpc.Testing.StreamingInputCallRequest> requestStream, grpc::ServerCallContext context) |
Jan Tattermusch | eeef5ed | 2016-03-14 16:08:39 -0700 | [diff] [blame] | 167 | { |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 168 | throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); |
Jan Tattermusch | eeef5ed | 2016-03-14 16:08:39 -0700 | [diff] [blame] | 169 | } |
| 170 | |
Jan Tattermusch | bfee01d | 2016-04-28 10:52:41 -0700 | [diff] [blame] | 171 | /// <summary> |
Jan Tattermusch | 726f40f | 2016-12-12 12:09:35 +0100 | [diff] [blame] | 172 | /// A sequence of requests with each request served by the server immediately. |
| 173 | /// As one request could lead to multiple responses, this interface |
| 174 | /// demonstrates the idea of full duplexing. |
Jan Tattermusch | bfee01d | 2016-04-28 10:52:41 -0700 | [diff] [blame] | 175 | /// </summary> |
Jan Tattermusch | 00f6636 | 2016-12-12 13:02:29 +0100 | [diff] [blame] | 176 | /// <param name="requestStream">Used for reading requests from the client.</param> |
| 177 | /// <param name="responseStream">Used for sending responses back to the client.</param> |
| 178 | /// <param name="context">The context of the server-side call handler being invoked.</param> |
| 179 | /// <returns>A task indicating completion of the handler.</returns> |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 180 | public virtual global::System.Threading.Tasks.Task FullDuplexCall(grpc::IAsyncStreamReader<global::Grpc.Testing.StreamingOutputCallRequest> requestStream, grpc::IServerStreamWriter<global::Grpc.Testing.StreamingOutputCallResponse> responseStream, grpc::ServerCallContext context) |
Jan Tattermusch | eeef5ed | 2016-03-14 16:08:39 -0700 | [diff] [blame] | 181 | { |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 182 | throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); |
Jan Tattermusch | eeef5ed | 2016-03-14 16:08:39 -0700 | [diff] [blame] | 183 | } |
| 184 | |
Jan Tattermusch | bfee01d | 2016-04-28 10:52:41 -0700 | [diff] [blame] | 185 | /// <summary> |
Jan Tattermusch | 726f40f | 2016-12-12 12:09:35 +0100 | [diff] [blame] | 186 | /// A sequence of requests followed by a sequence of responses. |
| 187 | /// The server buffers all the client requests and then serves them in order. A |
| 188 | /// stream of responses are returned to the client when the server starts with |
| 189 | /// first request. |
Jan Tattermusch | bfee01d | 2016-04-28 10:52:41 -0700 | [diff] [blame] | 190 | /// </summary> |
Jan Tattermusch | 00f6636 | 2016-12-12 13:02:29 +0100 | [diff] [blame] | 191 | /// <param name="requestStream">Used for reading requests from the client.</param> |
| 192 | /// <param name="responseStream">Used for sending responses back to the client.</param> |
| 193 | /// <param name="context">The context of the server-side call handler being invoked.</param> |
| 194 | /// <returns>A task indicating completion of the handler.</returns> |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 195 | public virtual global::System.Threading.Tasks.Task HalfDuplexCall(grpc::IAsyncStreamReader<global::Grpc.Testing.StreamingOutputCallRequest> requestStream, grpc::IServerStreamWriter<global::Grpc.Testing.StreamingOutputCallResponse> responseStream, grpc::ServerCallContext context) |
Jan Tattermusch | eeef5ed | 2016-03-14 16:08:39 -0700 | [diff] [blame] | 196 | { |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 197 | throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); |
Jan Tattermusch | eeef5ed | 2016-03-14 16:08:39 -0700 | [diff] [blame] | 198 | } |
| 199 | |
Noah Eisen | b2a2647 | 2016-10-21 16:43:57 -0700 | [diff] [blame] | 200 | /// <summary> |
Jan Tattermusch | 726f40f | 2016-12-12 12:09:35 +0100 | [diff] [blame] | 201 | /// The test server will not implement this method. It will be used |
| 202 | /// to test the behavior when clients call unimplemented methods. |
Noah Eisen | b2a2647 | 2016-10-21 16:43:57 -0700 | [diff] [blame] | 203 | /// </summary> |
Jan Tattermusch | 00f6636 | 2016-12-12 13:02:29 +0100 | [diff] [blame] | 204 | /// <param name="request">The request received from the client.</param> |
| 205 | /// <param name="context">The context of the server-side call handler being invoked.</param> |
| 206 | /// <returns>The response to send back to the client (wrapped by a task).</returns> |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 207 | public virtual global::System.Threading.Tasks.Task<global::Grpc.Testing.Empty> UnimplementedCall(global::Grpc.Testing.Empty request, grpc::ServerCallContext context) |
Noah Eisen | b2a2647 | 2016-10-21 16:43:57 -0700 | [diff] [blame] | 208 | { |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 209 | throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); |
Noah Eisen | b2a2647 | 2016-10-21 16:43:57 -0700 | [diff] [blame] | 210 | } |
| 211 | |
Jan Tattermusch | eeef5ed | 2016-03-14 16:08:39 -0700 | [diff] [blame] | 212 | } |
| 213 | |
Jan Tattermusch | bfee01d | 2016-04-28 10:52:41 -0700 | [diff] [blame] | 214 | /// <summary>Client for TestService</summary> |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 215 | public partial class TestServiceClient : grpc::ClientBase<TestServiceClient> |
Jan Tattermusch | 7eb3a76 | 2015-05-07 14:26:13 -0700 | [diff] [blame] | 216 | { |
Jan Tattermusch | ed6ea4c | 2016-06-22 12:38:44 -0700 | [diff] [blame] | 217 | /// <summary>Creates a new client for TestService</summary> |
| 218 | /// <param name="channel">The channel to use to make remote calls.</param> |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 219 | public TestServiceClient(grpc::Channel channel) : base(channel) |
Jan Tattermusch | 7eb3a76 | 2015-05-07 14:26:13 -0700 | [diff] [blame] | 220 | { |
| 221 | } |
Jan Tattermusch | ed6ea4c | 2016-06-22 12:38:44 -0700 | [diff] [blame] | 222 | /// <summary>Creates a new client for TestService that uses a custom <c>CallInvoker</c>.</summary> |
| 223 | /// <param name="callInvoker">The callInvoker to use to make remote calls.</param> |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 224 | public TestServiceClient(grpc::CallInvoker callInvoker) : base(callInvoker) |
Jan Tattermusch | 7eb3a76 | 2015-05-07 14:26:13 -0700 | [diff] [blame] | 225 | { |
Jan Tattermusch | cc97fed | 2015-08-05 00:44:29 -0700 | [diff] [blame] | 226 | } |
Jan Tattermusch | ed6ea4c | 2016-06-22 12:38:44 -0700 | [diff] [blame] | 227 | /// <summary>Protected parameterless constructor to allow creation of test doubles.</summary> |
Jan Tattermusch | ddc4e34 | 2016-03-21 19:03:14 -0700 | [diff] [blame] | 228 | protected TestServiceClient() : base() |
Jan Tattermusch | cc97fed | 2015-08-05 00:44:29 -0700 | [diff] [blame] | 229 | { |
Jan Tattermusch | 7eb3a76 | 2015-05-07 14:26:13 -0700 | [diff] [blame] | 230 | } |
Jan Tattermusch | ed6ea4c | 2016-06-22 12:38:44 -0700 | [diff] [blame] | 231 | /// <summary>Protected constructor to allow creation of configured clients.</summary> |
| 232 | /// <param name="configuration">The client configuration.</param> |
Jan Tattermusch | ddc4e34 | 2016-03-21 19:03:14 -0700 | [diff] [blame] | 233 | protected TestServiceClient(ClientBaseConfiguration configuration) : base(configuration) |
Jan Tattermusch | 7eb3a76 | 2015-05-07 14:26:13 -0700 | [diff] [blame] | 234 | { |
Jan Tattermusch | cc97fed | 2015-08-05 00:44:29 -0700 | [diff] [blame] | 235 | } |
Jan Tattermusch | ddc4e34 | 2016-03-21 19:03:14 -0700 | [diff] [blame] | 236 | |
Jan Tattermusch | bfee01d | 2016-04-28 10:52:41 -0700 | [diff] [blame] | 237 | /// <summary> |
Jan Tattermusch | 726f40f | 2016-12-12 12:09:35 +0100 | [diff] [blame] | 238 | /// One empty request followed by one empty response. |
Jan Tattermusch | bfee01d | 2016-04-28 10:52:41 -0700 | [diff] [blame] | 239 | /// </summary> |
Jan Tattermusch | 00f6636 | 2016-12-12 13:02:29 +0100 | [diff] [blame] | 240 | /// <param name="request">The request to send to the server.</param> |
| 241 | /// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param> |
| 242 | /// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param> |
| 243 | /// <param name="cancellationToken">An optional token for canceling the call.</param> |
| 244 | /// <returns>The response received from the server.</returns> |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 245 | public virtual global::Grpc.Testing.Empty EmptyCall(global::Grpc.Testing.Empty request, grpc::Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)) |
Jan Tattermusch | cc97fed | 2015-08-05 00:44:29 -0700 | [diff] [blame] | 246 | { |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 247 | return EmptyCall(request, new grpc::CallOptions(headers, deadline, cancellationToken)); |
Jan Tattermusch | 7eb3a76 | 2015-05-07 14:26:13 -0700 | [diff] [blame] | 248 | } |
Jan Tattermusch | bfee01d | 2016-04-28 10:52:41 -0700 | [diff] [blame] | 249 | /// <summary> |
Jan Tattermusch | 726f40f | 2016-12-12 12:09:35 +0100 | [diff] [blame] | 250 | /// One empty request followed by one empty response. |
Jan Tattermusch | bfee01d | 2016-04-28 10:52:41 -0700 | [diff] [blame] | 251 | /// </summary> |
Jan Tattermusch | 00f6636 | 2016-12-12 13:02:29 +0100 | [diff] [blame] | 252 | /// <param name="request">The request to send to the server.</param> |
| 253 | /// <param name="options">The options for the call.</param> |
| 254 | /// <returns>The response received from the server.</returns> |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 255 | public virtual global::Grpc.Testing.Empty EmptyCall(global::Grpc.Testing.Empty request, grpc::CallOptions options) |
Jan Tattermusch | 7eb3a76 | 2015-05-07 14:26:13 -0700 | [diff] [blame] | 256 | { |
Jan Tattermusch | ddc4e34 | 2016-03-21 19:03:14 -0700 | [diff] [blame] | 257 | return CallInvoker.BlockingUnaryCall(__Method_EmptyCall, null, options, request); |
Jan Tattermusch | cc97fed | 2015-08-05 00:44:29 -0700 | [diff] [blame] | 258 | } |
Jan Tattermusch | bfee01d | 2016-04-28 10:52:41 -0700 | [diff] [blame] | 259 | /// <summary> |
Jan Tattermusch | 726f40f | 2016-12-12 12:09:35 +0100 | [diff] [blame] | 260 | /// One empty request followed by one empty response. |
Jan Tattermusch | bfee01d | 2016-04-28 10:52:41 -0700 | [diff] [blame] | 261 | /// </summary> |
Jan Tattermusch | 00f6636 | 2016-12-12 13:02:29 +0100 | [diff] [blame] | 262 | /// <param name="request">The request to send to the server.</param> |
| 263 | /// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param> |
| 264 | /// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param> |
| 265 | /// <param name="cancellationToken">An optional token for canceling the call.</param> |
| 266 | /// <returns>The call object.</returns> |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 267 | public virtual grpc::AsyncUnaryCall<global::Grpc.Testing.Empty> EmptyCallAsync(global::Grpc.Testing.Empty request, grpc::Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)) |
Jan Tattermusch | cc97fed | 2015-08-05 00:44:29 -0700 | [diff] [blame] | 268 | { |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 269 | return EmptyCallAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); |
Jan Tattermusch | 7eb3a76 | 2015-05-07 14:26:13 -0700 | [diff] [blame] | 270 | } |
Jan Tattermusch | bfee01d | 2016-04-28 10:52:41 -0700 | [diff] [blame] | 271 | /// <summary> |
Jan Tattermusch | 726f40f | 2016-12-12 12:09:35 +0100 | [diff] [blame] | 272 | /// One empty request followed by one empty response. |
Jan Tattermusch | bfee01d | 2016-04-28 10:52:41 -0700 | [diff] [blame] | 273 | /// </summary> |
Jan Tattermusch | 00f6636 | 2016-12-12 13:02:29 +0100 | [diff] [blame] | 274 | /// <param name="request">The request to send to the server.</param> |
| 275 | /// <param name="options">The options for the call.</param> |
| 276 | /// <returns>The call object.</returns> |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 277 | public virtual grpc::AsyncUnaryCall<global::Grpc.Testing.Empty> EmptyCallAsync(global::Grpc.Testing.Empty request, grpc::CallOptions options) |
Jan Tattermusch | 7eb3a76 | 2015-05-07 14:26:13 -0700 | [diff] [blame] | 278 | { |
Jan Tattermusch | ddc4e34 | 2016-03-21 19:03:14 -0700 | [diff] [blame] | 279 | return CallInvoker.AsyncUnaryCall(__Method_EmptyCall, null, options, request); |
Jan Tattermusch | cc97fed | 2015-08-05 00:44:29 -0700 | [diff] [blame] | 280 | } |
Jan Tattermusch | bfee01d | 2016-04-28 10:52:41 -0700 | [diff] [blame] | 281 | /// <summary> |
Jan Tattermusch | 726f40f | 2016-12-12 12:09:35 +0100 | [diff] [blame] | 282 | /// One request followed by one response. |
Jan Tattermusch | bfee01d | 2016-04-28 10:52:41 -0700 | [diff] [blame] | 283 | /// </summary> |
Jan Tattermusch | 00f6636 | 2016-12-12 13:02:29 +0100 | [diff] [blame] | 284 | /// <param name="request">The request to send to the server.</param> |
| 285 | /// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param> |
| 286 | /// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param> |
| 287 | /// <param name="cancellationToken">An optional token for canceling the call.</param> |
| 288 | /// <returns>The response received from the server.</returns> |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 289 | public virtual global::Grpc.Testing.SimpleResponse UnaryCall(global::Grpc.Testing.SimpleRequest request, grpc::Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)) |
Jan Tattermusch | cc97fed | 2015-08-05 00:44:29 -0700 | [diff] [blame] | 290 | { |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 291 | return UnaryCall(request, new grpc::CallOptions(headers, deadline, cancellationToken)); |
Jan Tattermusch | 7eb3a76 | 2015-05-07 14:26:13 -0700 | [diff] [blame] | 292 | } |
Jan Tattermusch | bfee01d | 2016-04-28 10:52:41 -0700 | [diff] [blame] | 293 | /// <summary> |
Jan Tattermusch | 726f40f | 2016-12-12 12:09:35 +0100 | [diff] [blame] | 294 | /// One request followed by one response. |
Jan Tattermusch | bfee01d | 2016-04-28 10:52:41 -0700 | [diff] [blame] | 295 | /// </summary> |
Jan Tattermusch | 00f6636 | 2016-12-12 13:02:29 +0100 | [diff] [blame] | 296 | /// <param name="request">The request to send to the server.</param> |
| 297 | /// <param name="options">The options for the call.</param> |
| 298 | /// <returns>The response received from the server.</returns> |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 299 | public virtual global::Grpc.Testing.SimpleResponse UnaryCall(global::Grpc.Testing.SimpleRequest request, grpc::CallOptions options) |
Jan Tattermusch | 7eb3a76 | 2015-05-07 14:26:13 -0700 | [diff] [blame] | 300 | { |
Jan Tattermusch | ddc4e34 | 2016-03-21 19:03:14 -0700 | [diff] [blame] | 301 | return CallInvoker.BlockingUnaryCall(__Method_UnaryCall, null, options, request); |
Jan Tattermusch | cc97fed | 2015-08-05 00:44:29 -0700 | [diff] [blame] | 302 | } |
Jan Tattermusch | bfee01d | 2016-04-28 10:52:41 -0700 | [diff] [blame] | 303 | /// <summary> |
Jan Tattermusch | 726f40f | 2016-12-12 12:09:35 +0100 | [diff] [blame] | 304 | /// One request followed by one response. |
Jan Tattermusch | bfee01d | 2016-04-28 10:52:41 -0700 | [diff] [blame] | 305 | /// </summary> |
Jan Tattermusch | 00f6636 | 2016-12-12 13:02:29 +0100 | [diff] [blame] | 306 | /// <param name="request">The request to send to the server.</param> |
| 307 | /// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param> |
| 308 | /// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param> |
| 309 | /// <param name="cancellationToken">An optional token for canceling the call.</param> |
| 310 | /// <returns>The call object.</returns> |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 311 | public virtual grpc::AsyncUnaryCall<global::Grpc.Testing.SimpleResponse> UnaryCallAsync(global::Grpc.Testing.SimpleRequest request, grpc::Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)) |
Jan Tattermusch | cc97fed | 2015-08-05 00:44:29 -0700 | [diff] [blame] | 312 | { |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 313 | return UnaryCallAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); |
Jan Tattermusch | 7eb3a76 | 2015-05-07 14:26:13 -0700 | [diff] [blame] | 314 | } |
Jan Tattermusch | bfee01d | 2016-04-28 10:52:41 -0700 | [diff] [blame] | 315 | /// <summary> |
Jan Tattermusch | 726f40f | 2016-12-12 12:09:35 +0100 | [diff] [blame] | 316 | /// One request followed by one response. |
Jan Tattermusch | bfee01d | 2016-04-28 10:52:41 -0700 | [diff] [blame] | 317 | /// </summary> |
Jan Tattermusch | 00f6636 | 2016-12-12 13:02:29 +0100 | [diff] [blame] | 318 | /// <param name="request">The request to send to the server.</param> |
| 319 | /// <param name="options">The options for the call.</param> |
| 320 | /// <returns>The call object.</returns> |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 321 | public virtual grpc::AsyncUnaryCall<global::Grpc.Testing.SimpleResponse> UnaryCallAsync(global::Grpc.Testing.SimpleRequest request, grpc::CallOptions options) |
Jan Tattermusch | 7eb3a76 | 2015-05-07 14:26:13 -0700 | [diff] [blame] | 322 | { |
Jan Tattermusch | ddc4e34 | 2016-03-21 19:03:14 -0700 | [diff] [blame] | 323 | return CallInvoker.AsyncUnaryCall(__Method_UnaryCall, null, options, request); |
Jan Tattermusch | cc97fed | 2015-08-05 00:44:29 -0700 | [diff] [blame] | 324 | } |
Jan Tattermusch | bfee01d | 2016-04-28 10:52:41 -0700 | [diff] [blame] | 325 | /// <summary> |
Jan Tattermusch | 726f40f | 2016-12-12 12:09:35 +0100 | [diff] [blame] | 326 | /// One request followed by one response. Response has cache control |
| 327 | /// headers set such that a caching HTTP proxy (such as GFE) can |
| 328 | /// satisfy subsequent requests. |
Noah Eisen | b2a2647 | 2016-10-21 16:43:57 -0700 | [diff] [blame] | 329 | /// </summary> |
Jan Tattermusch | 00f6636 | 2016-12-12 13:02:29 +0100 | [diff] [blame] | 330 | /// <param name="request">The request to send to the server.</param> |
| 331 | /// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param> |
| 332 | /// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param> |
| 333 | /// <param name="cancellationToken">An optional token for canceling the call.</param> |
| 334 | /// <returns>The response received from the server.</returns> |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 335 | public virtual global::Grpc.Testing.SimpleResponse CacheableUnaryCall(global::Grpc.Testing.SimpleRequest request, grpc::Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)) |
Noah Eisen | b2a2647 | 2016-10-21 16:43:57 -0700 | [diff] [blame] | 336 | { |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 337 | return CacheableUnaryCall(request, new grpc::CallOptions(headers, deadline, cancellationToken)); |
Noah Eisen | b2a2647 | 2016-10-21 16:43:57 -0700 | [diff] [blame] | 338 | } |
| 339 | /// <summary> |
Jan Tattermusch | 726f40f | 2016-12-12 12:09:35 +0100 | [diff] [blame] | 340 | /// One request followed by one response. Response has cache control |
| 341 | /// headers set such that a caching HTTP proxy (such as GFE) can |
| 342 | /// satisfy subsequent requests. |
Noah Eisen | b2a2647 | 2016-10-21 16:43:57 -0700 | [diff] [blame] | 343 | /// </summary> |
Jan Tattermusch | 00f6636 | 2016-12-12 13:02:29 +0100 | [diff] [blame] | 344 | /// <param name="request">The request to send to the server.</param> |
| 345 | /// <param name="options">The options for the call.</param> |
| 346 | /// <returns>The response received from the server.</returns> |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 347 | public virtual global::Grpc.Testing.SimpleResponse CacheableUnaryCall(global::Grpc.Testing.SimpleRequest request, grpc::CallOptions options) |
Noah Eisen | b2a2647 | 2016-10-21 16:43:57 -0700 | [diff] [blame] | 348 | { |
| 349 | return CallInvoker.BlockingUnaryCall(__Method_CacheableUnaryCall, null, options, request); |
| 350 | } |
| 351 | /// <summary> |
Jan Tattermusch | 726f40f | 2016-12-12 12:09:35 +0100 | [diff] [blame] | 352 | /// One request followed by one response. Response has cache control |
| 353 | /// headers set such that a caching HTTP proxy (such as GFE) can |
| 354 | /// satisfy subsequent requests. |
Noah Eisen | b2a2647 | 2016-10-21 16:43:57 -0700 | [diff] [blame] | 355 | /// </summary> |
Jan Tattermusch | 00f6636 | 2016-12-12 13:02:29 +0100 | [diff] [blame] | 356 | /// <param name="request">The request to send to the server.</param> |
| 357 | /// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param> |
| 358 | /// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param> |
| 359 | /// <param name="cancellationToken">An optional token for canceling the call.</param> |
| 360 | /// <returns>The call object.</returns> |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 361 | public virtual grpc::AsyncUnaryCall<global::Grpc.Testing.SimpleResponse> CacheableUnaryCallAsync(global::Grpc.Testing.SimpleRequest request, grpc::Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)) |
Noah Eisen | b2a2647 | 2016-10-21 16:43:57 -0700 | [diff] [blame] | 362 | { |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 363 | return CacheableUnaryCallAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); |
Noah Eisen | b2a2647 | 2016-10-21 16:43:57 -0700 | [diff] [blame] | 364 | } |
| 365 | /// <summary> |
Jan Tattermusch | 726f40f | 2016-12-12 12:09:35 +0100 | [diff] [blame] | 366 | /// One request followed by one response. Response has cache control |
| 367 | /// headers set such that a caching HTTP proxy (such as GFE) can |
| 368 | /// satisfy subsequent requests. |
Noah Eisen | b2a2647 | 2016-10-21 16:43:57 -0700 | [diff] [blame] | 369 | /// </summary> |
Jan Tattermusch | 00f6636 | 2016-12-12 13:02:29 +0100 | [diff] [blame] | 370 | /// <param name="request">The request to send to the server.</param> |
| 371 | /// <param name="options">The options for the call.</param> |
| 372 | /// <returns>The call object.</returns> |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 373 | public virtual grpc::AsyncUnaryCall<global::Grpc.Testing.SimpleResponse> CacheableUnaryCallAsync(global::Grpc.Testing.SimpleRequest request, grpc::CallOptions options) |
Noah Eisen | b2a2647 | 2016-10-21 16:43:57 -0700 | [diff] [blame] | 374 | { |
| 375 | return CallInvoker.AsyncUnaryCall(__Method_CacheableUnaryCall, null, options, request); |
| 376 | } |
| 377 | /// <summary> |
Jan Tattermusch | 726f40f | 2016-12-12 12:09:35 +0100 | [diff] [blame] | 378 | /// One request followed by a sequence of responses (streamed download). |
| 379 | /// The server returns the payload with client desired type and sizes. |
Jan Tattermusch | bfee01d | 2016-04-28 10:52:41 -0700 | [diff] [blame] | 380 | /// </summary> |
Jan Tattermusch | 00f6636 | 2016-12-12 13:02:29 +0100 | [diff] [blame] | 381 | /// <param name="request">The request to send to the server.</param> |
| 382 | /// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param> |
| 383 | /// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param> |
| 384 | /// <param name="cancellationToken">An optional token for canceling the call.</param> |
| 385 | /// <returns>The call object.</returns> |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 386 | public virtual grpc::AsyncServerStreamingCall<global::Grpc.Testing.StreamingOutputCallResponse> StreamingOutputCall(global::Grpc.Testing.StreamingOutputCallRequest request, grpc::Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)) |
Jan Tattermusch | cc97fed | 2015-08-05 00:44:29 -0700 | [diff] [blame] | 387 | { |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 388 | return StreamingOutputCall(request, new grpc::CallOptions(headers, deadline, cancellationToken)); |
Jan Tattermusch | 7eb3a76 | 2015-05-07 14:26:13 -0700 | [diff] [blame] | 389 | } |
Jan Tattermusch | bfee01d | 2016-04-28 10:52:41 -0700 | [diff] [blame] | 390 | /// <summary> |
Jan Tattermusch | 726f40f | 2016-12-12 12:09:35 +0100 | [diff] [blame] | 391 | /// One request followed by a sequence of responses (streamed download). |
| 392 | /// The server returns the payload with client desired type and sizes. |
Jan Tattermusch | bfee01d | 2016-04-28 10:52:41 -0700 | [diff] [blame] | 393 | /// </summary> |
Jan Tattermusch | 00f6636 | 2016-12-12 13:02:29 +0100 | [diff] [blame] | 394 | /// <param name="request">The request to send to the server.</param> |
| 395 | /// <param name="options">The options for the call.</param> |
| 396 | /// <returns>The call object.</returns> |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 397 | public virtual grpc::AsyncServerStreamingCall<global::Grpc.Testing.StreamingOutputCallResponse> StreamingOutputCall(global::Grpc.Testing.StreamingOutputCallRequest request, grpc::CallOptions options) |
Jan Tattermusch | 7eb3a76 | 2015-05-07 14:26:13 -0700 | [diff] [blame] | 398 | { |
Jan Tattermusch | ddc4e34 | 2016-03-21 19:03:14 -0700 | [diff] [blame] | 399 | return CallInvoker.AsyncServerStreamingCall(__Method_StreamingOutputCall, null, options, request); |
Jan Tattermusch | cc97fed | 2015-08-05 00:44:29 -0700 | [diff] [blame] | 400 | } |
Jan Tattermusch | bfee01d | 2016-04-28 10:52:41 -0700 | [diff] [blame] | 401 | /// <summary> |
Jan Tattermusch | 726f40f | 2016-12-12 12:09:35 +0100 | [diff] [blame] | 402 | /// A sequence of requests followed by one response (streamed upload). |
| 403 | /// The server returns the aggregated size of client payload as the result. |
Jan Tattermusch | bfee01d | 2016-04-28 10:52:41 -0700 | [diff] [blame] | 404 | /// </summary> |
Jan Tattermusch | 00f6636 | 2016-12-12 13:02:29 +0100 | [diff] [blame] | 405 | /// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param> |
| 406 | /// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param> |
| 407 | /// <param name="cancellationToken">An optional token for canceling the call.</param> |
| 408 | /// <returns>The call object.</returns> |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 409 | public virtual grpc::AsyncClientStreamingCall<global::Grpc.Testing.StreamingInputCallRequest, global::Grpc.Testing.StreamingInputCallResponse> StreamingInputCall(grpc::Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)) |
Jan Tattermusch | cc97fed | 2015-08-05 00:44:29 -0700 | [diff] [blame] | 410 | { |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 411 | return StreamingInputCall(new grpc::CallOptions(headers, deadline, cancellationToken)); |
Jan Tattermusch | 7eb3a76 | 2015-05-07 14:26:13 -0700 | [diff] [blame] | 412 | } |
Jan Tattermusch | bfee01d | 2016-04-28 10:52:41 -0700 | [diff] [blame] | 413 | /// <summary> |
Jan Tattermusch | 726f40f | 2016-12-12 12:09:35 +0100 | [diff] [blame] | 414 | /// A sequence of requests followed by one response (streamed upload). |
| 415 | /// The server returns the aggregated size of client payload as the result. |
Jan Tattermusch | bfee01d | 2016-04-28 10:52:41 -0700 | [diff] [blame] | 416 | /// </summary> |
Jan Tattermusch | 00f6636 | 2016-12-12 13:02:29 +0100 | [diff] [blame] | 417 | /// <param name="options">The options for the call.</param> |
| 418 | /// <returns>The call object.</returns> |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 419 | public virtual grpc::AsyncClientStreamingCall<global::Grpc.Testing.StreamingInputCallRequest, global::Grpc.Testing.StreamingInputCallResponse> StreamingInputCall(grpc::CallOptions options) |
Jan Tattermusch | 7eb3a76 | 2015-05-07 14:26:13 -0700 | [diff] [blame] | 420 | { |
Jan Tattermusch | ddc4e34 | 2016-03-21 19:03:14 -0700 | [diff] [blame] | 421 | return CallInvoker.AsyncClientStreamingCall(__Method_StreamingInputCall, null, options); |
Jan Tattermusch | cc97fed | 2015-08-05 00:44:29 -0700 | [diff] [blame] | 422 | } |
Jan Tattermusch | bfee01d | 2016-04-28 10:52:41 -0700 | [diff] [blame] | 423 | /// <summary> |
Jan Tattermusch | 726f40f | 2016-12-12 12:09:35 +0100 | [diff] [blame] | 424 | /// A sequence of requests with each request served by the server immediately. |
| 425 | /// As one request could lead to multiple responses, this interface |
| 426 | /// demonstrates the idea of full duplexing. |
Jan Tattermusch | bfee01d | 2016-04-28 10:52:41 -0700 | [diff] [blame] | 427 | /// </summary> |
Jan Tattermusch | 00f6636 | 2016-12-12 13:02:29 +0100 | [diff] [blame] | 428 | /// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param> |
| 429 | /// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param> |
| 430 | /// <param name="cancellationToken">An optional token for canceling the call.</param> |
| 431 | /// <returns>The call object.</returns> |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 432 | public virtual grpc::AsyncDuplexStreamingCall<global::Grpc.Testing.StreamingOutputCallRequest, global::Grpc.Testing.StreamingOutputCallResponse> FullDuplexCall(grpc::Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)) |
Jan Tattermusch | cc97fed | 2015-08-05 00:44:29 -0700 | [diff] [blame] | 433 | { |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 434 | return FullDuplexCall(new grpc::CallOptions(headers, deadline, cancellationToken)); |
Jan Tattermusch | ddc4e34 | 2016-03-21 19:03:14 -0700 | [diff] [blame] | 435 | } |
Jan Tattermusch | bfee01d | 2016-04-28 10:52:41 -0700 | [diff] [blame] | 436 | /// <summary> |
Jan Tattermusch | 726f40f | 2016-12-12 12:09:35 +0100 | [diff] [blame] | 437 | /// A sequence of requests with each request served by the server immediately. |
| 438 | /// As one request could lead to multiple responses, this interface |
| 439 | /// demonstrates the idea of full duplexing. |
Jan Tattermusch | bfee01d | 2016-04-28 10:52:41 -0700 | [diff] [blame] | 440 | /// </summary> |
Jan Tattermusch | 00f6636 | 2016-12-12 13:02:29 +0100 | [diff] [blame] | 441 | /// <param name="options">The options for the call.</param> |
| 442 | /// <returns>The call object.</returns> |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 443 | public virtual grpc::AsyncDuplexStreamingCall<global::Grpc.Testing.StreamingOutputCallRequest, global::Grpc.Testing.StreamingOutputCallResponse> FullDuplexCall(grpc::CallOptions options) |
Jan Tattermusch | ddc4e34 | 2016-03-21 19:03:14 -0700 | [diff] [blame] | 444 | { |
| 445 | return CallInvoker.AsyncDuplexStreamingCall(__Method_FullDuplexCall, null, options); |
| 446 | } |
Jan Tattermusch | bfee01d | 2016-04-28 10:52:41 -0700 | [diff] [blame] | 447 | /// <summary> |
Jan Tattermusch | 726f40f | 2016-12-12 12:09:35 +0100 | [diff] [blame] | 448 | /// A sequence of requests followed by a sequence of responses. |
| 449 | /// The server buffers all the client requests and then serves them in order. A |
| 450 | /// stream of responses are returned to the client when the server starts with |
| 451 | /// first request. |
Jan Tattermusch | bfee01d | 2016-04-28 10:52:41 -0700 | [diff] [blame] | 452 | /// </summary> |
Jan Tattermusch | 00f6636 | 2016-12-12 13:02:29 +0100 | [diff] [blame] | 453 | /// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param> |
| 454 | /// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param> |
| 455 | /// <param name="cancellationToken">An optional token for canceling the call.</param> |
| 456 | /// <returns>The call object.</returns> |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 457 | public virtual grpc::AsyncDuplexStreamingCall<global::Grpc.Testing.StreamingOutputCallRequest, global::Grpc.Testing.StreamingOutputCallResponse> HalfDuplexCall(grpc::Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)) |
Jan Tattermusch | ddc4e34 | 2016-03-21 19:03:14 -0700 | [diff] [blame] | 458 | { |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 459 | return HalfDuplexCall(new grpc::CallOptions(headers, deadline, cancellationToken)); |
Jan Tattermusch | ddc4e34 | 2016-03-21 19:03:14 -0700 | [diff] [blame] | 460 | } |
Jan Tattermusch | bfee01d | 2016-04-28 10:52:41 -0700 | [diff] [blame] | 461 | /// <summary> |
Jan Tattermusch | 726f40f | 2016-12-12 12:09:35 +0100 | [diff] [blame] | 462 | /// A sequence of requests followed by a sequence of responses. |
| 463 | /// The server buffers all the client requests and then serves them in order. A |
| 464 | /// stream of responses are returned to the client when the server starts with |
| 465 | /// first request. |
Jan Tattermusch | bfee01d | 2016-04-28 10:52:41 -0700 | [diff] [blame] | 466 | /// </summary> |
Jan Tattermusch | 00f6636 | 2016-12-12 13:02:29 +0100 | [diff] [blame] | 467 | /// <param name="options">The options for the call.</param> |
| 468 | /// <returns>The call object.</returns> |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 469 | public virtual grpc::AsyncDuplexStreamingCall<global::Grpc.Testing.StreamingOutputCallRequest, global::Grpc.Testing.StreamingOutputCallResponse> HalfDuplexCall(grpc::CallOptions options) |
Jan Tattermusch | ddc4e34 | 2016-03-21 19:03:14 -0700 | [diff] [blame] | 470 | { |
| 471 | return CallInvoker.AsyncDuplexStreamingCall(__Method_HalfDuplexCall, null, options); |
| 472 | } |
Noah Eisen | b2a2647 | 2016-10-21 16:43:57 -0700 | [diff] [blame] | 473 | /// <summary> |
Jan Tattermusch | 726f40f | 2016-12-12 12:09:35 +0100 | [diff] [blame] | 474 | /// The test server will not implement this method. It will be used |
| 475 | /// to test the behavior when clients call unimplemented methods. |
Noah Eisen | b2a2647 | 2016-10-21 16:43:57 -0700 | [diff] [blame] | 476 | /// </summary> |
Jan Tattermusch | 00f6636 | 2016-12-12 13:02:29 +0100 | [diff] [blame] | 477 | /// <param name="request">The request to send to the server.</param> |
| 478 | /// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param> |
| 479 | /// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param> |
| 480 | /// <param name="cancellationToken">An optional token for canceling the call.</param> |
| 481 | /// <returns>The response received from the server.</returns> |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 482 | public virtual global::Grpc.Testing.Empty UnimplementedCall(global::Grpc.Testing.Empty request, grpc::Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)) |
Noah Eisen | b2a2647 | 2016-10-21 16:43:57 -0700 | [diff] [blame] | 483 | { |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 484 | return UnimplementedCall(request, new grpc::CallOptions(headers, deadline, cancellationToken)); |
Noah Eisen | b2a2647 | 2016-10-21 16:43:57 -0700 | [diff] [blame] | 485 | } |
| 486 | /// <summary> |
Jan Tattermusch | 726f40f | 2016-12-12 12:09:35 +0100 | [diff] [blame] | 487 | /// The test server will not implement this method. It will be used |
| 488 | /// to test the behavior when clients call unimplemented methods. |
Noah Eisen | b2a2647 | 2016-10-21 16:43:57 -0700 | [diff] [blame] | 489 | /// </summary> |
Jan Tattermusch | 00f6636 | 2016-12-12 13:02:29 +0100 | [diff] [blame] | 490 | /// <param name="request">The request to send to the server.</param> |
| 491 | /// <param name="options">The options for the call.</param> |
| 492 | /// <returns>The response received from the server.</returns> |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 493 | public virtual global::Grpc.Testing.Empty UnimplementedCall(global::Grpc.Testing.Empty request, grpc::CallOptions options) |
Noah Eisen | b2a2647 | 2016-10-21 16:43:57 -0700 | [diff] [blame] | 494 | { |
| 495 | return CallInvoker.BlockingUnaryCall(__Method_UnimplementedCall, null, options, request); |
| 496 | } |
| 497 | /// <summary> |
Jan Tattermusch | 726f40f | 2016-12-12 12:09:35 +0100 | [diff] [blame] | 498 | /// The test server will not implement this method. It will be used |
| 499 | /// to test the behavior when clients call unimplemented methods. |
Noah Eisen | b2a2647 | 2016-10-21 16:43:57 -0700 | [diff] [blame] | 500 | /// </summary> |
Jan Tattermusch | 00f6636 | 2016-12-12 13:02:29 +0100 | [diff] [blame] | 501 | /// <param name="request">The request to send to the server.</param> |
| 502 | /// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param> |
| 503 | /// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param> |
| 504 | /// <param name="cancellationToken">An optional token for canceling the call.</param> |
| 505 | /// <returns>The call object.</returns> |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 506 | public virtual grpc::AsyncUnaryCall<global::Grpc.Testing.Empty> UnimplementedCallAsync(global::Grpc.Testing.Empty request, grpc::Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)) |
Noah Eisen | b2a2647 | 2016-10-21 16:43:57 -0700 | [diff] [blame] | 507 | { |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 508 | return UnimplementedCallAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); |
Noah Eisen | b2a2647 | 2016-10-21 16:43:57 -0700 | [diff] [blame] | 509 | } |
| 510 | /// <summary> |
Jan Tattermusch | 726f40f | 2016-12-12 12:09:35 +0100 | [diff] [blame] | 511 | /// The test server will not implement this method. It will be used |
| 512 | /// to test the behavior when clients call unimplemented methods. |
Noah Eisen | b2a2647 | 2016-10-21 16:43:57 -0700 | [diff] [blame] | 513 | /// </summary> |
Jan Tattermusch | 00f6636 | 2016-12-12 13:02:29 +0100 | [diff] [blame] | 514 | /// <param name="request">The request to send to the server.</param> |
| 515 | /// <param name="options">The options for the call.</param> |
| 516 | /// <returns>The call object.</returns> |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 517 | public virtual grpc::AsyncUnaryCall<global::Grpc.Testing.Empty> UnimplementedCallAsync(global::Grpc.Testing.Empty request, grpc::CallOptions options) |
Noah Eisen | b2a2647 | 2016-10-21 16:43:57 -0700 | [diff] [blame] | 518 | { |
| 519 | return CallInvoker.AsyncUnaryCall(__Method_UnimplementedCall, null, options, request); |
| 520 | } |
Jan Tattermusch | 10098d1 | 2016-10-06 13:15:12 +0200 | [diff] [blame] | 521 | /// <summary>Creates a new instance of client from given <c>ClientBaseConfiguration</c>.</summary> |
Jan Tattermusch | ddc4e34 | 2016-03-21 19:03:14 -0700 | [diff] [blame] | 522 | protected override TestServiceClient NewInstance(ClientBaseConfiguration configuration) |
| 523 | { |
| 524 | return new TestServiceClient(configuration); |
Jan Tattermusch | 7eb3a76 | 2015-05-07 14:26:13 -0700 | [diff] [blame] | 525 | } |
| 526 | } |
| 527 | |
Jan Tattermusch | bfee01d | 2016-04-28 10:52:41 -0700 | [diff] [blame] | 528 | /// <summary>Creates service definition that can be registered with a server</summary> |
Jan Tattermusch | 00f6636 | 2016-12-12 13:02:29 +0100 | [diff] [blame] | 529 | /// <param name="serviceImpl">An object implementing the server-side handling logic.</param> |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 530 | public static grpc::ServerServiceDefinition BindService(TestServiceBase serviceImpl) |
Jan Tattermusch | eeef5ed | 2016-03-14 16:08:39 -0700 | [diff] [blame] | 531 | { |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 532 | return grpc::ServerServiceDefinition.CreateBuilder() |
Jan Tattermusch | eeef5ed | 2016-03-14 16:08:39 -0700 | [diff] [blame] | 533 | .AddMethod(__Method_EmptyCall, serviceImpl.EmptyCall) |
| 534 | .AddMethod(__Method_UnaryCall, serviceImpl.UnaryCall) |
Noah Eisen | b2a2647 | 2016-10-21 16:43:57 -0700 | [diff] [blame] | 535 | .AddMethod(__Method_CacheableUnaryCall, serviceImpl.CacheableUnaryCall) |
Jan Tattermusch | eeef5ed | 2016-03-14 16:08:39 -0700 | [diff] [blame] | 536 | .AddMethod(__Method_StreamingOutputCall, serviceImpl.StreamingOutputCall) |
| 537 | .AddMethod(__Method_StreamingInputCall, serviceImpl.StreamingInputCall) |
| 538 | .AddMethod(__Method_FullDuplexCall, serviceImpl.FullDuplexCall) |
Noah Eisen | b2a2647 | 2016-10-21 16:43:57 -0700 | [diff] [blame] | 539 | .AddMethod(__Method_HalfDuplexCall, serviceImpl.HalfDuplexCall) |
| 540 | .AddMethod(__Method_UnimplementedCall, serviceImpl.UnimplementedCall).Build(); |
Jan Tattermusch | eeef5ed | 2016-03-14 16:08:39 -0700 | [diff] [blame] | 541 | } |
| 542 | |
Jan Tattermusch | 7eb3a76 | 2015-05-07 14:26:13 -0700 | [diff] [blame] | 543 | } |
Jan Tattermusch | bfee01d | 2016-04-28 10:52:41 -0700 | [diff] [blame] | 544 | /// <summary> |
Jan Tattermusch | 726f40f | 2016-12-12 12:09:35 +0100 | [diff] [blame] | 545 | /// A simple service NOT implemented at servers so clients can test for |
| 546 | /// that case. |
Jan Tattermusch | bfee01d | 2016-04-28 10:52:41 -0700 | [diff] [blame] | 547 | /// </summary> |
Alexander Polcyn | c0f4c2c | 2016-11-07 10:24:35 -0800 | [diff] [blame] | 548 | public static partial class UnimplementedService |
Jan Tattermusch | 70f8652 | 2015-10-07 18:23:51 -0700 | [diff] [blame] | 549 | { |
| 550 | static readonly string __ServiceName = "grpc.testing.UnimplementedService"; |
| 551 | |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 552 | static readonly grpc::Marshaller<global::Grpc.Testing.Empty> __Marshaller_Empty = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.Empty.Parser.ParseFrom); |
Jan Tattermusch | 70f8652 | 2015-10-07 18:23:51 -0700 | [diff] [blame] | 553 | |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 554 | static readonly grpc::Method<global::Grpc.Testing.Empty, global::Grpc.Testing.Empty> __Method_UnimplementedCall = new grpc::Method<global::Grpc.Testing.Empty, global::Grpc.Testing.Empty>( |
| 555 | grpc::MethodType.Unary, |
Jan Tattermusch | 70f8652 | 2015-10-07 18:23:51 -0700 | [diff] [blame] | 556 | __ServiceName, |
| 557 | "UnimplementedCall", |
| 558 | __Marshaller_Empty, |
| 559 | __Marshaller_Empty); |
| 560 | |
Jan Tattermusch | bfee01d | 2016-04-28 10:52:41 -0700 | [diff] [blame] | 561 | /// <summary>Service descriptor</summary> |
Jan Tattermusch | 70f8652 | 2015-10-07 18:23:51 -0700 | [diff] [blame] | 562 | public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor |
| 563 | { |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 564 | get { return global::Grpc.Testing.TestReflection.Descriptor.Services[1]; } |
Jan Tattermusch | 70f8652 | 2015-10-07 18:23:51 -0700 | [diff] [blame] | 565 | } |
| 566 | |
Jan Tattermusch | bfee01d | 2016-04-28 10:52:41 -0700 | [diff] [blame] | 567 | /// <summary>Base class for server-side implementations of UnimplementedService</summary> |
Alexander Polcyn | c0f4c2c | 2016-11-07 10:24:35 -0800 | [diff] [blame] | 568 | public abstract partial class UnimplementedServiceBase |
Jan Tattermusch | eeef5ed | 2016-03-14 16:08:39 -0700 | [diff] [blame] | 569 | { |
Jan Tattermusch | bfee01d | 2016-04-28 10:52:41 -0700 | [diff] [blame] | 570 | /// <summary> |
Jan Tattermusch | 726f40f | 2016-12-12 12:09:35 +0100 | [diff] [blame] | 571 | /// A call that no server should implement |
Jan Tattermusch | bfee01d | 2016-04-28 10:52:41 -0700 | [diff] [blame] | 572 | /// </summary> |
Jan Tattermusch | 00f6636 | 2016-12-12 13:02:29 +0100 | [diff] [blame] | 573 | /// <param name="request">The request received from the client.</param> |
| 574 | /// <param name="context">The context of the server-side call handler being invoked.</param> |
| 575 | /// <returns>The response to send back to the client (wrapped by a task).</returns> |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 576 | public virtual global::System.Threading.Tasks.Task<global::Grpc.Testing.Empty> UnimplementedCall(global::Grpc.Testing.Empty request, grpc::ServerCallContext context) |
Jan Tattermusch | eeef5ed | 2016-03-14 16:08:39 -0700 | [diff] [blame] | 577 | { |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 578 | throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); |
Jan Tattermusch | eeef5ed | 2016-03-14 16:08:39 -0700 | [diff] [blame] | 579 | } |
| 580 | |
| 581 | } |
| 582 | |
Jan Tattermusch | bfee01d | 2016-04-28 10:52:41 -0700 | [diff] [blame] | 583 | /// <summary>Client for UnimplementedService</summary> |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 584 | public partial class UnimplementedServiceClient : grpc::ClientBase<UnimplementedServiceClient> |
Jan Tattermusch | 70f8652 | 2015-10-07 18:23:51 -0700 | [diff] [blame] | 585 | { |
Jan Tattermusch | ed6ea4c | 2016-06-22 12:38:44 -0700 | [diff] [blame] | 586 | /// <summary>Creates a new client for UnimplementedService</summary> |
| 587 | /// <param name="channel">The channel to use to make remote calls.</param> |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 588 | public UnimplementedServiceClient(grpc::Channel channel) : base(channel) |
Jan Tattermusch | 70f8652 | 2015-10-07 18:23:51 -0700 | [diff] [blame] | 589 | { |
| 590 | } |
Jan Tattermusch | ed6ea4c | 2016-06-22 12:38:44 -0700 | [diff] [blame] | 591 | /// <summary>Creates a new client for UnimplementedService that uses a custom <c>CallInvoker</c>.</summary> |
| 592 | /// <param name="callInvoker">The callInvoker to use to make remote calls.</param> |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 593 | public UnimplementedServiceClient(grpc::CallInvoker callInvoker) : base(callInvoker) |
Jan Tattermusch | 70f8652 | 2015-10-07 18:23:51 -0700 | [diff] [blame] | 594 | { |
Jan Tattermusch | 70f8652 | 2015-10-07 18:23:51 -0700 | [diff] [blame] | 595 | } |
Jan Tattermusch | ed6ea4c | 2016-06-22 12:38:44 -0700 | [diff] [blame] | 596 | /// <summary>Protected parameterless constructor to allow creation of test doubles.</summary> |
Jan Tattermusch | ddc4e34 | 2016-03-21 19:03:14 -0700 | [diff] [blame] | 597 | protected UnimplementedServiceClient() : base() |
Jan Tattermusch | 70f8652 | 2015-10-07 18:23:51 -0700 | [diff] [blame] | 598 | { |
Jan Tattermusch | 70f8652 | 2015-10-07 18:23:51 -0700 | [diff] [blame] | 599 | } |
Jan Tattermusch | ed6ea4c | 2016-06-22 12:38:44 -0700 | [diff] [blame] | 600 | /// <summary>Protected constructor to allow creation of configured clients.</summary> |
| 601 | /// <param name="configuration">The client configuration.</param> |
Jan Tattermusch | ddc4e34 | 2016-03-21 19:03:14 -0700 | [diff] [blame] | 602 | protected UnimplementedServiceClient(ClientBaseConfiguration configuration) : base(configuration) |
Jan Tattermusch | 70f8652 | 2015-10-07 18:23:51 -0700 | [diff] [blame] | 603 | { |
Jan Tattermusch | 70f8652 | 2015-10-07 18:23:51 -0700 | [diff] [blame] | 604 | } |
Jan Tattermusch | ddc4e34 | 2016-03-21 19:03:14 -0700 | [diff] [blame] | 605 | |
Jan Tattermusch | bfee01d | 2016-04-28 10:52:41 -0700 | [diff] [blame] | 606 | /// <summary> |
Jan Tattermusch | 726f40f | 2016-12-12 12:09:35 +0100 | [diff] [blame] | 607 | /// A call that no server should implement |
Jan Tattermusch | bfee01d | 2016-04-28 10:52:41 -0700 | [diff] [blame] | 608 | /// </summary> |
Jan Tattermusch | 00f6636 | 2016-12-12 13:02:29 +0100 | [diff] [blame] | 609 | /// <param name="request">The request to send to the server.</param> |
| 610 | /// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param> |
| 611 | /// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param> |
| 612 | /// <param name="cancellationToken">An optional token for canceling the call.</param> |
| 613 | /// <returns>The response received from the server.</returns> |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 614 | public virtual global::Grpc.Testing.Empty UnimplementedCall(global::Grpc.Testing.Empty request, grpc::Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)) |
Jan Tattermusch | 70f8652 | 2015-10-07 18:23:51 -0700 | [diff] [blame] | 615 | { |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 616 | return UnimplementedCall(request, new grpc::CallOptions(headers, deadline, cancellationToken)); |
Jan Tattermusch | ddc4e34 | 2016-03-21 19:03:14 -0700 | [diff] [blame] | 617 | } |
Jan Tattermusch | bfee01d | 2016-04-28 10:52:41 -0700 | [diff] [blame] | 618 | /// <summary> |
Jan Tattermusch | 726f40f | 2016-12-12 12:09:35 +0100 | [diff] [blame] | 619 | /// A call that no server should implement |
Jan Tattermusch | bfee01d | 2016-04-28 10:52:41 -0700 | [diff] [blame] | 620 | /// </summary> |
Jan Tattermusch | 00f6636 | 2016-12-12 13:02:29 +0100 | [diff] [blame] | 621 | /// <param name="request">The request to send to the server.</param> |
| 622 | /// <param name="options">The options for the call.</param> |
| 623 | /// <returns>The response received from the server.</returns> |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 624 | public virtual global::Grpc.Testing.Empty UnimplementedCall(global::Grpc.Testing.Empty request, grpc::CallOptions options) |
Jan Tattermusch | ddc4e34 | 2016-03-21 19:03:14 -0700 | [diff] [blame] | 625 | { |
| 626 | return CallInvoker.BlockingUnaryCall(__Method_UnimplementedCall, null, options, request); |
| 627 | } |
Jan Tattermusch | bfee01d | 2016-04-28 10:52:41 -0700 | [diff] [blame] | 628 | /// <summary> |
Jan Tattermusch | 726f40f | 2016-12-12 12:09:35 +0100 | [diff] [blame] | 629 | /// A call that no server should implement |
Jan Tattermusch | bfee01d | 2016-04-28 10:52:41 -0700 | [diff] [blame] | 630 | /// </summary> |
Jan Tattermusch | 00f6636 | 2016-12-12 13:02:29 +0100 | [diff] [blame] | 631 | /// <param name="request">The request to send to the server.</param> |
| 632 | /// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param> |
| 633 | /// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param> |
| 634 | /// <param name="cancellationToken">An optional token for canceling the call.</param> |
| 635 | /// <returns>The call object.</returns> |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 636 | public virtual grpc::AsyncUnaryCall<global::Grpc.Testing.Empty> UnimplementedCallAsync(global::Grpc.Testing.Empty request, grpc::Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)) |
Jan Tattermusch | ddc4e34 | 2016-03-21 19:03:14 -0700 | [diff] [blame] | 637 | { |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 638 | return UnimplementedCallAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); |
Jan Tattermusch | ddc4e34 | 2016-03-21 19:03:14 -0700 | [diff] [blame] | 639 | } |
Jan Tattermusch | bfee01d | 2016-04-28 10:52:41 -0700 | [diff] [blame] | 640 | /// <summary> |
Jan Tattermusch | 726f40f | 2016-12-12 12:09:35 +0100 | [diff] [blame] | 641 | /// A call that no server should implement |
Jan Tattermusch | bfee01d | 2016-04-28 10:52:41 -0700 | [diff] [blame] | 642 | /// </summary> |
Jan Tattermusch | 00f6636 | 2016-12-12 13:02:29 +0100 | [diff] [blame] | 643 | /// <param name="request">The request to send to the server.</param> |
| 644 | /// <param name="options">The options for the call.</param> |
| 645 | /// <returns>The call object.</returns> |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 646 | public virtual grpc::AsyncUnaryCall<global::Grpc.Testing.Empty> UnimplementedCallAsync(global::Grpc.Testing.Empty request, grpc::CallOptions options) |
Jan Tattermusch | ddc4e34 | 2016-03-21 19:03:14 -0700 | [diff] [blame] | 647 | { |
| 648 | return CallInvoker.AsyncUnaryCall(__Method_UnimplementedCall, null, options, request); |
| 649 | } |
Jan Tattermusch | 10098d1 | 2016-10-06 13:15:12 +0200 | [diff] [blame] | 650 | /// <summary>Creates a new instance of client from given <c>ClientBaseConfiguration</c>.</summary> |
Jan Tattermusch | ddc4e34 | 2016-03-21 19:03:14 -0700 | [diff] [blame] | 651 | protected override UnimplementedServiceClient NewInstance(ClientBaseConfiguration configuration) |
| 652 | { |
| 653 | return new UnimplementedServiceClient(configuration); |
Jan Tattermusch | 70f8652 | 2015-10-07 18:23:51 -0700 | [diff] [blame] | 654 | } |
| 655 | } |
| 656 | |
Jan Tattermusch | bfee01d | 2016-04-28 10:52:41 -0700 | [diff] [blame] | 657 | /// <summary>Creates service definition that can be registered with a server</summary> |
Jan Tattermusch | 00f6636 | 2016-12-12 13:02:29 +0100 | [diff] [blame] | 658 | /// <param name="serviceImpl">An object implementing the server-side handling logic.</param> |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 659 | public static grpc::ServerServiceDefinition BindService(UnimplementedServiceBase serviceImpl) |
Jan Tattermusch | eeef5ed | 2016-03-14 16:08:39 -0700 | [diff] [blame] | 660 | { |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 661 | return grpc::ServerServiceDefinition.CreateBuilder() |
Jan Tattermusch | eeef5ed | 2016-03-14 16:08:39 -0700 | [diff] [blame] | 662 | .AddMethod(__Method_UnimplementedCall, serviceImpl.UnimplementedCall).Build(); |
| 663 | } |
| 664 | |
Jan Tattermusch | 70f8652 | 2015-10-07 18:23:51 -0700 | [diff] [blame] | 665 | } |
Jan Tattermusch | bfee01d | 2016-04-28 10:52:41 -0700 | [diff] [blame] | 666 | /// <summary> |
Jan Tattermusch | 726f40f | 2016-12-12 12:09:35 +0100 | [diff] [blame] | 667 | /// A service used to control reconnect server. |
Jan Tattermusch | bfee01d | 2016-04-28 10:52:41 -0700 | [diff] [blame] | 668 | /// </summary> |
Alexander Polcyn | c0f4c2c | 2016-11-07 10:24:35 -0800 | [diff] [blame] | 669 | public static partial class ReconnectService |
Jan Tattermusch | 70f8652 | 2015-10-07 18:23:51 -0700 | [diff] [blame] | 670 | { |
| 671 | static readonly string __ServiceName = "grpc.testing.ReconnectService"; |
| 672 | |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 673 | static readonly grpc::Marshaller<global::Grpc.Testing.ReconnectParams> __Marshaller_ReconnectParams = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.ReconnectParams.Parser.ParseFrom); |
| 674 | static readonly grpc::Marshaller<global::Grpc.Testing.Empty> __Marshaller_Empty = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.Empty.Parser.ParseFrom); |
| 675 | static readonly grpc::Marshaller<global::Grpc.Testing.ReconnectInfo> __Marshaller_ReconnectInfo = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.ReconnectInfo.Parser.ParseFrom); |
Jan Tattermusch | 70f8652 | 2015-10-07 18:23:51 -0700 | [diff] [blame] | 676 | |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 677 | static readonly grpc::Method<global::Grpc.Testing.ReconnectParams, global::Grpc.Testing.Empty> __Method_Start = new grpc::Method<global::Grpc.Testing.ReconnectParams, global::Grpc.Testing.Empty>( |
| 678 | grpc::MethodType.Unary, |
Jan Tattermusch | 70f8652 | 2015-10-07 18:23:51 -0700 | [diff] [blame] | 679 | __ServiceName, |
| 680 | "Start", |
vjpai | 87bac95 | 2016-04-20 09:35:35 -0700 | [diff] [blame] | 681 | __Marshaller_ReconnectParams, |
Jan Tattermusch | 70f8652 | 2015-10-07 18:23:51 -0700 | [diff] [blame] | 682 | __Marshaller_Empty); |
| 683 | |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 684 | static readonly grpc::Method<global::Grpc.Testing.Empty, global::Grpc.Testing.ReconnectInfo> __Method_Stop = new grpc::Method<global::Grpc.Testing.Empty, global::Grpc.Testing.ReconnectInfo>( |
| 685 | grpc::MethodType.Unary, |
Jan Tattermusch | 70f8652 | 2015-10-07 18:23:51 -0700 | [diff] [blame] | 686 | __ServiceName, |
| 687 | "Stop", |
| 688 | __Marshaller_Empty, |
| 689 | __Marshaller_ReconnectInfo); |
| 690 | |
Jan Tattermusch | bfee01d | 2016-04-28 10:52:41 -0700 | [diff] [blame] | 691 | /// <summary>Service descriptor</summary> |
Jan Tattermusch | 70f8652 | 2015-10-07 18:23:51 -0700 | [diff] [blame] | 692 | public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor |
| 693 | { |
Jan Tattermusch | 72ce442 | 2016-01-20 13:54:38 -0800 | [diff] [blame] | 694 | get { return global::Grpc.Testing.TestReflection.Descriptor.Services[2]; } |
Jan Tattermusch | 70f8652 | 2015-10-07 18:23:51 -0700 | [diff] [blame] | 695 | } |
| 696 | |
Jan Tattermusch | bfee01d | 2016-04-28 10:52:41 -0700 | [diff] [blame] | 697 | /// <summary>Base class for server-side implementations of ReconnectService</summary> |
Alexander Polcyn | c0f4c2c | 2016-11-07 10:24:35 -0800 | [diff] [blame] | 698 | public abstract partial class ReconnectServiceBase |
Jan Tattermusch | eeef5ed | 2016-03-14 16:08:39 -0700 | [diff] [blame] | 699 | { |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 700 | public virtual global::System.Threading.Tasks.Task<global::Grpc.Testing.Empty> Start(global::Grpc.Testing.ReconnectParams request, grpc::ServerCallContext context) |
Jan Tattermusch | eeef5ed | 2016-03-14 16:08:39 -0700 | [diff] [blame] | 701 | { |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 702 | throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); |
Jan Tattermusch | eeef5ed | 2016-03-14 16:08:39 -0700 | [diff] [blame] | 703 | } |
| 704 | |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 705 | public virtual global::System.Threading.Tasks.Task<global::Grpc.Testing.ReconnectInfo> Stop(global::Grpc.Testing.Empty request, grpc::ServerCallContext context) |
Jan Tattermusch | eeef5ed | 2016-03-14 16:08:39 -0700 | [diff] [blame] | 706 | { |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 707 | throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); |
Jan Tattermusch | eeef5ed | 2016-03-14 16:08:39 -0700 | [diff] [blame] | 708 | } |
| 709 | |
| 710 | } |
| 711 | |
Jan Tattermusch | bfee01d | 2016-04-28 10:52:41 -0700 | [diff] [blame] | 712 | /// <summary>Client for ReconnectService</summary> |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 713 | public partial class ReconnectServiceClient : grpc::ClientBase<ReconnectServiceClient> |
Jan Tattermusch | 70f8652 | 2015-10-07 18:23:51 -0700 | [diff] [blame] | 714 | { |
Jan Tattermusch | ed6ea4c | 2016-06-22 12:38:44 -0700 | [diff] [blame] | 715 | /// <summary>Creates a new client for ReconnectService</summary> |
| 716 | /// <param name="channel">The channel to use to make remote calls.</param> |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 717 | public ReconnectServiceClient(grpc::Channel channel) : base(channel) |
Jan Tattermusch | 70f8652 | 2015-10-07 18:23:51 -0700 | [diff] [blame] | 718 | { |
| 719 | } |
Jan Tattermusch | ed6ea4c | 2016-06-22 12:38:44 -0700 | [diff] [blame] | 720 | /// <summary>Creates a new client for ReconnectService that uses a custom <c>CallInvoker</c>.</summary> |
| 721 | /// <param name="callInvoker">The callInvoker to use to make remote calls.</param> |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 722 | public ReconnectServiceClient(grpc::CallInvoker callInvoker) : base(callInvoker) |
Jan Tattermusch | 70f8652 | 2015-10-07 18:23:51 -0700 | [diff] [blame] | 723 | { |
Jan Tattermusch | 70f8652 | 2015-10-07 18:23:51 -0700 | [diff] [blame] | 724 | } |
Jan Tattermusch | ed6ea4c | 2016-06-22 12:38:44 -0700 | [diff] [blame] | 725 | /// <summary>Protected parameterless constructor to allow creation of test doubles.</summary> |
Jan Tattermusch | ddc4e34 | 2016-03-21 19:03:14 -0700 | [diff] [blame] | 726 | protected ReconnectServiceClient() : base() |
Jan Tattermusch | 70f8652 | 2015-10-07 18:23:51 -0700 | [diff] [blame] | 727 | { |
Jan Tattermusch | 70f8652 | 2015-10-07 18:23:51 -0700 | [diff] [blame] | 728 | } |
Jan Tattermusch | ed6ea4c | 2016-06-22 12:38:44 -0700 | [diff] [blame] | 729 | /// <summary>Protected constructor to allow creation of configured clients.</summary> |
| 730 | /// <param name="configuration">The client configuration.</param> |
Jan Tattermusch | ddc4e34 | 2016-03-21 19:03:14 -0700 | [diff] [blame] | 731 | protected ReconnectServiceClient(ClientBaseConfiguration configuration) : base(configuration) |
Jan Tattermusch | 70f8652 | 2015-10-07 18:23:51 -0700 | [diff] [blame] | 732 | { |
Jan Tattermusch | 70f8652 | 2015-10-07 18:23:51 -0700 | [diff] [blame] | 733 | } |
Jan Tattermusch | ddc4e34 | 2016-03-21 19:03:14 -0700 | [diff] [blame] | 734 | |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 735 | public virtual global::Grpc.Testing.Empty Start(global::Grpc.Testing.ReconnectParams request, grpc::Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)) |
Jan Tattermusch | 70f8652 | 2015-10-07 18:23:51 -0700 | [diff] [blame] | 736 | { |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 737 | return Start(request, new grpc::CallOptions(headers, deadline, cancellationToken)); |
Jan Tattermusch | 70f8652 | 2015-10-07 18:23:51 -0700 | [diff] [blame] | 738 | } |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 739 | public virtual global::Grpc.Testing.Empty Start(global::Grpc.Testing.ReconnectParams request, grpc::CallOptions options) |
Jan Tattermusch | 70f8652 | 2015-10-07 18:23:51 -0700 | [diff] [blame] | 740 | { |
Jan Tattermusch | ddc4e34 | 2016-03-21 19:03:14 -0700 | [diff] [blame] | 741 | return CallInvoker.BlockingUnaryCall(__Method_Start, null, options, request); |
Jan Tattermusch | 70f8652 | 2015-10-07 18:23:51 -0700 | [diff] [blame] | 742 | } |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 743 | public virtual grpc::AsyncUnaryCall<global::Grpc.Testing.Empty> StartAsync(global::Grpc.Testing.ReconnectParams request, grpc::Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)) |
Jan Tattermusch | 70f8652 | 2015-10-07 18:23:51 -0700 | [diff] [blame] | 744 | { |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 745 | return StartAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); |
Jan Tattermusch | 70f8652 | 2015-10-07 18:23:51 -0700 | [diff] [blame] | 746 | } |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 747 | public virtual grpc::AsyncUnaryCall<global::Grpc.Testing.Empty> StartAsync(global::Grpc.Testing.ReconnectParams request, grpc::CallOptions options) |
Jan Tattermusch | 70f8652 | 2015-10-07 18:23:51 -0700 | [diff] [blame] | 748 | { |
Jan Tattermusch | ddc4e34 | 2016-03-21 19:03:14 -0700 | [diff] [blame] | 749 | return CallInvoker.AsyncUnaryCall(__Method_Start, null, options, request); |
Jan Tattermusch | 70f8652 | 2015-10-07 18:23:51 -0700 | [diff] [blame] | 750 | } |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 751 | public virtual global::Grpc.Testing.ReconnectInfo Stop(global::Grpc.Testing.Empty request, grpc::Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)) |
Jan Tattermusch | 70f8652 | 2015-10-07 18:23:51 -0700 | [diff] [blame] | 752 | { |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 753 | return Stop(request, new grpc::CallOptions(headers, deadline, cancellationToken)); |
Jan Tattermusch | ddc4e34 | 2016-03-21 19:03:14 -0700 | [diff] [blame] | 754 | } |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 755 | public virtual global::Grpc.Testing.ReconnectInfo Stop(global::Grpc.Testing.Empty request, grpc::CallOptions options) |
Jan Tattermusch | ddc4e34 | 2016-03-21 19:03:14 -0700 | [diff] [blame] | 756 | { |
| 757 | return CallInvoker.BlockingUnaryCall(__Method_Stop, null, options, request); |
| 758 | } |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 759 | public virtual grpc::AsyncUnaryCall<global::Grpc.Testing.ReconnectInfo> StopAsync(global::Grpc.Testing.Empty request, grpc::Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)) |
Jan Tattermusch | ddc4e34 | 2016-03-21 19:03:14 -0700 | [diff] [blame] | 760 | { |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 761 | return StopAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); |
Jan Tattermusch | ddc4e34 | 2016-03-21 19:03:14 -0700 | [diff] [blame] | 762 | } |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 763 | public virtual grpc::AsyncUnaryCall<global::Grpc.Testing.ReconnectInfo> StopAsync(global::Grpc.Testing.Empty request, grpc::CallOptions options) |
Jan Tattermusch | ddc4e34 | 2016-03-21 19:03:14 -0700 | [diff] [blame] | 764 | { |
| 765 | return CallInvoker.AsyncUnaryCall(__Method_Stop, null, options, request); |
| 766 | } |
Jan Tattermusch | 10098d1 | 2016-10-06 13:15:12 +0200 | [diff] [blame] | 767 | /// <summary>Creates a new instance of client from given <c>ClientBaseConfiguration</c>.</summary> |
Jan Tattermusch | ddc4e34 | 2016-03-21 19:03:14 -0700 | [diff] [blame] | 768 | protected override ReconnectServiceClient NewInstance(ClientBaseConfiguration configuration) |
| 769 | { |
| 770 | return new ReconnectServiceClient(configuration); |
Jan Tattermusch | 70f8652 | 2015-10-07 18:23:51 -0700 | [diff] [blame] | 771 | } |
| 772 | } |
| 773 | |
Jan Tattermusch | bfee01d | 2016-04-28 10:52:41 -0700 | [diff] [blame] | 774 | /// <summary>Creates service definition that can be registered with a server</summary> |
Jan Tattermusch | 00f6636 | 2016-12-12 13:02:29 +0100 | [diff] [blame] | 775 | /// <param name="serviceImpl">An object implementing the server-side handling logic.</param> |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 776 | public static grpc::ServerServiceDefinition BindService(ReconnectServiceBase serviceImpl) |
Jan Tattermusch | eeef5ed | 2016-03-14 16:08:39 -0700 | [diff] [blame] | 777 | { |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 778 | return grpc::ServerServiceDefinition.CreateBuilder() |
Jan Tattermusch | eeef5ed | 2016-03-14 16:08:39 -0700 | [diff] [blame] | 779 | .AddMethod(__Method_Start, serviceImpl.Start) |
| 780 | .AddMethod(__Method_Stop, serviceImpl.Stop).Build(); |
| 781 | } |
| 782 | |
Jan Tattermusch | 70f8652 | 2015-10-07 18:23:51 -0700 | [diff] [blame] | 783 | } |
Jan Tattermusch | 7eb3a76 | 2015-05-07 14:26:13 -0700 | [diff] [blame] | 784 | } |
Jan Tattermusch | cd7e313 | 2015-05-07 15:10:23 -0700 | [diff] [blame] | 785 | #endregion |