aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/csharp/Grpc.HealthCheck
diff options
context:
space:
mode:
authorGravatar Jan Tattermusch <jtattermusch@google.com>2016-03-21 19:03:14 -0700
committerGravatar Jan Tattermusch <jtattermusch@google.com>2016-04-01 16:25:46 -0700
commitddc4e346bc3a59cef38bdf3e79fb2f1940bb4df2 (patch)
treea8f6989cd1c2ccc8905114779ae45031f16cc1c2 /src/csharp/Grpc.HealthCheck
parentacb842c205dc8e2feecba7e150fa39071db7c894 (diff)
regenerate code
Diffstat (limited to 'src/csharp/Grpc.HealthCheck')
-rw-r--r--src/csharp/Grpc.HealthCheck/HealthGrpc.cs39
1 files changed, 26 insertions, 13 deletions
diff --git a/src/csharp/Grpc.HealthCheck/HealthGrpc.cs b/src/csharp/Grpc.HealthCheck/HealthGrpc.cs
index fffdf03be4..72e11cca3a 100644
--- a/src/csharp/Grpc.HealthCheck/HealthGrpc.cs
+++ b/src/csharp/Grpc.HealthCheck/HealthGrpc.cs
@@ -29,6 +29,7 @@ namespace Grpc.Health.V1 {
}
// client interface
+ [System.Obsolete("Client side interfaced will be removed in the next release. Use client class directly.")]
public interface IHealthClient
{
global::Grpc.Health.V1.HealthCheckResponse Check(global::Grpc.Health.V1.HealthCheckRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
@@ -55,30 +56,42 @@ namespace Grpc.Health.V1 {
}
// client stub
- public class HealthClient : ClientBase, IHealthClient
+ public class HealthClient : ClientBase<HealthClient>, IHealthClient
{
public HealthClient(Channel channel) : base(channel)
{
}
- public global::Grpc.Health.V1.HealthCheckResponse Check(global::Grpc.Health.V1.HealthCheckRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
+ public HealthClient(CallInvoker callInvoker) : base(callInvoker)
{
- var call = CreateCall(__Method_Check, new CallOptions(headers, deadline, cancellationToken));
- return Calls.BlockingUnaryCall(call, request);
}
- public global::Grpc.Health.V1.HealthCheckResponse Check(global::Grpc.Health.V1.HealthCheckRequest request, CallOptions options)
+ ///<summary>Protected parameterless constructor to allow creation of test doubles.</summary>
+ protected HealthClient() : base()
{
- var call = CreateCall(__Method_Check, options);
- return Calls.BlockingUnaryCall(call, request);
}
- public AsyncUnaryCall<global::Grpc.Health.V1.HealthCheckResponse> CheckAsync(global::Grpc.Health.V1.HealthCheckRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
+ ///<summary>Protected constructor to allow creation of configured clients.</summary>
+ protected HealthClient(ClientBaseConfiguration configuration) : base(configuration)
{
- var call = CreateCall(__Method_Check, new CallOptions(headers, deadline, cancellationToken));
- return Calls.AsyncUnaryCall(call, request);
}
- public AsyncUnaryCall<global::Grpc.Health.V1.HealthCheckResponse> CheckAsync(global::Grpc.Health.V1.HealthCheckRequest request, CallOptions options)
+
+ public virtual global::Grpc.Health.V1.HealthCheckResponse Check(global::Grpc.Health.V1.HealthCheckRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ return Check(request, new CallOptions(headers, deadline, cancellationToken));
+ }
+ public virtual global::Grpc.Health.V1.HealthCheckResponse Check(global::Grpc.Health.V1.HealthCheckRequest request, CallOptions options)
+ {
+ return CallInvoker.BlockingUnaryCall(__Method_Check, null, options, request);
+ }
+ public virtual AsyncUnaryCall<global::Grpc.Health.V1.HealthCheckResponse> CheckAsync(global::Grpc.Health.V1.HealthCheckRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ return CheckAsync(request, new CallOptions(headers, deadline, cancellationToken));
+ }
+ public virtual AsyncUnaryCall<global::Grpc.Health.V1.HealthCheckResponse> CheckAsync(global::Grpc.Health.V1.HealthCheckRequest request, CallOptions options)
+ {
+ return CallInvoker.AsyncUnaryCall(__Method_Check, null, options, request);
+ }
+ protected override HealthClient NewInstance(ClientBaseConfiguration configuration)
{
- var call = CreateCall(__Method_Check, options);
- return Calls.AsyncUnaryCall(call, request);
+ return new HealthClient(configuration);
}
}