ReflectionGrpc.cs 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  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 1591
  23. #region Designer generated code
  24. using System;
  25. using System.Threading;
  26. using System.Threading.Tasks;
  27. using grpc = global::Grpc.Core;
  28. namespace Grpc.Reflection.V1Alpha {
  29. public static partial class ServerReflection
  30. {
  31. static readonly string __ServiceName = "grpc.reflection.v1alpha.ServerReflection";
  32. 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);
  33. 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);
  34. 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>(
  35. grpc::MethodType.DuplexStreaming,
  36. __ServiceName,
  37. "ServerReflectionInfo",
  38. __Marshaller_ServerReflectionRequest,
  39. __Marshaller_ServerReflectionResponse);
  40. /// <summary>Service descriptor</summary>
  41. public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor
  42. {
  43. get { return global::Grpc.Reflection.V1Alpha.ReflectionReflection.Descriptor.Services[0]; }
  44. }
  45. /// <summary>Base class for server-side implementations of ServerReflection</summary>
  46. public abstract partial class ServerReflectionBase
  47. {
  48. /// <summary>
  49. /// The reflection service is structured as a bidirectional stream, ensuring
  50. /// all related requests go to a single server.
  51. /// </summary>
  52. /// <param name="requestStream">Used for reading requests from the client.</param>
  53. /// <param name="responseStream">Used for sending responses back to the client.</param>
  54. /// <param name="context">The context of the server-side call handler being invoked.</param>
  55. /// <returns>A task indicating completion of the handler.</returns>
  56. 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)
  57. {
  58. throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
  59. }
  60. }
  61. /// <summary>Client for ServerReflection</summary>
  62. public partial class ServerReflectionClient : grpc::ClientBase<ServerReflectionClient>
  63. {
  64. /// <summary>Creates a new client for ServerReflection</summary>
  65. /// <param name="channel">The channel to use to make remote calls.</param>
  66. public ServerReflectionClient(grpc::Channel channel) : base(channel)
  67. {
  68. }
  69. /// <summary>Creates a new client for ServerReflection that uses a custom <c>CallInvoker</c>.</summary>
  70. /// <param name="callInvoker">The callInvoker to use to make remote calls.</param>
  71. public ServerReflectionClient(grpc::CallInvoker callInvoker) : base(callInvoker)
  72. {
  73. }
  74. /// <summary>Protected parameterless constructor to allow creation of test doubles.</summary>
  75. protected ServerReflectionClient() : base()
  76. {
  77. }
  78. /// <summary>Protected constructor to allow creation of configured clients.</summary>
  79. /// <param name="configuration">The client configuration.</param>
  80. protected ServerReflectionClient(ClientBaseConfiguration configuration) : base(configuration)
  81. {
  82. }
  83. /// <summary>
  84. /// The reflection service is structured as a bidirectional stream, ensuring
  85. /// all related requests go to a single server.
  86. /// </summary>
  87. /// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param>
  88. /// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param>
  89. /// <param name="cancellationToken">An optional token for canceling the call.</param>
  90. /// <returns>The call object.</returns>
  91. 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))
  92. {
  93. return ServerReflectionInfo(new grpc::CallOptions(headers, deadline, cancellationToken));
  94. }
  95. /// <summary>
  96. /// The reflection service is structured as a bidirectional stream, ensuring
  97. /// all related requests go to a single server.
  98. /// </summary>
  99. /// <param name="options">The options for the call.</param>
  100. /// <returns>The call object.</returns>
  101. public virtual grpc::AsyncDuplexStreamingCall<global::Grpc.Reflection.V1Alpha.ServerReflectionRequest, global::Grpc.Reflection.V1Alpha.ServerReflectionResponse> ServerReflectionInfo(grpc::CallOptions options)
  102. {
  103. return CallInvoker.AsyncDuplexStreamingCall(__Method_ServerReflectionInfo, null, options);
  104. }
  105. /// <summary>Creates a new instance of client from given <c>ClientBaseConfiguration</c>.</summary>
  106. protected override ServerReflectionClient NewInstance(ClientBaseConfiguration configuration)
  107. {
  108. return new ServerReflectionClient(configuration);
  109. }
  110. }
  111. /// <summary>Creates service definition that can be registered with a server</summary>
  112. /// <param name="serviceImpl">An object implementing the server-side handling logic.</param>
  113. public static grpc::ServerServiceDefinition BindService(ServerReflectionBase serviceImpl)
  114. {
  115. return grpc::ServerServiceDefinition.CreateBuilder()
  116. .AddMethod(__Method_ServerReflectionInfo, serviceImpl.ServerReflectionInfo).Build();
  117. }
  118. }
  119. }
  120. #endregion