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