|
|
@ -42,8 +42,8 @@ using Grpc.Core; |
|
|
|
|
|
|
|
|
|
|
|
namespace Grpc.Testing { |
|
|
|
namespace Grpc.Testing { |
|
|
|
/// <summary> |
|
|
|
/// <summary> |
|
|
|
/// A simple service to test the various types of RPCs and experiment with |
|
|
|
/// A simple service to test the various types of RPCs and experiment with |
|
|
|
/// performance with various types of payload. |
|
|
|
/// performance with various types of payload. |
|
|
|
/// </summary> |
|
|
|
/// </summary> |
|
|
|
public static partial class TestService |
|
|
|
public static partial class TestService |
|
|
|
{ |
|
|
|
{ |
|
|
@ -123,74 +123,101 @@ namespace Grpc.Testing { |
|
|
|
public abstract partial class TestServiceBase |
|
|
|
public abstract partial class TestServiceBase |
|
|
|
{ |
|
|
|
{ |
|
|
|
/// <summary> |
|
|
|
/// <summary> |
|
|
|
/// One empty request followed by one empty response. |
|
|
|
/// One empty request followed by one empty response. |
|
|
|
/// </summary> |
|
|
|
/// </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) |
|
|
|
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, "")); |
|
|
|
throw new RpcException(new Status(StatusCode.Unimplemented, "")); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// <summary> |
|
|
|
/// One request followed by one response. |
|
|
|
/// One request followed by one response. |
|
|
|
/// </summary> |
|
|
|
/// </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) |
|
|
|
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, "")); |
|
|
|
throw new RpcException(new Status(StatusCode.Unimplemented, "")); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// <summary> |
|
|
|
/// One request followed by one response. Response has cache control |
|
|
|
/// One request followed by one response. Response has cache control |
|
|
|
/// headers set such that a caching HTTP proxy (such as GFE) can |
|
|
|
/// headers set such that a caching HTTP proxy (such as GFE) can |
|
|
|
/// satisfy subsequent requests. |
|
|
|
/// satisfy subsequent requests. |
|
|
|
/// </summary> |
|
|
|
/// </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) |
|
|
|
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, "")); |
|
|
|
throw new RpcException(new Status(StatusCode.Unimplemented, "")); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// <summary> |
|
|
|
/// One request followed by a sequence of responses (streamed download). |
|
|
|
/// One request followed by a sequence of responses (streamed download). |
|
|
|
/// The server returns the payload with client desired type and sizes. |
|
|
|
/// The server returns the payload with client desired type and sizes. |
|
|
|
/// </summary> |
|
|
|
/// </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) |
|
|
|
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, "")); |
|
|
|
throw new RpcException(new Status(StatusCode.Unimplemented, "")); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// <summary> |
|
|
|
/// A sequence of requests followed by one response (streamed upload). |
|
|
|
/// A sequence of requests followed by one response (streamed upload). |
|
|
|
/// The server returns the aggregated size of client payload as the result. |
|
|
|
/// The server returns the aggregated size of client payload as the result. |
|
|
|
/// </summary> |
|
|
|
/// </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) |
|
|
|
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, "")); |
|
|
|
throw new RpcException(new Status(StatusCode.Unimplemented, "")); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// <summary> |
|
|
|
/// A sequence of requests with each request served by the server immediately. |
|
|
|
/// A sequence of requests with each request served by the server immediately. |
|
|
|
/// As one request could lead to multiple responses, this interface |
|
|
|
/// As one request could lead to multiple responses, this interface |
|
|
|
/// demonstrates the idea of full duplexing. |
|
|
|
/// demonstrates the idea of full duplexing. |
|
|
|
/// </summary> |
|
|
|
/// </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) |
|
|
|
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, "")); |
|
|
|
throw new RpcException(new Status(StatusCode.Unimplemented, "")); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// <summary> |
|
|
|
/// A sequence of requests followed by a sequence of responses. |
|
|
|
/// A sequence of requests followed by a sequence of responses. |
|
|
|
/// The server buffers all the client requests and then serves them in order. A |
|
|
|
/// 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 |
|
|
|
/// stream of responses are returned to the client when the server starts with |
|
|
|
/// first request. |
|
|
|
/// first request. |
|
|
|
/// </summary> |
|
|
|
/// </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) |
|
|
|
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, "")); |
|
|
|
throw new RpcException(new Status(StatusCode.Unimplemented, "")); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// <summary> |
|
|
|
/// The test server will not implement this method. It will be used |
|
|
|
/// The test server will not implement this method. It will be used |
|
|
|
/// to test the behavior when clients call unimplemented methods. |
|
|
|
/// to test the behavior when clients call unimplemented methods. |
|
|
|
/// </summary> |
|
|
|
/// </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) |
|
|
|
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, "")); |
|
|
|
throw new RpcException(new Status(StatusCode.Unimplemented, "")); |
|
|
@ -222,195 +249,285 @@ namespace Grpc.Testing { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// <summary> |
|
|
|
/// One empty request followed by one empty response. |
|
|
|
/// One empty request followed by one empty response. |
|
|
|
/// </summary> |
|
|
|
/// </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)) |
|
|
|
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)); |
|
|
|
return EmptyCall(request, new CallOptions(headers, deadline, cancellationToken)); |
|
|
|
} |
|
|
|
} |
|
|
|
/// <summary> |
|
|
|
/// <summary> |
|
|
|
/// One empty request followed by one empty response. |
|
|
|
/// One empty request followed by one empty response. |
|
|
|
/// </summary> |
|
|
|
/// </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) |
|
|
|
public virtual global::Grpc.Testing.Empty EmptyCall(global::Grpc.Testing.Empty request, CallOptions options) |
|
|
|
{ |
|
|
|
{ |
|
|
|
return CallInvoker.BlockingUnaryCall(__Method_EmptyCall, null, options, request); |
|
|
|
return CallInvoker.BlockingUnaryCall(__Method_EmptyCall, null, options, request); |
|
|
|
} |
|
|
|
} |
|
|
|
/// <summary> |
|
|
|
/// <summary> |
|
|
|
/// One empty request followed by one empty response. |
|
|
|
/// One empty request followed by one empty response. |
|
|
|
/// </summary> |
|
|
|
/// </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)) |
|
|
|
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)); |
|
|
|
return EmptyCallAsync(request, new CallOptions(headers, deadline, cancellationToken)); |
|
|
|
} |
|
|
|
} |
|
|
|
/// <summary> |
|
|
|
/// <summary> |
|
|
|
/// One empty request followed by one empty response. |
|
|
|
/// One empty request followed by one empty response. |
|
|
|
/// </summary> |
|
|
|
/// </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) |
|
|
|
public virtual AsyncUnaryCall<global::Grpc.Testing.Empty> EmptyCallAsync(global::Grpc.Testing.Empty request, CallOptions options) |
|
|
|
{ |
|
|
|
{ |
|
|
|
return CallInvoker.AsyncUnaryCall(__Method_EmptyCall, null, options, request); |
|
|
|
return CallInvoker.AsyncUnaryCall(__Method_EmptyCall, null, options, request); |
|
|
|
} |
|
|
|
} |
|
|
|
/// <summary> |
|
|
|
/// <summary> |
|
|
|
/// One request followed by one response. |
|
|
|
/// One request followed by one response. |
|
|
|
/// </summary> |
|
|
|
/// </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)) |
|
|
|
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)); |
|
|
|
return UnaryCall(request, new CallOptions(headers, deadline, cancellationToken)); |
|
|
|
} |
|
|
|
} |
|
|
|
/// <summary> |
|
|
|
/// <summary> |
|
|
|
/// One request followed by one response. |
|
|
|
/// One request followed by one response. |
|
|
|
/// </summary> |
|
|
|
/// </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) |
|
|
|
public virtual global::Grpc.Testing.SimpleResponse UnaryCall(global::Grpc.Testing.SimpleRequest request, CallOptions options) |
|
|
|
{ |
|
|
|
{ |
|
|
|
return CallInvoker.BlockingUnaryCall(__Method_UnaryCall, null, options, request); |
|
|
|
return CallInvoker.BlockingUnaryCall(__Method_UnaryCall, null, options, request); |
|
|
|
} |
|
|
|
} |
|
|
|
/// <summary> |
|
|
|
/// <summary> |
|
|
|
/// One request followed by one response. |
|
|
|
/// One request followed by one response. |
|
|
|
/// </summary> |
|
|
|
/// </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)) |
|
|
|
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)); |
|
|
|
return UnaryCallAsync(request, new CallOptions(headers, deadline, cancellationToken)); |
|
|
|
} |
|
|
|
} |
|
|
|
/// <summary> |
|
|
|
/// <summary> |
|
|
|
/// One request followed by one response. |
|
|
|
/// One request followed by one response. |
|
|
|
/// </summary> |
|
|
|
/// </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) |
|
|
|
public virtual AsyncUnaryCall<global::Grpc.Testing.SimpleResponse> UnaryCallAsync(global::Grpc.Testing.SimpleRequest request, CallOptions options) |
|
|
|
{ |
|
|
|
{ |
|
|
|
return CallInvoker.AsyncUnaryCall(__Method_UnaryCall, null, options, request); |
|
|
|
return CallInvoker.AsyncUnaryCall(__Method_UnaryCall, null, options, request); |
|
|
|
} |
|
|
|
} |
|
|
|
/// <summary> |
|
|
|
/// <summary> |
|
|
|
/// One request followed by one response. Response has cache control |
|
|
|
/// One request followed by one response. Response has cache control |
|
|
|
/// headers set such that a caching HTTP proxy (such as GFE) can |
|
|
|
/// headers set such that a caching HTTP proxy (such as GFE) can |
|
|
|
/// satisfy subsequent requests. |
|
|
|
/// satisfy subsequent requests. |
|
|
|
/// </summary> |
|
|
|
/// </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)) |
|
|
|
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)); |
|
|
|
return CacheableUnaryCall(request, new CallOptions(headers, deadline, cancellationToken)); |
|
|
|
} |
|
|
|
} |
|
|
|
/// <summary> |
|
|
|
/// <summary> |
|
|
|
/// One request followed by one response. Response has cache control |
|
|
|
/// One request followed by one response. Response has cache control |
|
|
|
/// headers set such that a caching HTTP proxy (such as GFE) can |
|
|
|
/// headers set such that a caching HTTP proxy (such as GFE) can |
|
|
|
/// satisfy subsequent requests. |
|
|
|
/// satisfy subsequent requests. |
|
|
|
/// </summary> |
|
|
|
/// </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) |
|
|
|
public virtual global::Grpc.Testing.SimpleResponse CacheableUnaryCall(global::Grpc.Testing.SimpleRequest request, CallOptions options) |
|
|
|
{ |
|
|
|
{ |
|
|
|
return CallInvoker.BlockingUnaryCall(__Method_CacheableUnaryCall, null, options, request); |
|
|
|
return CallInvoker.BlockingUnaryCall(__Method_CacheableUnaryCall, null, options, request); |
|
|
|
} |
|
|
|
} |
|
|
|
/// <summary> |
|
|
|
/// <summary> |
|
|
|
/// One request followed by one response. Response has cache control |
|
|
|
/// One request followed by one response. Response has cache control |
|
|
|
/// headers set such that a caching HTTP proxy (such as GFE) can |
|
|
|
/// headers set such that a caching HTTP proxy (such as GFE) can |
|
|
|
/// satisfy subsequent requests. |
|
|
|
/// satisfy subsequent requests. |
|
|
|
/// </summary> |
|
|
|
/// </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)) |
|
|
|
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)); |
|
|
|
return CacheableUnaryCallAsync(request, new CallOptions(headers, deadline, cancellationToken)); |
|
|
|
} |
|
|
|
} |
|
|
|
/// <summary> |
|
|
|
/// <summary> |
|
|
|
/// One request followed by one response. Response has cache control |
|
|
|
/// One request followed by one response. Response has cache control |
|
|
|
/// headers set such that a caching HTTP proxy (such as GFE) can |
|
|
|
/// headers set such that a caching HTTP proxy (such as GFE) can |
|
|
|
/// satisfy subsequent requests. |
|
|
|
/// satisfy subsequent requests. |
|
|
|
/// </summary> |
|
|
|
/// </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) |
|
|
|
public virtual AsyncUnaryCall<global::Grpc.Testing.SimpleResponse> CacheableUnaryCallAsync(global::Grpc.Testing.SimpleRequest request, CallOptions options) |
|
|
|
{ |
|
|
|
{ |
|
|
|
return CallInvoker.AsyncUnaryCall(__Method_CacheableUnaryCall, null, options, request); |
|
|
|
return CallInvoker.AsyncUnaryCall(__Method_CacheableUnaryCall, null, options, request); |
|
|
|
} |
|
|
|
} |
|
|
|
/// <summary> |
|
|
|
/// <summary> |
|
|
|
/// One request followed by a sequence of responses (streamed download). |
|
|
|
/// One request followed by a sequence of responses (streamed download). |
|
|
|
/// The server returns the payload with client desired type and sizes. |
|
|
|
/// The server returns the payload with client desired type and sizes. |
|
|
|
/// </summary> |
|
|
|
/// </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)) |
|
|
|
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)); |
|
|
|
return StreamingOutputCall(request, new CallOptions(headers, deadline, cancellationToken)); |
|
|
|
} |
|
|
|
} |
|
|
|
/// <summary> |
|
|
|
/// <summary> |
|
|
|
/// One request followed by a sequence of responses (streamed download). |
|
|
|
/// One request followed by a sequence of responses (streamed download). |
|
|
|
/// The server returns the payload with client desired type and sizes. |
|
|
|
/// The server returns the payload with client desired type and sizes. |
|
|
|
/// </summary> |
|
|
|
/// </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) |
|
|
|
public virtual AsyncServerStreamingCall<global::Grpc.Testing.StreamingOutputCallResponse> StreamingOutputCall(global::Grpc.Testing.StreamingOutputCallRequest request, CallOptions options) |
|
|
|
{ |
|
|
|
{ |
|
|
|
return CallInvoker.AsyncServerStreamingCall(__Method_StreamingOutputCall, null, options, request); |
|
|
|
return CallInvoker.AsyncServerStreamingCall(__Method_StreamingOutputCall, null, options, request); |
|
|
|
} |
|
|
|
} |
|
|
|
/// <summary> |
|
|
|
/// <summary> |
|
|
|
/// A sequence of requests followed by one response (streamed upload). |
|
|
|
/// A sequence of requests followed by one response (streamed upload). |
|
|
|
/// The server returns the aggregated size of client payload as the result. |
|
|
|
/// The server returns the aggregated size of client payload as the result. |
|
|
|
/// </summary> |
|
|
|
/// </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)) |
|
|
|
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)); |
|
|
|
return StreamingInputCall(new CallOptions(headers, deadline, cancellationToken)); |
|
|
|
} |
|
|
|
} |
|
|
|
/// <summary> |
|
|
|
/// <summary> |
|
|
|
/// A sequence of requests followed by one response (streamed upload). |
|
|
|
/// A sequence of requests followed by one response (streamed upload). |
|
|
|
/// The server returns the aggregated size of client payload as the result. |
|
|
|
/// The server returns the aggregated size of client payload as the result. |
|
|
|
/// </summary> |
|
|
|
/// </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) |
|
|
|
public virtual AsyncClientStreamingCall<global::Grpc.Testing.StreamingInputCallRequest, global::Grpc.Testing.StreamingInputCallResponse> StreamingInputCall(CallOptions options) |
|
|
|
{ |
|
|
|
{ |
|
|
|
return CallInvoker.AsyncClientStreamingCall(__Method_StreamingInputCall, null, options); |
|
|
|
return CallInvoker.AsyncClientStreamingCall(__Method_StreamingInputCall, null, options); |
|
|
|
} |
|
|
|
} |
|
|
|
/// <summary> |
|
|
|
/// <summary> |
|
|
|
/// A sequence of requests with each request served by the server immediately. |
|
|
|
/// A sequence of requests with each request served by the server immediately. |
|
|
|
/// As one request could lead to multiple responses, this interface |
|
|
|
/// As one request could lead to multiple responses, this interface |
|
|
|
/// demonstrates the idea of full duplexing. |
|
|
|
/// demonstrates the idea of full duplexing. |
|
|
|
/// </summary> |
|
|
|
/// </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)) |
|
|
|
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)); |
|
|
|
return FullDuplexCall(new CallOptions(headers, deadline, cancellationToken)); |
|
|
|
} |
|
|
|
} |
|
|
|
/// <summary> |
|
|
|
/// <summary> |
|
|
|
/// A sequence of requests with each request served by the server immediately. |
|
|
|
/// A sequence of requests with each request served by the server immediately. |
|
|
|
/// As one request could lead to multiple responses, this interface |
|
|
|
/// As one request could lead to multiple responses, this interface |
|
|
|
/// demonstrates the idea of full duplexing. |
|
|
|
/// demonstrates the idea of full duplexing. |
|
|
|
/// </summary> |
|
|
|
/// </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) |
|
|
|
public virtual AsyncDuplexStreamingCall<global::Grpc.Testing.StreamingOutputCallRequest, global::Grpc.Testing.StreamingOutputCallResponse> FullDuplexCall(CallOptions options) |
|
|
|
{ |
|
|
|
{ |
|
|
|
return CallInvoker.AsyncDuplexStreamingCall(__Method_FullDuplexCall, null, options); |
|
|
|
return CallInvoker.AsyncDuplexStreamingCall(__Method_FullDuplexCall, null, options); |
|
|
|
} |
|
|
|
} |
|
|
|
/// <summary> |
|
|
|
/// <summary> |
|
|
|
/// A sequence of requests followed by a sequence of responses. |
|
|
|
/// A sequence of requests followed by a sequence of responses. |
|
|
|
/// The server buffers all the client requests and then serves them in order. A |
|
|
|
/// 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 |
|
|
|
/// stream of responses are returned to the client when the server starts with |
|
|
|
/// first request. |
|
|
|
/// first request. |
|
|
|
/// </summary> |
|
|
|
/// </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)) |
|
|
|
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)); |
|
|
|
return HalfDuplexCall(new CallOptions(headers, deadline, cancellationToken)); |
|
|
|
} |
|
|
|
} |
|
|
|
/// <summary> |
|
|
|
/// <summary> |
|
|
|
/// A sequence of requests followed by a sequence of responses. |
|
|
|
/// A sequence of requests followed by a sequence of responses. |
|
|
|
/// The server buffers all the client requests and then serves them in order. A |
|
|
|
/// 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 |
|
|
|
/// stream of responses are returned to the client when the server starts with |
|
|
|
/// first request. |
|
|
|
/// first request. |
|
|
|
/// </summary> |
|
|
|
/// </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) |
|
|
|
public virtual AsyncDuplexStreamingCall<global::Grpc.Testing.StreamingOutputCallRequest, global::Grpc.Testing.StreamingOutputCallResponse> HalfDuplexCall(CallOptions options) |
|
|
|
{ |
|
|
|
{ |
|
|
|
return CallInvoker.AsyncDuplexStreamingCall(__Method_HalfDuplexCall, null, options); |
|
|
|
return CallInvoker.AsyncDuplexStreamingCall(__Method_HalfDuplexCall, null, options); |
|
|
|
} |
|
|
|
} |
|
|
|
/// <summary> |
|
|
|
/// <summary> |
|
|
|
/// The test server will not implement this method. It will be used |
|
|
|
/// The test server will not implement this method. It will be used |
|
|
|
/// to test the behavior when clients call unimplemented methods. |
|
|
|
/// to test the behavior when clients call unimplemented methods. |
|
|
|
/// </summary> |
|
|
|
/// </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)) |
|
|
|
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)); |
|
|
|
return UnimplementedCall(request, new CallOptions(headers, deadline, cancellationToken)); |
|
|
|
} |
|
|
|
} |
|
|
|
/// <summary> |
|
|
|
/// <summary> |
|
|
|
/// The test server will not implement this method. It will be used |
|
|
|
/// The test server will not implement this method. It will be used |
|
|
|
/// to test the behavior when clients call unimplemented methods. |
|
|
|
/// to test the behavior when clients call unimplemented methods. |
|
|
|
/// </summary> |
|
|
|
/// </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) |
|
|
|
public virtual global::Grpc.Testing.Empty UnimplementedCall(global::Grpc.Testing.Empty request, CallOptions options) |
|
|
|
{ |
|
|
|
{ |
|
|
|
return CallInvoker.BlockingUnaryCall(__Method_UnimplementedCall, null, options, request); |
|
|
|
return CallInvoker.BlockingUnaryCall(__Method_UnimplementedCall, null, options, request); |
|
|
|
} |
|
|
|
} |
|
|
|
/// <summary> |
|
|
|
/// <summary> |
|
|
|
/// The test server will not implement this method. It will be used |
|
|
|
/// The test server will not implement this method. It will be used |
|
|
|
/// to test the behavior when clients call unimplemented methods. |
|
|
|
/// to test the behavior when clients call unimplemented methods. |
|
|
|
/// </summary> |
|
|
|
/// </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)) |
|
|
|
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)); |
|
|
|
return UnimplementedCallAsync(request, new CallOptions(headers, deadline, cancellationToken)); |
|
|
|
} |
|
|
|
} |
|
|
|
/// <summary> |
|
|
|
/// <summary> |
|
|
|
/// The test server will not implement this method. It will be used |
|
|
|
/// The test server will not implement this method. It will be used |
|
|
|
/// to test the behavior when clients call unimplemented methods. |
|
|
|
/// to test the behavior when clients call unimplemented methods. |
|
|
|
/// </summary> |
|
|
|
/// </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) |
|
|
|
public virtual AsyncUnaryCall<global::Grpc.Testing.Empty> UnimplementedCallAsync(global::Grpc.Testing.Empty request, CallOptions options) |
|
|
|
{ |
|
|
|
{ |
|
|
|
return CallInvoker.AsyncUnaryCall(__Method_UnimplementedCall, null, options, request); |
|
|
|
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> |
|
|
|
/// <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) |
|
|
|
public static ServerServiceDefinition BindService(TestServiceBase serviceImpl) |
|
|
|
{ |
|
|
|
{ |
|
|
|
return ServerServiceDefinition.CreateBuilder() |
|
|
|
return ServerServiceDefinition.CreateBuilder() |
|
|
@ -438,8 +556,8 @@ namespace Grpc.Testing { |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
/// <summary> |
|
|
|
/// <summary> |
|
|
|
/// A simple service NOT implemented at servers so clients can test for |
|
|
|
/// A simple service NOT implemented at servers so clients can test for |
|
|
|
/// that case. |
|
|
|
/// that case. |
|
|
|
/// </summary> |
|
|
|
/// </summary> |
|
|
|
public static partial class UnimplementedService |
|
|
|
public static partial class UnimplementedService |
|
|
|
{ |
|
|
|
{ |
|
|
@ -464,8 +582,11 @@ namespace Grpc.Testing { |
|
|
|
public abstract partial class UnimplementedServiceBase |
|
|
|
public abstract partial class UnimplementedServiceBase |
|
|
|
{ |
|
|
|
{ |
|
|
|
/// <summary> |
|
|
|
/// <summary> |
|
|
|
/// A call that no server should implement |
|
|
|
/// A call that no server should implement |
|
|
|
/// </summary> |
|
|
|
/// </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) |
|
|
|
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, "")); |
|
|
|
throw new RpcException(new Status(StatusCode.Unimplemented, "")); |
|
|
@ -497,29 +618,45 @@ namespace Grpc.Testing { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// <summary> |
|
|
|
/// A call that no server should implement |
|
|
|
/// A call that no server should implement |
|
|
|
/// </summary> |
|
|
|
/// </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)) |
|
|
|
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)); |
|
|
|
return UnimplementedCall(request, new CallOptions(headers, deadline, cancellationToken)); |
|
|
|
} |
|
|
|
} |
|
|
|
/// <summary> |
|
|
|
/// <summary> |
|
|
|
/// A call that no server should implement |
|
|
|
/// A call that no server should implement |
|
|
|
/// </summary> |
|
|
|
/// </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) |
|
|
|
public virtual global::Grpc.Testing.Empty UnimplementedCall(global::Grpc.Testing.Empty request, CallOptions options) |
|
|
|
{ |
|
|
|
{ |
|
|
|
return CallInvoker.BlockingUnaryCall(__Method_UnimplementedCall, null, options, request); |
|
|
|
return CallInvoker.BlockingUnaryCall(__Method_UnimplementedCall, null, options, request); |
|
|
|
} |
|
|
|
} |
|
|
|
/// <summary> |
|
|
|
/// <summary> |
|
|
|
/// A call that no server should implement |
|
|
|
/// A call that no server should implement |
|
|
|
/// </summary> |
|
|
|
/// </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)) |
|
|
|
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)); |
|
|
|
return UnimplementedCallAsync(request, new CallOptions(headers, deadline, cancellationToken)); |
|
|
|
} |
|
|
|
} |
|
|
|
/// <summary> |
|
|
|
/// <summary> |
|
|
|
/// A call that no server should implement |
|
|
|
/// A call that no server should implement |
|
|
|
/// </summary> |
|
|
|
/// </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) |
|
|
|
public virtual AsyncUnaryCall<global::Grpc.Testing.Empty> UnimplementedCallAsync(global::Grpc.Testing.Empty request, CallOptions options) |
|
|
|
{ |
|
|
|
{ |
|
|
|
return CallInvoker.AsyncUnaryCall(__Method_UnimplementedCall, null, options, request); |
|
|
|
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> |
|
|
|
/// <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) |
|
|
|
public static ServerServiceDefinition BindService(UnimplementedServiceBase serviceImpl) |
|
|
|
{ |
|
|
|
{ |
|
|
|
return ServerServiceDefinition.CreateBuilder() |
|
|
|
return ServerServiceDefinition.CreateBuilder() |
|
|
@ -540,7 +678,7 @@ namespace Grpc.Testing { |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
/// <summary> |
|
|
|
/// <summary> |
|
|
|
/// A service used to control reconnect server. |
|
|
|
/// A service used to control reconnect server. |
|
|
|
/// </summary> |
|
|
|
/// </summary> |
|
|
|
public static partial class ReconnectService |
|
|
|
public static partial class ReconnectService |
|
|
|
{ |
|
|
|
{ |
|
|
@ -648,6 +786,7 @@ namespace Grpc.Testing { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// <summary>Creates service definition that can be registered with a server</summary> |
|
|
|
/// <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) |
|
|
|
public static ServerServiceDefinition BindService(ReconnectServiceBase serviceImpl) |
|
|
|
{ |
|
|
|
{ |
|
|
|
return ServerServiceDefinition.CreateBuilder() |
|
|
|
return ServerServiceDefinition.CreateBuilder() |
|
|
|