OLD | NEW |
(Empty) | |
| 1 // Generated by the protocol buffer compiler. DO NOT EDIT! |
| 2 // source: health.proto |
| 3 #region Designer generated code |
| 4 |
| 5 using System; |
| 6 using System.Threading; |
| 7 using System.Threading.Tasks; |
| 8 using Grpc.Core; |
| 9 |
| 10 namespace Grpc.Health.V1 { |
| 11 public static class Health |
| 12 { |
| 13 static readonly string __ServiceName = "grpc.health.v1.Health"; |
| 14 |
| 15 static readonly Marshaller<global::Grpc.Health.V1.HealthCheckRequest> __Mars
haller_HealthCheckRequest = Marshallers.Create((arg) => global::Google.Protobuf.
MessageExtensions.ToByteArray(arg), global::Grpc.Health.V1.HealthCheckRequest.Pa
rser.ParseFrom); |
| 16 static readonly Marshaller<global::Grpc.Health.V1.HealthCheckResponse> __Mar
shaller_HealthCheckResponse = Marshallers.Create((arg) => global::Google.Protobu
f.MessageExtensions.ToByteArray(arg), global::Grpc.Health.V1.HealthCheckResponse
.Parser.ParseFrom); |
| 17 |
| 18 static readonly Method<global::Grpc.Health.V1.HealthCheckRequest, global::Gr
pc.Health.V1.HealthCheckResponse> __Method_Check = new Method<global::Grpc.Healt
h.V1.HealthCheckRequest, global::Grpc.Health.V1.HealthCheckResponse>( |
| 19 MethodType.Unary, |
| 20 __ServiceName, |
| 21 "Check", |
| 22 __Marshaller_HealthCheckRequest, |
| 23 __Marshaller_HealthCheckResponse); |
| 24 |
| 25 // service descriptor |
| 26 public static global::Google.Protobuf.Reflection.ServiceDescriptor Descripto
r |
| 27 { |
| 28 get { return global::Grpc.Health.V1.HealthReflection.Descriptor.Services[0
]; } |
| 29 } |
| 30 |
| 31 // client interface |
| 32 public interface IHealthClient |
| 33 { |
| 34 global::Grpc.Health.V1.HealthCheckResponse Check(global::Grpc.Health.V1.He
althCheckRequest request, Metadata headers = null, DateTime? deadline = null, Ca
ncellationToken cancellationToken = default(CancellationToken)); |
| 35 global::Grpc.Health.V1.HealthCheckResponse Check(global::Grpc.Health.V1.He
althCheckRequest request, CallOptions options); |
| 36 AsyncUnaryCall<global::Grpc.Health.V1.HealthCheckResponse> CheckAsync(glob
al::Grpc.Health.V1.HealthCheckRequest request, Metadata headers = null, DateTime
? deadline = null, CancellationToken cancellationToken = default(CancellationTok
en)); |
| 37 AsyncUnaryCall<global::Grpc.Health.V1.HealthCheckResponse> CheckAsync(glob
al::Grpc.Health.V1.HealthCheckRequest request, CallOptions options); |
| 38 } |
| 39 |
| 40 // server-side interface |
| 41 public interface IHealth |
| 42 { |
| 43 Task<global::Grpc.Health.V1.HealthCheckResponse> Check(global::Grpc.Health
.V1.HealthCheckRequest request, ServerCallContext context); |
| 44 } |
| 45 |
| 46 // client stub |
| 47 public class HealthClient : ClientBase, IHealthClient |
| 48 { |
| 49 public HealthClient(Channel channel) : base(channel) |
| 50 { |
| 51 } |
| 52 public global::Grpc.Health.V1.HealthCheckResponse Check(global::Grpc.Healt
h.V1.HealthCheckRequest request, Metadata headers = null, DateTime? deadline = n
ull, CancellationToken cancellationToken = default(CancellationToken)) |
| 53 { |
| 54 var call = CreateCall(__Method_Check, new CallOptions(headers, deadline,
cancellationToken)); |
| 55 return Calls.BlockingUnaryCall(call, request); |
| 56 } |
| 57 public global::Grpc.Health.V1.HealthCheckResponse Check(global::Grpc.Healt
h.V1.HealthCheckRequest request, CallOptions options) |
| 58 { |
| 59 var call = CreateCall(__Method_Check, options); |
| 60 return Calls.BlockingUnaryCall(call, request); |
| 61 } |
| 62 public AsyncUnaryCall<global::Grpc.Health.V1.HealthCheckResponse> CheckAsy
nc(global::Grpc.Health.V1.HealthCheckRequest request, Metadata headers = null, D
ateTime? deadline = null, CancellationToken cancellationToken = default(Cancella
tionToken)) |
| 63 { |
| 64 var call = CreateCall(__Method_Check, new CallOptions(headers, deadline,
cancellationToken)); |
| 65 return Calls.AsyncUnaryCall(call, request); |
| 66 } |
| 67 public AsyncUnaryCall<global::Grpc.Health.V1.HealthCheckResponse> CheckAsy
nc(global::Grpc.Health.V1.HealthCheckRequest request, CallOptions options) |
| 68 { |
| 69 var call = CreateCall(__Method_Check, options); |
| 70 return Calls.AsyncUnaryCall(call, request); |
| 71 } |
| 72 } |
| 73 |
| 74 // creates service definition that can be registered with a server |
| 75 public static ServerServiceDefinition BindService(IHealth serviceImpl) |
| 76 { |
| 77 return ServerServiceDefinition.CreateBuilder(__ServiceName) |
| 78 .AddMethod(__Method_Check, serviceImpl.Check).Build(); |
| 79 } |
| 80 |
| 81 // creates a new client |
| 82 public static HealthClient NewClient(Channel channel) |
| 83 { |
| 84 return new HealthClient(channel); |
| 85 } |
| 86 |
| 87 } |
| 88 } |
| 89 #endregion |
OLD | NEW |