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 public abstract partial class ServerReflectionBase 50 { 51 /// <summary> 52 /// The reflection service is structured as a bidirectional stream, ensuring 53 /// all related requests go to a single server. 54 /// </summary> 55 /// <param name="requestStream">Used for reading requests from the client.</param> 56 /// <param name="responseStream">Used for sending responses back to the client.</param> 57 /// <param name="context">The context of the server-side call handler being invoked.</param> 58 /// <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)59 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) 60 { 61 throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); 62 } 63 64 } 65 66 /// <summary>Client for ServerReflection</summary> 67 public partial class ServerReflectionClient : grpc::ClientBase<ServerReflectionClient> 68 { 69 /// <summary>Creates a new client for ServerReflection</summary> 70 /// <param name="channel">The channel to use to make remote calls.</param> ServerReflectionClient(grpc::Channel channel)71 public ServerReflectionClient(grpc::Channel channel) : base(channel) 72 { 73 } 74 /// <summary>Creates a new client for ServerReflection that uses a custom <c>CallInvoker</c>.</summary> 75 /// <param name="callInvoker">The callInvoker to use to make remote calls.</param> ServerReflectionClient(grpc::CallInvoker callInvoker)76 public ServerReflectionClient(grpc::CallInvoker callInvoker) : base(callInvoker) 77 { 78 } 79 /// <summary>Protected parameterless constructor to allow creation of test doubles.</summary> ServerReflectionClient()80 protected ServerReflectionClient() : base() 81 { 82 } 83 /// <summary>Protected constructor to allow creation of configured clients.</summary> 84 /// <param name="configuration">The client configuration.</param> ServerReflectionClient(ClientBaseConfiguration configuration)85 protected ServerReflectionClient(ClientBaseConfiguration configuration) : base(configuration) 86 { 87 } 88 89 /// <summary> 90 /// The reflection service is structured as a bidirectional stream, ensuring 91 /// all related requests go to a single server. 92 /// </summary> 93 /// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param> 94 /// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param> 95 /// <param name="cancellationToken">An optional token for canceling the call.</param> 96 /// <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))97 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)) 98 { 99 return ServerReflectionInfo(new grpc::CallOptions(headers, deadline, cancellationToken)); 100 } 101 /// <summary> 102 /// The reflection service is structured as a bidirectional stream, ensuring 103 /// all related requests go to a single server. 104 /// </summary> 105 /// <param name="options">The options for the call.</param> 106 /// <returns>The call object.</returns> ServerReflectionInfo(grpc::CallOptions options)107 public virtual grpc::AsyncDuplexStreamingCall<global::Grpc.Reflection.V1Alpha.ServerReflectionRequest, global::Grpc.Reflection.V1Alpha.ServerReflectionResponse> ServerReflectionInfo(grpc::CallOptions options) 108 { 109 return CallInvoker.AsyncDuplexStreamingCall(__Method_ServerReflectionInfo, null, options); 110 } 111 /// <summary>Creates a new instance of client from given <c>ClientBaseConfiguration</c>.</summary> NewInstance(ClientBaseConfiguration configuration)112 protected override ServerReflectionClient NewInstance(ClientBaseConfiguration configuration) 113 { 114 return new ServerReflectionClient(configuration); 115 } 116 } 117 118 /// <summary>Creates service definition that can be registered with a server</summary> 119 /// <param name="serviceImpl">An object implementing the server-side handling logic.</param> BindService(ServerReflectionBase serviceImpl)120 public static grpc::ServerServiceDefinition BindService(ServerReflectionBase serviceImpl) 121 { 122 return grpc::ServerServiceDefinition.CreateBuilder() 123 .AddMethod(__Method_ServerReflectionInfo, serviceImpl.ServerReflectionInfo).Build(); 124 } 125 126 } 127 } 128 #endregion 129