1 // <auto-generated> 2 // Generated by the protocol buffer compiler. DO NOT EDIT! 3 // source: grpc/reflection/v1alpha/reflection.proto 4 // </auto-generated> 5 // Original file comments: 6 // Copyright 2016 gRPC authors. 7 // 8 // Licensed under the Apache License, Version 2.0 (the "License"); 9 // you may not use this file except in compliance with the License. 10 // You may obtain a copy of the License at 11 // 12 // http://www.apache.org/licenses/LICENSE-2.0 13 // 14 // Unless required by applicable law or agreed to in writing, software 15 // distributed under the License is distributed on an "AS IS" BASIS, 16 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 // See the License for the specific language governing permissions and 18 // limitations under the License. 19 // 20 // Service exported by server reflection 21 // 22 #pragma warning disable 0414, 1591 23 #region Designer generated code 24 25 using grpc = global::Grpc.Core; 26 27 namespace Grpc.Reflection.V1Alpha { 28 public static partial class ServerReflection 29 { 30 static readonly string __ServiceName = "grpc.reflection.v1alpha.ServerReflection"; 31 32 static readonly grpc::Marshaller<global::Grpc.Reflection.V1Alpha.ServerReflectionRequest> __Marshaller_grpc_reflection_v1alpha_ServerReflectionRequest = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Reflection.V1Alpha.ServerReflectionRequest.Parser.ParseFrom); 33 static readonly grpc::Marshaller<global::Grpc.Reflection.V1Alpha.ServerReflectionResponse> __Marshaller_grpc_reflection_v1alpha_ServerReflectionResponse = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Reflection.V1Alpha.ServerReflectionResponse.Parser.ParseFrom); 34 35 static readonly grpc::Method<global::Grpc.Reflection.V1Alpha.ServerReflectionRequest, global::Grpc.Reflection.V1Alpha.ServerReflectionResponse> __Method_ServerReflectionInfo = new grpc::Method<global::Grpc.Reflection.V1Alpha.ServerReflectionRequest, global::Grpc.Reflection.V1Alpha.ServerReflectionResponse>( 36 grpc::MethodType.DuplexStreaming, 37 __ServiceName, 38 "ServerReflectionInfo", 39 __Marshaller_grpc_reflection_v1alpha_ServerReflectionRequest, 40 __Marshaller_grpc_reflection_v1alpha_ServerReflectionResponse); 41 42 /// <summary>Service descriptor</summary> 43 public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor 44 { 45 get { return global::Grpc.Reflection.V1Alpha.ReflectionReflection.Descriptor.Services[0]; } 46 } 47 48 /// <summary>Base class for server-side implementations of ServerReflection</summary> 49 [grpc::BindServiceMethod(typeof(ServerReflection), "BindService")] 50 public abstract partial class ServerReflectionBase 51 { 52 /// <summary> 53 /// The reflection service is structured as a bidirectional stream, ensuring 54 /// all related requests go to a single server. 55 /// </summary> 56 /// <param name="requestStream">Used for reading requests from the client.</param> 57 /// <param name="responseStream">Used for sending responses back to the client.</param> 58 /// <param name="context">The context of the server-side call handler being invoked.</param> 59 /// <returns>A task indicating completion of the handler.</returns> ServerReflectionInfo(grpc::IAsyncStreamReader<global::Grpc.Reflection.V1Alpha.ServerReflectionRequest> requestStream, grpc::IServerStreamWriter<global::Grpc.Reflection.V1Alpha.ServerReflectionResponse> responseStream, grpc::ServerCallContext context)60 public virtual global::System.Threading.Tasks.Task ServerReflectionInfo(grpc::IAsyncStreamReader<global::Grpc.Reflection.V1Alpha.ServerReflectionRequest> requestStream, grpc::IServerStreamWriter<global::Grpc.Reflection.V1Alpha.ServerReflectionResponse> responseStream, grpc::ServerCallContext context) 61 { 62 throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); 63 } 64 65 } 66 67 /// <summary>Client for ServerReflection</summary> 68 public partial class ServerReflectionClient : grpc::ClientBase<ServerReflectionClient> 69 { 70 /// <summary>Creates a new client for ServerReflection</summary> 71 /// <param name="channel">The channel to use to make remote calls.</param> ServerReflectionClient(grpc::ChannelBase channel)72 public ServerReflectionClient(grpc::ChannelBase channel) : base(channel) 73 { 74 } 75 /// <summary>Creates a new client for ServerReflection that uses a custom <c>CallInvoker</c>.</summary> 76 /// <param name="callInvoker">The callInvoker to use to make remote calls.</param> ServerReflectionClient(grpc::CallInvoker callInvoker)77 public ServerReflectionClient(grpc::CallInvoker callInvoker) : base(callInvoker) 78 { 79 } 80 /// <summary>Protected parameterless constructor to allow creation of test doubles.</summary> ServerReflectionClient()81 protected ServerReflectionClient() : base() 82 { 83 } 84 /// <summary>Protected constructor to allow creation of configured clients.</summary> 85 /// <param name="configuration">The client configuration.</param> ServerReflectionClient(ClientBaseConfiguration configuration)86 protected ServerReflectionClient(ClientBaseConfiguration configuration) : base(configuration) 87 { 88 } 89 90 /// <summary> 91 /// The reflection service is structured as a bidirectional stream, ensuring 92 /// all related requests go to a single server. 93 /// </summary> 94 /// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param> 95 /// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param> 96 /// <param name="cancellationToken">An optional token for canceling the call.</param> 97 /// <returns>The call object.</returns> ServerReflectionInfo(grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))98 public virtual grpc::AsyncDuplexStreamingCall<global::Grpc.Reflection.V1Alpha.ServerReflectionRequest, global::Grpc.Reflection.V1Alpha.ServerReflectionResponse> ServerReflectionInfo(grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) 99 { 100 return ServerReflectionInfo(new grpc::CallOptions(headers, deadline, cancellationToken)); 101 } 102 /// <summary> 103 /// The reflection service is structured as a bidirectional stream, ensuring 104 /// all related requests go to a single server. 105 /// </summary> 106 /// <param name="options">The options for the call.</param> 107 /// <returns>The call object.</returns> ServerReflectionInfo(grpc::CallOptions options)108 public virtual grpc::AsyncDuplexStreamingCall<global::Grpc.Reflection.V1Alpha.ServerReflectionRequest, global::Grpc.Reflection.V1Alpha.ServerReflectionResponse> ServerReflectionInfo(grpc::CallOptions options) 109 { 110 return CallInvoker.AsyncDuplexStreamingCall(__Method_ServerReflectionInfo, null, options); 111 } 112 /// <summary>Creates a new instance of client from given <c>ClientBaseConfiguration</c>.</summary> NewInstance(ClientBaseConfiguration configuration)113 protected override ServerReflectionClient NewInstance(ClientBaseConfiguration configuration) 114 { 115 return new ServerReflectionClient(configuration); 116 } 117 } 118 119 /// <summary>Creates service definition that can be registered with a server</summary> 120 /// <param name="serviceImpl">An object implementing the server-side handling logic.</param> BindService(ServerReflectionBase serviceImpl)121 public static grpc::ServerServiceDefinition BindService(ServerReflectionBase serviceImpl) 122 { 123 return grpc::ServerServiceDefinition.CreateBuilder() 124 .AddMethod(__Method_ServerReflectionInfo, serviceImpl.ServerReflectionInfo).Build(); 125 } 126 127 /// <summary>Register service method with a service binder with or without implementation. Useful when customizing the service binding logic. 128 /// Note: this method is part of an experimental API that can change or be removed without any prior notice.</summary> 129 /// <param name="serviceBinder">Service methods will be bound by calling <c>AddMethod</c> on this object.</param> 130 /// <param name="serviceImpl">An object implementing the server-side handling logic.</param> BindService(grpc::ServiceBinderBase serviceBinder, ServerReflectionBase serviceImpl)131 public static void BindService(grpc::ServiceBinderBase serviceBinder, ServerReflectionBase serviceImpl) 132 { 133 serviceBinder.AddMethod(__Method_ServerReflectionInfo, serviceImpl == null ? null : new grpc::DuplexStreamingServerMethod<global::Grpc.Reflection.V1Alpha.ServerReflectionRequest, global::Grpc.Reflection.V1Alpha.ServerReflectionResponse>(serviceImpl.ServerReflectionInfo)); 134 } 135 136 } 137 } 138 #endregion 139