ReflectionGrpc.cs 7.0 KB

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