Jan Tattermusch | 0201776 | 2016-11-23 15:39:56 +0100 | [diff] [blame] | 1 | // Generated by the protocol buffer compiler. DO NOT EDIT! |
Jan Tattermusch | 091057a | 2016-11-24 13:08:45 +0100 | [diff] [blame] | 2 | // source: grpc/reflection/v1alpha/reflection.proto |
Jan Tattermusch | 0201776 | 2016-11-23 15:39:56 +0100 | [diff] [blame] | 3 | // Original file comments: |
Jan Tattermusch | 4d5c310 | 2017-06-07 10:23:56 +0200 | [diff] [blame] | 4 | // Copyright 2016 gRPC authors. |
Jan Tattermusch | 0201776 | 2016-11-23 15:39:56 +0100 | [diff] [blame] | 5 | // |
Jan Tattermusch | 4d5c310 | 2017-06-07 10:23:56 +0200 | [diff] [blame] | 6 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 7 | // you may not use this file except in compliance with the License. |
| 8 | // You may obtain a copy of the License at |
Jan Tattermusch | 0201776 | 2016-11-23 15:39:56 +0100 | [diff] [blame] | 9 | // |
Jan Tattermusch | 4d5c310 | 2017-06-07 10:23:56 +0200 | [diff] [blame] | 10 | // http://www.apache.org/licenses/LICENSE-2.0 |
Jan Tattermusch | 0201776 | 2016-11-23 15:39:56 +0100 | [diff] [blame] | 11 | // |
Jan Tattermusch | 4d5c310 | 2017-06-07 10:23:56 +0200 | [diff] [blame] | 12 | // Unless required by applicable law or agreed to in writing, software |
| 13 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 15 | // See the License for the specific language governing permissions and |
| 16 | // limitations under the License. |
Jan Tattermusch | 0201776 | 2016-11-23 15:39:56 +0100 | [diff] [blame] | 17 | // |
| 18 | // Service exported by server reflection |
| 19 | // |
Jan Tattermusch | ca25473 | 2017-08-09 08:47:34 +0200 | [diff] [blame] | 20 | #pragma warning disable 1591 |
Jan Tattermusch | 0201776 | 2016-11-23 15:39:56 +0100 | [diff] [blame] | 21 | #region Designer generated code |
| 22 | |
| 23 | using System; |
| 24 | using System.Threading; |
| 25 | using System.Threading.Tasks; |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 26 | using grpc = global::Grpc.Core; |
Jan Tattermusch | 0201776 | 2016-11-23 15:39:56 +0100 | [diff] [blame] | 27 | |
| 28 | namespace Grpc.Reflection.V1Alpha { |
Jan Tattermusch | 091057a | 2016-11-24 13:08:45 +0100 | [diff] [blame] | 29 | public static partial class ServerReflection |
Jan Tattermusch | 0201776 | 2016-11-23 15:39:56 +0100 | [diff] [blame] | 30 | { |
| 31 | static readonly string __ServiceName = "grpc.reflection.v1alpha.ServerReflection"; |
| 32 | |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 33 | static readonly grpc::Marshaller<global::Grpc.Reflection.V1Alpha.ServerReflectionRequest> __Marshaller_ServerReflectionRequest = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Reflection.V1Alpha.ServerReflectionRequest.Parser.ParseFrom); |
| 34 | static readonly grpc::Marshaller<global::Grpc.Reflection.V1Alpha.ServerReflectionResponse> __Marshaller_ServerReflectionResponse = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Reflection.V1Alpha.ServerReflectionResponse.Parser.ParseFrom); |
Jan Tattermusch | 0201776 | 2016-11-23 15:39:56 +0100 | [diff] [blame] | 35 | |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 36 | 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>( |
| 37 | grpc::MethodType.DuplexStreaming, |
Jan Tattermusch | 0201776 | 2016-11-23 15:39:56 +0100 | [diff] [blame] | 38 | __ServiceName, |
| 39 | "ServerReflectionInfo", |
| 40 | __Marshaller_ServerReflectionRequest, |
| 41 | __Marshaller_ServerReflectionResponse); |
| 42 | |
| 43 | /// <summary>Service descriptor</summary> |
| 44 | public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor |
| 45 | { |
| 46 | get { return global::Grpc.Reflection.V1Alpha.ReflectionReflection.Descriptor.Services[0]; } |
| 47 | } |
| 48 | |
| 49 | /// <summary>Base class for server-side implementations of ServerReflection</summary> |
Jan Tattermusch | 091057a | 2016-11-24 13:08:45 +0100 | [diff] [blame] | 50 | public abstract partial class ServerReflectionBase |
Jan Tattermusch | 0201776 | 2016-11-23 15:39:56 +0100 | [diff] [blame] | 51 | { |
| 52 | /// <summary> |
Jan Tattermusch | 726f40f | 2016-12-12 12:09:35 +0100 | [diff] [blame] | 53 | /// The reflection service is structured as a bidirectional stream, ensuring |
| 54 | /// all related requests go to a single server. |
Jan Tattermusch | 0201776 | 2016-11-23 15:39:56 +0100 | [diff] [blame] | 55 | /// </summary> |
Jan Tattermusch | 00f6636 | 2016-12-12 13:02:29 +0100 | [diff] [blame] | 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> |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 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) |
Jan Tattermusch | 0201776 | 2016-11-23 15:39:56 +0100 | [diff] [blame] | 61 | { |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 62 | throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); |
Jan Tattermusch | 0201776 | 2016-11-23 15:39:56 +0100 | [diff] [blame] | 63 | } |
| 64 | |
| 65 | } |
| 66 | |
| 67 | /// <summary>Client for ServerReflection</summary> |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 68 | public partial class ServerReflectionClient : grpc::ClientBase<ServerReflectionClient> |
Jan Tattermusch | 0201776 | 2016-11-23 15:39:56 +0100 | [diff] [blame] | 69 | { |
| 70 | /// <summary>Creates a new client for ServerReflection</summary> |
| 71 | /// <param name="channel">The channel to use to make remote calls.</param> |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 72 | public ServerReflectionClient(grpc::Channel channel) : base(channel) |
Jan Tattermusch | 0201776 | 2016-11-23 15:39:56 +0100 | [diff] [blame] | 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> |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 77 | public ServerReflectionClient(grpc::CallInvoker callInvoker) : base(callInvoker) |
Jan Tattermusch | 0201776 | 2016-11-23 15:39:56 +0100 | [diff] [blame] | 78 | { |
| 79 | } |
| 80 | /// <summary>Protected parameterless constructor to allow creation of test doubles.</summary> |
| 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> |
| 86 | protected ServerReflectionClient(ClientBaseConfiguration configuration) : base(configuration) |
| 87 | { |
| 88 | } |
| 89 | |
| 90 | /// <summary> |
Jan Tattermusch | 726f40f | 2016-12-12 12:09:35 +0100 | [diff] [blame] | 91 | /// The reflection service is structured as a bidirectional stream, ensuring |
| 92 | /// all related requests go to a single server. |
Jan Tattermusch | 0201776 | 2016-11-23 15:39:56 +0100 | [diff] [blame] | 93 | /// </summary> |
Jan Tattermusch | 00f6636 | 2016-12-12 13:02:29 +0100 | [diff] [blame] | 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> |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 98 | public virtual grpc::AsyncDuplexStreamingCall<global::Grpc.Reflection.V1Alpha.ServerReflectionRequest, global::Grpc.Reflection.V1Alpha.ServerReflectionResponse> ServerReflectionInfo(grpc::Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)) |
Jan Tattermusch | 0201776 | 2016-11-23 15:39:56 +0100 | [diff] [blame] | 99 | { |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 100 | return ServerReflectionInfo(new grpc::CallOptions(headers, deadline, cancellationToken)); |
Jan Tattermusch | 0201776 | 2016-11-23 15:39:56 +0100 | [diff] [blame] | 101 | } |
| 102 | /// <summary> |
Jan Tattermusch | 726f40f | 2016-12-12 12:09:35 +0100 | [diff] [blame] | 103 | /// The reflection service is structured as a bidirectional stream, ensuring |
| 104 | /// all related requests go to a single server. |
Jan Tattermusch | 0201776 | 2016-11-23 15:39:56 +0100 | [diff] [blame] | 105 | /// </summary> |
Jan Tattermusch | 00f6636 | 2016-12-12 13:02:29 +0100 | [diff] [blame] | 106 | /// <param name="options">The options for the call.</param> |
| 107 | /// <returns>The call object.</returns> |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 108 | public virtual grpc::AsyncDuplexStreamingCall<global::Grpc.Reflection.V1Alpha.ServerReflectionRequest, global::Grpc.Reflection.V1Alpha.ServerReflectionResponse> ServerReflectionInfo(grpc::CallOptions options) |
Jan Tattermusch | 0201776 | 2016-11-23 15:39:56 +0100 | [diff] [blame] | 109 | { |
| 110 | return CallInvoker.AsyncDuplexStreamingCall(__Method_ServerReflectionInfo, null, options); |
| 111 | } |
| 112 | /// <summary>Creates a new instance of client from given <c>ClientBaseConfiguration</c>.</summary> |
| 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> |
Jan Tattermusch | 00f6636 | 2016-12-12 13:02:29 +0100 | [diff] [blame] | 120 | /// <param name="serviceImpl">An object implementing the server-side handling logic.</param> |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 121 | public static grpc::ServerServiceDefinition BindService(ServerReflectionBase serviceImpl) |
Jan Tattermusch | 0201776 | 2016-11-23 15:39:56 +0100 | [diff] [blame] | 122 | { |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 123 | return grpc::ServerServiceDefinition.CreateBuilder() |
Jan Tattermusch | 0201776 | 2016-11-23 15:39:56 +0100 | [diff] [blame] | 124 | .AddMethod(__Method_ServerReflectionInfo, serviceImpl.ServerReflectionInfo).Build(); |
| 125 | } |
| 126 | |
| 127 | } |
| 128 | } |
| 129 | #endregion |