|
|
|
@ -42,8 +42,8 @@ using Grpc.Core; |
|
|
|
|
|
|
|
|
|
namespace Grpc.Testing { |
|
|
|
|
/// <summary> |
|
|
|
|
/// A simple service to test the various types of RPCs and experiment with |
|
|
|
|
/// performance with various types of payload. |
|
|
|
|
/// A simple service to test the various types of RPCs and experiment with |
|
|
|
|
/// performance with various types of payload. |
|
|
|
|
/// </summary> |
|
|
|
|
public static partial class TestService |
|
|
|
|
{ |
|
|
|
@ -123,74 +123,101 @@ namespace Grpc.Testing { |
|
|
|
|
public abstract partial class TestServiceBase |
|
|
|
|
{ |
|
|
|
|
/// <summary> |
|
|
|
|
/// One empty request followed by one empty response. |
|
|
|
|
/// One empty request followed by one empty response. |
|
|
|
|
/// </summary> |
|
|
|
|
/// <param name="request">The request received from the client.</param> |
|
|
|
|
/// <param name="context">The context of the server-side call handler being invoked.</param> |
|
|
|
|
/// <returns>The response to send back to the client (wrapped by a task).</returns> |
|
|
|
|
public virtual global::System.Threading.Tasks.Task<global::Grpc.Testing.Empty> EmptyCall(global::Grpc.Testing.Empty request, ServerCallContext context) |
|
|
|
|
{ |
|
|
|
|
throw new RpcException(new Status(StatusCode.Unimplemented, "")); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
/// One request followed by one response. |
|
|
|
|
/// One request followed by one response. |
|
|
|
|
/// </summary> |
|
|
|
|
/// <param name="request">The request received from the client.</param> |
|
|
|
|
/// <param name="context">The context of the server-side call handler being invoked.</param> |
|
|
|
|
/// <returns>The response to send back to the client (wrapped by a task).</returns> |
|
|
|
|
public virtual global::System.Threading.Tasks.Task<global::Grpc.Testing.SimpleResponse> UnaryCall(global::Grpc.Testing.SimpleRequest request, ServerCallContext context) |
|
|
|
|
{ |
|
|
|
|
throw new RpcException(new Status(StatusCode.Unimplemented, "")); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
/// One request followed by one response. Response has cache control |
|
|
|
|
/// headers set such that a caching HTTP proxy (such as GFE) can |
|
|
|
|
/// satisfy subsequent requests. |
|
|
|
|
/// One request followed by one response. Response has cache control |
|
|
|
|
/// headers set such that a caching HTTP proxy (such as GFE) can |
|
|
|
|
/// satisfy subsequent requests. |
|
|
|
|
/// </summary> |
|
|
|
|
/// <param name="request">The request received from the client.</param> |
|
|
|
|
/// <param name="context">The context of the server-side call handler being invoked.</param> |
|
|
|
|
/// <returns>The response to send back to the client (wrapped by a task).</returns> |
|
|
|
|
public virtual global::System.Threading.Tasks.Task<global::Grpc.Testing.SimpleResponse> CacheableUnaryCall(global::Grpc.Testing.SimpleRequest request, ServerCallContext context) |
|
|
|
|
{ |
|
|
|
|
throw new RpcException(new Status(StatusCode.Unimplemented, "")); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
/// One request followed by a sequence of responses (streamed download). |
|
|
|
|
/// The server returns the payload with client desired type and sizes. |
|
|
|
|
/// One request followed by a sequence of responses (streamed download). |
|
|
|
|
/// The server returns the payload with client desired type and sizes. |
|
|
|
|
/// </summary> |
|
|
|
|
/// <param name="request">The request received from the client.</param> |
|
|
|
|
/// <param name="responseStream">Used for sending responses back to the client.</param> |
|
|
|
|
/// <param name="context">The context of the server-side call handler being invoked.</param> |
|
|
|
|
/// <returns>A task indicating completion of the handler.</returns> |
|
|
|
|
public virtual global::System.Threading.Tasks.Task StreamingOutputCall(global::Grpc.Testing.StreamingOutputCallRequest request, IServerStreamWriter<global::Grpc.Testing.StreamingOutputCallResponse> responseStream, ServerCallContext context) |
|
|
|
|
{ |
|
|
|
|
throw new RpcException(new Status(StatusCode.Unimplemented, "")); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
/// A sequence of requests followed by one response (streamed upload). |
|
|
|
|
/// The server returns the aggregated size of client payload as the result. |
|
|
|
|
/// A sequence of requests followed by one response (streamed upload). |
|
|
|
|
/// The server returns the aggregated size of client payload as the result. |
|
|
|
|
/// </summary> |
|
|
|
|
/// <param name="requestStream">Used for reading requests from the client.</param> |
|
|
|
|
/// <param name="context">The context of the server-side call handler being invoked.</param> |
|
|
|
|
/// <returns>The response to send back to the client (wrapped by a task).</returns> |
|
|
|
|
public virtual global::System.Threading.Tasks.Task<global::Grpc.Testing.StreamingInputCallResponse> StreamingInputCall(IAsyncStreamReader<global::Grpc.Testing.StreamingInputCallRequest> requestStream, ServerCallContext context) |
|
|
|
|
{ |
|
|
|
|
throw new RpcException(new Status(StatusCode.Unimplemented, "")); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
/// A sequence of requests with each request served by the server immediately. |
|
|
|
|
/// As one request could lead to multiple responses, this interface |
|
|
|
|
/// demonstrates the idea of full duplexing. |
|
|
|
|
/// A sequence of requests with each request served by the server immediately. |
|
|
|
|
/// As one request could lead to multiple responses, this interface |
|
|
|
|
/// demonstrates the idea of full duplexing. |
|
|
|
|
/// </summary> |
|
|
|
|
/// <param name="requestStream">Used for reading requests from the client.</param> |
|
|
|
|
/// <param name="responseStream">Used for sending responses back to the client.</param> |
|
|
|
|
/// <param name="context">The context of the server-side call handler being invoked.</param> |
|
|
|
|
/// <returns>A task indicating completion of the handler.</returns> |
|
|
|
|
public virtual global::System.Threading.Tasks.Task FullDuplexCall(IAsyncStreamReader<global::Grpc.Testing.StreamingOutputCallRequest> requestStream, IServerStreamWriter<global::Grpc.Testing.StreamingOutputCallResponse> responseStream, ServerCallContext context) |
|
|
|
|
{ |
|
|
|
|
throw new RpcException(new Status(StatusCode.Unimplemented, "")); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
/// A sequence of requests followed by a sequence of responses. |
|
|
|
|
/// The server buffers all the client requests and then serves them in order. A |
|
|
|
|
/// stream of responses are returned to the client when the server starts with |
|
|
|
|
/// first request. |
|
|
|
|
/// A sequence of requests followed by a sequence of responses. |
|
|
|
|
/// The server buffers all the client requests and then serves them in order. A |
|
|
|
|
/// stream of responses are returned to the client when the server starts with |
|
|
|
|
/// first request. |
|
|
|
|
/// </summary> |
|
|
|
|
/// <param name="requestStream">Used for reading requests from the client.</param> |
|
|
|
|
/// <param name="responseStream">Used for sending responses back to the client.</param> |
|
|
|
|
/// <param name="context">The context of the server-side call handler being invoked.</param> |
|
|
|
|
/// <returns>A task indicating completion of the handler.</returns> |
|
|
|
|
public virtual global::System.Threading.Tasks.Task HalfDuplexCall(IAsyncStreamReader<global::Grpc.Testing.StreamingOutputCallRequest> requestStream, IServerStreamWriter<global::Grpc.Testing.StreamingOutputCallResponse> responseStream, ServerCallContext context) |
|
|
|
|
{ |
|
|
|
|
throw new RpcException(new Status(StatusCode.Unimplemented, "")); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
/// The test server will not implement this method. It will be used |
|
|
|
|
/// to test the behavior when clients call unimplemented methods. |
|
|
|
|
/// The test server will not implement this method. It will be used |
|
|
|
|
/// to test the behavior when clients call unimplemented methods. |
|
|
|
|
/// </summary> |
|
|
|
|
/// <param name="request">The request received from the client.</param> |
|
|
|
|
/// <param name="context">The context of the server-side call handler being invoked.</param> |
|
|
|
|
/// <returns>The response to send back to the client (wrapped by a task).</returns> |
|
|
|
|
public virtual global::System.Threading.Tasks.Task<global::Grpc.Testing.Empty> UnimplementedCall(global::Grpc.Testing.Empty request, ServerCallContext context) |
|
|
|
|
{ |
|
|
|
|
throw new RpcException(new Status(StatusCode.Unimplemented, "")); |
|
|
|
@ -222,195 +249,285 @@ namespace Grpc.Testing { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
/// One empty request followed by one empty response. |
|
|
|
|
/// One empty request followed by one empty response. |
|
|
|
|
/// </summary> |
|
|
|
|
/// <param name="request">The request to send to the server.</param> |
|
|
|
|
/// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param> |
|
|
|
|
/// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param> |
|
|
|
|
/// <param name="cancellationToken">An optional token for canceling the call.</param> |
|
|
|
|
/// <returns>The response received from the server.</returns> |
|
|
|
|
public virtual global::Grpc.Testing.Empty EmptyCall(global::Grpc.Testing.Empty request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)) |
|
|
|
|
{ |
|
|
|
|
return EmptyCall(request, new CallOptions(headers, deadline, cancellationToken)); |
|
|
|
|
} |
|
|
|
|
/// <summary> |
|
|
|
|
/// One empty request followed by one empty response. |
|
|
|
|
/// One empty request followed by one empty response. |
|
|
|
|
/// </summary> |
|
|
|
|
/// <param name="request">The request to send to the server.</param> |
|
|
|
|
/// <param name="options">The options for the call.</param> |
|
|
|
|
/// <returns>The response received from the server.</returns> |
|
|
|
|
public virtual global::Grpc.Testing.Empty EmptyCall(global::Grpc.Testing.Empty request, CallOptions options) |
|
|
|
|
{ |
|
|
|
|
return CallInvoker.BlockingUnaryCall(__Method_EmptyCall, null, options, request); |
|
|
|
|
} |
|
|
|
|
/// <summary> |
|
|
|
|
/// One empty request followed by one empty response. |
|
|
|
|
/// One empty request followed by one empty response. |
|
|
|
|
/// </summary> |
|
|
|
|
/// <param name="request">The request to send to the server.</param> |
|
|
|
|
/// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param> |
|
|
|
|
/// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param> |
|
|
|
|
/// <param name="cancellationToken">An optional token for canceling the call.</param> |
|
|
|
|
/// <returns>The call object.</returns> |
|
|
|
|
public virtual AsyncUnaryCall<global::Grpc.Testing.Empty> EmptyCallAsync(global::Grpc.Testing.Empty request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)) |
|
|
|
|
{ |
|
|
|
|
return EmptyCallAsync(request, new CallOptions(headers, deadline, cancellationToken)); |
|
|
|
|
} |
|
|
|
|
/// <summary> |
|
|
|
|
/// One empty request followed by one empty response. |
|
|
|
|
/// One empty request followed by one empty response. |
|
|
|
|
/// </summary> |
|
|
|
|
/// <param name="request">The request to send to the server.</param> |
|
|
|
|
/// <param name="options">The options for the call.</param> |
|
|
|
|
/// <returns>The call object.</returns> |
|
|
|
|
public virtual AsyncUnaryCall<global::Grpc.Testing.Empty> EmptyCallAsync(global::Grpc.Testing.Empty request, CallOptions options) |
|
|
|
|
{ |
|
|
|
|
return CallInvoker.AsyncUnaryCall(__Method_EmptyCall, null, options, request); |
|
|
|
|
} |
|
|
|
|
/// <summary> |
|
|
|
|
/// One request followed by one response. |
|
|
|
|
/// One request followed by one response. |
|
|
|
|
/// </summary> |
|
|
|
|
/// <param name="request">The request to send to the server.</param> |
|
|
|
|
/// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param> |
|
|
|
|
/// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param> |
|
|
|
|
/// <param name="cancellationToken">An optional token for canceling the call.</param> |
|
|
|
|
/// <returns>The response received from the server.</returns> |
|
|
|
|
public virtual global::Grpc.Testing.SimpleResponse UnaryCall(global::Grpc.Testing.SimpleRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)) |
|
|
|
|
{ |
|
|
|
|
return UnaryCall(request, new CallOptions(headers, deadline, cancellationToken)); |
|
|
|
|
} |
|
|
|
|
/// <summary> |
|
|
|
|
/// One request followed by one response. |
|
|
|
|
/// One request followed by one response. |
|
|
|
|
/// </summary> |
|
|
|
|
/// <param name="request">The request to send to the server.</param> |
|
|
|
|
/// <param name="options">The options for the call.</param> |
|
|
|
|
/// <returns>The response received from the server.</returns> |
|
|
|
|
public virtual global::Grpc.Testing.SimpleResponse UnaryCall(global::Grpc.Testing.SimpleRequest request, CallOptions options) |
|
|
|
|
{ |
|
|
|
|
return CallInvoker.BlockingUnaryCall(__Method_UnaryCall, null, options, request); |
|
|
|
|
} |
|
|
|
|
/// <summary> |
|
|
|
|
/// One request followed by one response. |
|
|
|
|
/// One request followed by one response. |
|
|
|
|
/// </summary> |
|
|
|
|
/// <param name="request">The request to send to the server.</param> |
|
|
|
|
/// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param> |
|
|
|
|
/// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param> |
|
|
|
|
/// <param name="cancellationToken">An optional token for canceling the call.</param> |
|
|
|
|
/// <returns>The call object.</returns> |
|
|
|
|
public virtual AsyncUnaryCall<global::Grpc.Testing.SimpleResponse> UnaryCallAsync(global::Grpc.Testing.SimpleRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)) |
|
|
|
|
{ |
|
|
|
|
return UnaryCallAsync(request, new CallOptions(headers, deadline, cancellationToken)); |
|
|
|
|
} |
|
|
|
|
/// <summary> |
|
|
|
|
/// One request followed by one response. |
|
|
|
|
/// One request followed by one response. |
|
|
|
|
/// </summary> |
|
|
|
|
/// <param name="request">The request to send to the server.</param> |
|
|
|
|
/// <param name="options">The options for the call.</param> |
|
|
|
|
/// <returns>The call object.</returns> |
|
|
|
|
public virtual AsyncUnaryCall<global::Grpc.Testing.SimpleResponse> UnaryCallAsync(global::Grpc.Testing.SimpleRequest request, CallOptions options) |
|
|
|
|
{ |
|
|
|
|
return CallInvoker.AsyncUnaryCall(__Method_UnaryCall, null, options, request); |
|
|
|
|
} |
|
|
|
|
/// <summary> |
|
|
|
|
/// One request followed by one response. Response has cache control |
|
|
|
|
/// headers set such that a caching HTTP proxy (such as GFE) can |
|
|
|
|
/// satisfy subsequent requests. |
|
|
|
|
/// One request followed by one response. Response has cache control |
|
|
|
|
/// headers set such that a caching HTTP proxy (such as GFE) can |
|
|
|
|
/// satisfy subsequent requests. |
|
|
|
|
/// </summary> |
|
|
|
|
/// <param name="request">The request to send to the server.</param> |
|
|
|
|
/// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param> |
|
|
|
|
/// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param> |
|
|
|
|
/// <param name="cancellationToken">An optional token for canceling the call.</param> |
|
|
|
|
/// <returns>The response received from the server.</returns> |
|
|
|
|
public virtual global::Grpc.Testing.SimpleResponse CacheableUnaryCall(global::Grpc.Testing.SimpleRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)) |
|
|
|
|
{ |
|
|
|
|
return CacheableUnaryCall(request, new CallOptions(headers, deadline, cancellationToken)); |
|
|
|
|
} |
|
|
|
|
/// <summary> |
|
|
|
|
/// One request followed by one response. Response has cache control |
|
|
|
|
/// headers set such that a caching HTTP proxy (such as GFE) can |
|
|
|
|
/// satisfy subsequent requests. |
|
|
|
|
/// One request followed by one response. Response has cache control |
|
|
|
|
/// headers set such that a caching HTTP proxy (such as GFE) can |
|
|
|
|
/// satisfy subsequent requests. |
|
|
|
|
/// </summary> |
|
|
|
|
/// <param name="request">The request to send to the server.</param> |
|
|
|
|
/// <param name="options">The options for the call.</param> |
|
|
|
|
/// <returns>The response received from the server.</returns> |
|
|
|
|
public virtual global::Grpc.Testing.SimpleResponse CacheableUnaryCall(global::Grpc.Testing.SimpleRequest request, CallOptions options) |
|
|
|
|
{ |
|
|
|
|
return CallInvoker.BlockingUnaryCall(__Method_CacheableUnaryCall, null, options, request); |
|
|
|
|
} |
|
|
|
|
/// <summary> |
|
|
|
|
/// One request followed by one response. Response has cache control |
|
|
|
|
/// headers set such that a caching HTTP proxy (such as GFE) can |
|
|
|
|
/// satisfy subsequent requests. |
|
|
|
|
/// One request followed by one response. Response has cache control |
|
|
|
|
/// headers set such that a caching HTTP proxy (such as GFE) can |
|
|
|
|
/// satisfy subsequent requests. |
|
|
|
|
/// </summary> |
|
|
|
|
/// <param name="request">The request to send to the server.</param> |
|
|
|
|
/// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param> |
|
|
|
|
/// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param> |
|
|
|
|
/// <param name="cancellationToken">An optional token for canceling the call.</param> |
|
|
|
|
/// <returns>The call object.</returns> |
|
|
|
|
public virtual AsyncUnaryCall<global::Grpc.Testing.SimpleResponse> CacheableUnaryCallAsync(global::Grpc.Testing.SimpleRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)) |
|
|
|
|
{ |
|
|
|
|
return CacheableUnaryCallAsync(request, new CallOptions(headers, deadline, cancellationToken)); |
|
|
|
|
} |
|
|
|
|
/// <summary> |
|
|
|
|
/// One request followed by one response. Response has cache control |
|
|
|
|
/// headers set such that a caching HTTP proxy (such as GFE) can |
|
|
|
|
/// satisfy subsequent requests. |
|
|
|
|
/// One request followed by one response. Response has cache control |
|
|
|
|
/// headers set such that a caching HTTP proxy (such as GFE) can |
|
|
|
|
/// satisfy subsequent requests. |
|
|
|
|
/// </summary> |
|
|
|
|
/// <param name="request">The request to send to the server.</param> |
|
|
|
|
/// <param name="options">The options for the call.</param> |
|
|
|
|
/// <returns>The call object.</returns> |
|
|
|
|
public virtual AsyncUnaryCall<global::Grpc.Testing.SimpleResponse> CacheableUnaryCallAsync(global::Grpc.Testing.SimpleRequest request, CallOptions options) |
|
|
|
|
{ |
|
|
|
|
return CallInvoker.AsyncUnaryCall(__Method_CacheableUnaryCall, null, options, request); |
|
|
|
|
} |
|
|
|
|
/// <summary> |
|
|
|
|
/// One request followed by a sequence of responses (streamed download). |
|
|
|
|
/// The server returns the payload with client desired type and sizes. |
|
|
|
|
/// One request followed by a sequence of responses (streamed download). |
|
|
|
|
/// The server returns the payload with client desired type and sizes. |
|
|
|
|
/// </summary> |
|
|
|
|
/// <param name="request">The request to send to the server.</param> |
|
|
|
|
/// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param> |
|
|
|
|
/// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param> |
|
|
|
|
/// <param name="cancellationToken">An optional token for canceling the call.</param> |
|
|
|
|
/// <returns>The call object.</returns> |
|
|
|
|
public virtual AsyncServerStreamingCall<global::Grpc.Testing.StreamingOutputCallResponse> StreamingOutputCall(global::Grpc.Testing.StreamingOutputCallRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)) |
|
|
|
|
{ |
|
|
|
|
return StreamingOutputCall(request, new CallOptions(headers, deadline, cancellationToken)); |
|
|
|
|
} |
|
|
|
|
/// <summary> |
|
|
|
|
/// One request followed by a sequence of responses (streamed download). |
|
|
|
|
/// The server returns the payload with client desired type and sizes. |
|
|
|
|
/// One request followed by a sequence of responses (streamed download). |
|
|
|
|
/// The server returns the payload with client desired type and sizes. |
|
|
|
|
/// </summary> |
|
|
|
|
/// <param name="request">The request to send to the server.</param> |
|
|
|
|
/// <param name="options">The options for the call.</param> |
|
|
|
|
/// <returns>The call object.</returns> |
|
|
|
|
public virtual AsyncServerStreamingCall<global::Grpc.Testing.StreamingOutputCallResponse> StreamingOutputCall(global::Grpc.Testing.StreamingOutputCallRequest request, CallOptions options) |
|
|
|
|
{ |
|
|
|
|
return CallInvoker.AsyncServerStreamingCall(__Method_StreamingOutputCall, null, options, request); |
|
|
|
|
} |
|
|
|
|
/// <summary> |
|
|
|
|
/// A sequence of requests followed by one response (streamed upload). |
|
|
|
|
/// The server returns the aggregated size of client payload as the result. |
|
|
|
|
/// A sequence of requests followed by one response (streamed upload). |
|
|
|
|
/// The server returns the aggregated size of client payload as the result. |
|
|
|
|
/// </summary> |
|
|
|
|
/// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param> |
|
|
|
|
/// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param> |
|
|
|
|
/// <param name="cancellationToken">An optional token for canceling the call.</param> |
|
|
|
|
/// <returns>The call object.</returns> |
|
|
|
|
public virtual AsyncClientStreamingCall<global::Grpc.Testing.StreamingInputCallRequest, global::Grpc.Testing.StreamingInputCallResponse> StreamingInputCall(Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)) |
|
|
|
|
{ |
|
|
|
|
return StreamingInputCall(new CallOptions(headers, deadline, cancellationToken)); |
|
|
|
|
} |
|
|
|
|
/// <summary> |
|
|
|
|
/// A sequence of requests followed by one response (streamed upload). |
|
|
|
|
/// The server returns the aggregated size of client payload as the result. |
|
|
|
|
/// A sequence of requests followed by one response (streamed upload). |
|
|
|
|
/// The server returns the aggregated size of client payload as the result. |
|
|
|
|
/// </summary> |
|
|
|
|
/// <param name="options">The options for the call.</param> |
|
|
|
|
/// <returns>The call object.</returns> |
|
|
|
|
public virtual AsyncClientStreamingCall<global::Grpc.Testing.StreamingInputCallRequest, global::Grpc.Testing.StreamingInputCallResponse> StreamingInputCall(CallOptions options) |
|
|
|
|
{ |
|
|
|
|
return CallInvoker.AsyncClientStreamingCall(__Method_StreamingInputCall, null, options); |
|
|
|
|
} |
|
|
|
|
/// <summary> |
|
|
|
|
/// A sequence of requests with each request served by the server immediately. |
|
|
|
|
/// As one request could lead to multiple responses, this interface |
|
|
|
|
/// demonstrates the idea of full duplexing. |
|
|
|
|
/// A sequence of requests with each request served by the server immediately. |
|
|
|
|
/// As one request could lead to multiple responses, this interface |
|
|
|
|
/// demonstrates the idea of full duplexing. |
|
|
|
|
/// </summary> |
|
|
|
|
/// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param> |
|
|
|
|
/// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param> |
|
|
|
|
/// <param name="cancellationToken">An optional token for canceling the call.</param> |
|
|
|
|
/// <returns>The call object.</returns> |
|
|
|
|
public virtual AsyncDuplexStreamingCall<global::Grpc.Testing.StreamingOutputCallRequest, global::Grpc.Testing.StreamingOutputCallResponse> FullDuplexCall(Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)) |
|
|
|
|
{ |
|
|
|
|
return FullDuplexCall(new CallOptions(headers, deadline, cancellationToken)); |
|
|
|
|
} |
|
|
|
|
/// <summary> |
|
|
|
|
/// A sequence of requests with each request served by the server immediately. |
|
|
|
|
/// As one request could lead to multiple responses, this interface |
|
|
|
|
/// demonstrates the idea of full duplexing. |
|
|
|
|
/// A sequence of requests with each request served by the server immediately. |
|
|
|
|
/// As one request could lead to multiple responses, this interface |
|
|
|
|
/// demonstrates the idea of full duplexing. |
|
|
|
|
/// </summary> |
|
|
|
|
/// <param name="options">The options for the call.</param> |
|
|
|
|
/// <returns>The call object.</returns> |
|
|
|
|
public virtual AsyncDuplexStreamingCall<global::Grpc.Testing.StreamingOutputCallRequest, global::Grpc.Testing.StreamingOutputCallResponse> FullDuplexCall(CallOptions options) |
|
|
|
|
{ |
|
|
|
|
return CallInvoker.AsyncDuplexStreamingCall(__Method_FullDuplexCall, null, options); |
|
|
|
|
} |
|
|
|
|
/// <summary> |
|
|
|
|
/// A sequence of requests followed by a sequence of responses. |
|
|
|
|
/// The server buffers all the client requests and then serves them in order. A |
|
|
|
|
/// stream of responses are returned to the client when the server starts with |
|
|
|
|
/// first request. |
|
|
|
|
/// A sequence of requests followed by a sequence of responses. |
|
|
|
|
/// The server buffers all the client requests and then serves them in order. A |
|
|
|
|
/// stream of responses are returned to the client when the server starts with |
|
|
|
|
/// first request. |
|
|
|
|
/// </summary> |
|
|
|
|
/// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param> |
|
|
|
|
/// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param> |
|
|
|
|
/// <param name="cancellationToken">An optional token for canceling the call.</param> |
|
|
|
|
/// <returns>The call object.</returns> |
|
|
|
|
public virtual AsyncDuplexStreamingCall<global::Grpc.Testing.StreamingOutputCallRequest, global::Grpc.Testing.StreamingOutputCallResponse> HalfDuplexCall(Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)) |
|
|
|
|
{ |
|
|
|
|
return HalfDuplexCall(new CallOptions(headers, deadline, cancellationToken)); |
|
|
|
|
} |
|
|
|
|
/// <summary> |
|
|
|
|
/// A sequence of requests followed by a sequence of responses. |
|
|
|
|
/// The server buffers all the client requests and then serves them in order. A |
|
|
|
|
/// stream of responses are returned to the client when the server starts with |
|
|
|
|
/// first request. |
|
|
|
|
/// A sequence of requests followed by a sequence of responses. |
|
|
|
|
/// The server buffers all the client requests and then serves them in order. A |
|
|
|
|
/// stream of responses are returned to the client when the server starts with |
|
|
|
|
/// first request. |
|
|
|
|
/// </summary> |
|
|
|
|
/// <param name="options">The options for the call.</param> |
|
|
|
|
/// <returns>The call object.</returns> |
|
|
|
|
public virtual AsyncDuplexStreamingCall<global::Grpc.Testing.StreamingOutputCallRequest, global::Grpc.Testing.StreamingOutputCallResponse> HalfDuplexCall(CallOptions options) |
|
|
|
|
{ |
|
|
|
|
return CallInvoker.AsyncDuplexStreamingCall(__Method_HalfDuplexCall, null, options); |
|
|
|
|
} |
|
|
|
|
/// <summary> |
|
|
|
|
/// The test server will not implement this method. It will be used |
|
|
|
|
/// to test the behavior when clients call unimplemented methods. |
|
|
|
|
/// The test server will not implement this method. It will be used |
|
|
|
|
/// to test the behavior when clients call unimplemented methods. |
|
|
|
|
/// </summary> |
|
|
|
|
/// <param name="request">The request to send to the server.</param> |
|
|
|
|
/// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param> |
|
|
|
|
/// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param> |
|
|
|
|
/// <param name="cancellationToken">An optional token for canceling the call.</param> |
|
|
|
|
/// <returns>The response received from the server.</returns> |
|
|
|
|
public virtual global::Grpc.Testing.Empty UnimplementedCall(global::Grpc.Testing.Empty request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)) |
|
|
|
|
{ |
|
|
|
|
return UnimplementedCall(request, new CallOptions(headers, deadline, cancellationToken)); |
|
|
|
|
} |
|
|
|
|
/// <summary> |
|
|
|
|
/// The test server will not implement this method. It will be used |
|
|
|
|
/// to test the behavior when clients call unimplemented methods. |
|
|
|
|
/// The test server will not implement this method. It will be used |
|
|
|
|
/// to test the behavior when clients call unimplemented methods. |
|
|
|
|
/// </summary> |
|
|
|
|
/// <param name="request">The request to send to the server.</param> |
|
|
|
|
/// <param name="options">The options for the call.</param> |
|
|
|
|
/// <returns>The response received from the server.</returns> |
|
|
|
|
public virtual global::Grpc.Testing.Empty UnimplementedCall(global::Grpc.Testing.Empty request, CallOptions options) |
|
|
|
|
{ |
|
|
|
|
return CallInvoker.BlockingUnaryCall(__Method_UnimplementedCall, null, options, request); |
|
|
|
|
} |
|
|
|
|
/// <summary> |
|
|
|
|
/// The test server will not implement this method. It will be used |
|
|
|
|
/// to test the behavior when clients call unimplemented methods. |
|
|
|
|
/// The test server will not implement this method. It will be used |
|
|
|
|
/// to test the behavior when clients call unimplemented methods. |
|
|
|
|
/// </summary> |
|
|
|
|
/// <param name="request">The request to send to the server.</param> |
|
|
|
|
/// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param> |
|
|
|
|
/// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param> |
|
|
|
|
/// <param name="cancellationToken">An optional token for canceling the call.</param> |
|
|
|
|
/// <returns>The call object.</returns> |
|
|
|
|
public virtual AsyncUnaryCall<global::Grpc.Testing.Empty> UnimplementedCallAsync(global::Grpc.Testing.Empty request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)) |
|
|
|
|
{ |
|
|
|
|
return UnimplementedCallAsync(request, new CallOptions(headers, deadline, cancellationToken)); |
|
|
|
|
} |
|
|
|
|
/// <summary> |
|
|
|
|
/// The test server will not implement this method. It will be used |
|
|
|
|
/// to test the behavior when clients call unimplemented methods. |
|
|
|
|
/// The test server will not implement this method. It will be used |
|
|
|
|
/// to test the behavior when clients call unimplemented methods. |
|
|
|
|
/// </summary> |
|
|
|
|
/// <param name="request">The request to send to the server.</param> |
|
|
|
|
/// <param name="options">The options for the call.</param> |
|
|
|
|
/// <returns>The call object.</returns> |
|
|
|
|
public virtual AsyncUnaryCall<global::Grpc.Testing.Empty> UnimplementedCallAsync(global::Grpc.Testing.Empty request, CallOptions options) |
|
|
|
|
{ |
|
|
|
|
return CallInvoker.AsyncUnaryCall(__Method_UnimplementedCall, null, options, request); |
|
|
|
@ -423,6 +540,7 @@ namespace Grpc.Testing { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/// <summary>Creates service definition that can be registered with a server</summary> |
|
|
|
|
/// <param name="serviceImpl">An object implementing the server-side handling logic.</param> |
|
|
|
|
public static ServerServiceDefinition BindService(TestServiceBase serviceImpl) |
|
|
|
|
{ |
|
|
|
|
return ServerServiceDefinition.CreateBuilder() |
|
|
|
@ -438,8 +556,8 @@ namespace Grpc.Testing { |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
/// <summary> |
|
|
|
|
/// A simple service NOT implemented at servers so clients can test for |
|
|
|
|
/// that case. |
|
|
|
|
/// A simple service NOT implemented at servers so clients can test for |
|
|
|
|
/// that case. |
|
|
|
|
/// </summary> |
|
|
|
|
public static partial class UnimplementedService |
|
|
|
|
{ |
|
|
|
@ -464,8 +582,11 @@ namespace Grpc.Testing { |
|
|
|
|
public abstract partial class UnimplementedServiceBase |
|
|
|
|
{ |
|
|
|
|
/// <summary> |
|
|
|
|
/// A call that no server should implement |
|
|
|
|
/// A call that no server should implement |
|
|
|
|
/// </summary> |
|
|
|
|
/// <param name="request">The request received from the client.</param> |
|
|
|
|
/// <param name="context">The context of the server-side call handler being invoked.</param> |
|
|
|
|
/// <returns>The response to send back to the client (wrapped by a task).</returns> |
|
|
|
|
public virtual global::System.Threading.Tasks.Task<global::Grpc.Testing.Empty> UnimplementedCall(global::Grpc.Testing.Empty request, ServerCallContext context) |
|
|
|
|
{ |
|
|
|
|
throw new RpcException(new Status(StatusCode.Unimplemented, "")); |
|
|
|
@ -497,29 +618,45 @@ namespace Grpc.Testing { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
/// A call that no server should implement |
|
|
|
|
/// A call that no server should implement |
|
|
|
|
/// </summary> |
|
|
|
|
/// <param name="request">The request to send to the server.</param> |
|
|
|
|
/// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param> |
|
|
|
|
/// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param> |
|
|
|
|
/// <param name="cancellationToken">An optional token for canceling the call.</param> |
|
|
|
|
/// <returns>The response received from the server.</returns> |
|
|
|
|
public virtual global::Grpc.Testing.Empty UnimplementedCall(global::Grpc.Testing.Empty request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)) |
|
|
|
|
{ |
|
|
|
|
return UnimplementedCall(request, new CallOptions(headers, deadline, cancellationToken)); |
|
|
|
|
} |
|
|
|
|
/// <summary> |
|
|
|
|
/// A call that no server should implement |
|
|
|
|
/// A call that no server should implement |
|
|
|
|
/// </summary> |
|
|
|
|
/// <param name="request">The request to send to the server.</param> |
|
|
|
|
/// <param name="options">The options for the call.</param> |
|
|
|
|
/// <returns>The response received from the server.</returns> |
|
|
|
|
public virtual global::Grpc.Testing.Empty UnimplementedCall(global::Grpc.Testing.Empty request, CallOptions options) |
|
|
|
|
{ |
|
|
|
|
return CallInvoker.BlockingUnaryCall(__Method_UnimplementedCall, null, options, request); |
|
|
|
|
} |
|
|
|
|
/// <summary> |
|
|
|
|
/// A call that no server should implement |
|
|
|
|
/// A call that no server should implement |
|
|
|
|
/// </summary> |
|
|
|
|
/// <param name="request">The request to send to the server.</param> |
|
|
|
|
/// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param> |
|
|
|
|
/// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param> |
|
|
|
|
/// <param name="cancellationToken">An optional token for canceling the call.</param> |
|
|
|
|
/// <returns>The call object.</returns> |
|
|
|
|
public virtual AsyncUnaryCall<global::Grpc.Testing.Empty> UnimplementedCallAsync(global::Grpc.Testing.Empty request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)) |
|
|
|
|
{ |
|
|
|
|
return UnimplementedCallAsync(request, new CallOptions(headers, deadline, cancellationToken)); |
|
|
|
|
} |
|
|
|
|
/// <summary> |
|
|
|
|
/// A call that no server should implement |
|
|
|
|
/// A call that no server should implement |
|
|
|
|
/// </summary> |
|
|
|
|
/// <param name="request">The request to send to the server.</param> |
|
|
|
|
/// <param name="options">The options for the call.</param> |
|
|
|
|
/// <returns>The call object.</returns> |
|
|
|
|
public virtual AsyncUnaryCall<global::Grpc.Testing.Empty> UnimplementedCallAsync(global::Grpc.Testing.Empty request, CallOptions options) |
|
|
|
|
{ |
|
|
|
|
return CallInvoker.AsyncUnaryCall(__Method_UnimplementedCall, null, options, request); |
|
|
|
@ -532,6 +669,7 @@ namespace Grpc.Testing { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/// <summary>Creates service definition that can be registered with a server</summary> |
|
|
|
|
/// <param name="serviceImpl">An object implementing the server-side handling logic.</param> |
|
|
|
|
public static ServerServiceDefinition BindService(UnimplementedServiceBase serviceImpl) |
|
|
|
|
{ |
|
|
|
|
return ServerServiceDefinition.CreateBuilder() |
|
|
|
@ -540,7 +678,7 @@ namespace Grpc.Testing { |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
/// <summary> |
|
|
|
|
/// A service used to control reconnect server. |
|
|
|
|
/// A service used to control reconnect server. |
|
|
|
|
/// </summary> |
|
|
|
|
public static partial class ReconnectService |
|
|
|
|
{ |
|
|
|
@ -648,6 +786,7 @@ namespace Grpc.Testing { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/// <summary>Creates service definition that can be registered with a server</summary> |
|
|
|
|
/// <param name="serviceImpl">An object implementing the server-side handling logic.</param> |
|
|
|
|
public static ServerServiceDefinition BindService(ReconnectServiceBase serviceImpl) |
|
|
|
|
{ |
|
|
|
|
return ServerServiceDefinition.CreateBuilder() |
|
|
|
|