From c6fbf433909e426cfce67c1b7d4b94fd64ba390b Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Wed, 12 May 2021 12:26:29 +0200 Subject: [PATCH] Add "GeneratedCode" attribute to generated service stubs (#26164) * mark generated members in *Grpc.cs as [GeneratedCode] * regenerate protos --- src/compiler/csharp_generator.cc | 29 +++ src/csharp/Grpc.Examples/MathGrpc.cs | 32 ++++ src/csharp/Grpc.HealthCheck/HealthGrpc.cs | 22 +++ .../BenchmarkServiceGrpc.cs | 34 ++++ .../EmptyServiceGrpc.cs | 7 + .../Grpc.IntegrationTesting/MetricsGrpc.cs | 23 +++ .../ReportQpsScenarioServiceGrpc.cs | 18 ++ .../Grpc.IntegrationTesting/TestGrpc.cs | 166 ++++++++++++++++++ .../WorkerServiceGrpc.cs | 37 ++++ src/csharp/Grpc.Reflection/ReflectionGrpc.cs | 16 ++ 10 files changed, 384 insertions(+) diff --git a/src/compiler/csharp_generator.cc b/src/compiler/csharp_generator.cc index c7677c53340..9c9830ef571 100644 --- a/src/compiler/csharp_generator.cc +++ b/src/compiler/csharp_generator.cc @@ -88,6 +88,17 @@ bool GenerateDocCommentBodyImpl(grpc::protobuf::io::Printer* printer, return true; } +void GenerateGeneratedCodeAttribute(grpc::protobuf::io::Printer* printer) { + // Mark the code as generated using the [GeneratedCode] attribute. + // We don't provide plugin version info in attribute the because: + // * the version information is not readily available from the plugin's code. + // * it would cause a lot of churn in the pre-generated code + // in this repository every time the version is updated. + printer->Print( + "[global::System.CodeDom.Compiler.GeneratedCode(\"grpc_csharp_plugin\", " + "null)]\n"); +} + template bool GenerateDocCommentBody(grpc::protobuf::io::Printer* printer, const DescriptorType* descriptor) { @@ -304,6 +315,7 @@ void GenerateMarshallerFields(Printer* out, const ServiceDescriptor* service) { std::vector used_messages = GetUsedMessages(service); if (used_messages.size() != 0) { // Generate static helper methods for serialization/deserialization + GenerateGeneratedCodeAttribute(out); out->Print( "static void __Helper_SerializeMessage(" "global::Google.Protobuf.IMessage message, " @@ -331,6 +343,7 @@ void GenerateMarshallerFields(Printer* out, const ServiceDescriptor* service) { out->Outdent(); out->Print("}\n\n"); + GenerateGeneratedCodeAttribute(out); out->Print( "static class __Helper_MessageCache\n" "{\n"); @@ -343,6 +356,7 @@ void GenerateMarshallerFields(Printer* out, const ServiceDescriptor* service) { out->Outdent(); out->Print("}\n\n"); + GenerateGeneratedCodeAttribute(out); out->Print( "static T __Helper_DeserializeMessage(" "grpc::DeserializationContext context, " @@ -368,6 +382,7 @@ void GenerateMarshallerFields(Printer* out, const ServiceDescriptor* service) { for (size_t i = 0; i < used_messages.size(); i++) { const Descriptor* message = used_messages[i]; + GenerateGeneratedCodeAttribute(out); out->Print( "static readonly grpc::Marshaller<$type$> $fieldname$ = " "grpc::Marshallers.Create(__Helper_SerializeMessage, " @@ -379,6 +394,7 @@ void GenerateMarshallerFields(Printer* out, const ServiceDescriptor* service) { } void GenerateStaticMethodField(Printer* out, const MethodDescriptor* method) { + GenerateGeneratedCodeAttribute(out); out->Print( "static readonly grpc::Method<$request$, $response$> $fieldname$ = new " "grpc::Method<$request$, $response$>(\n", @@ -433,6 +449,7 @@ void GenerateServerClass(Printer* out, const ServiceDescriptor* service) { for (int i = 0; i < service->method_count(); i++) { const MethodDescriptor* method = service->method(i); GenerateDocCommentServerMethod(out, method); + GenerateGeneratedCodeAttribute(out); out->Print( "public virtual $returntype$ " "$methodname$($request$$response_stream_maybe$, " @@ -468,6 +485,7 @@ void GenerateClientStub(Printer* out, const ServiceDescriptor* service) { "/// The channel to use to make remote " "calls.\n", "servicename", GetServiceClassName(service)); + GenerateGeneratedCodeAttribute(out); out->Print("public $name$(grpc::ChannelBase channel) : base(channel)\n", "name", GetClientClassName(service)); out->Print("{\n"); @@ -478,6 +496,7 @@ void GenerateClientStub(Printer* out, const ServiceDescriptor* service) { "/// The callInvoker to use to make remote " "calls.\n", "servicename", GetServiceClassName(service)); + GenerateGeneratedCodeAttribute(out); out->Print( "public $name$(grpc::CallInvoker callInvoker) : base(callInvoker)\n", "name", GetClientClassName(service)); @@ -486,6 +505,7 @@ void GenerateClientStub(Printer* out, const ServiceDescriptor* service) { out->Print( "/// Protected parameterless constructor to allow creation" " of test doubles.\n"); + GenerateGeneratedCodeAttribute(out); out->Print("protected $name$() : base()\n", "name", GetClientClassName(service)); out->Print("{\n"); @@ -494,6 +514,7 @@ void GenerateClientStub(Printer* out, const ServiceDescriptor* service) { "/// Protected constructor to allow creation of configured " "clients.\n" "/// The client configuration.\n"); + GenerateGeneratedCodeAttribute(out); out->Print( "protected $name$(ClientBaseConfiguration configuration)" " : base(configuration)\n", @@ -506,6 +527,7 @@ void GenerateClientStub(Printer* out, const ServiceDescriptor* service) { if (!method->client_streaming() && !method->server_streaming()) { // unary calls have an extra synchronous stub method GenerateDocCommentClientMethod(out, method, true, false); + GenerateGeneratedCodeAttribute(out); out->Print( "public virtual $response$ $methodname$($request$ request, " "grpc::Metadata " @@ -528,6 +550,7 @@ void GenerateClientStub(Printer* out, const ServiceDescriptor* service) { // overload taking CallOptions as a param GenerateDocCommentClientMethod(out, method, true, true); + GenerateGeneratedCodeAttribute(out); out->Print( "public virtual $response$ $methodname$($request$ request, " "grpc::CallOptions options)\n", @@ -549,6 +572,7 @@ void GenerateClientStub(Printer* out, const ServiceDescriptor* service) { method_name += "Async"; // prevent name clash with synchronous method. } GenerateDocCommentClientMethod(out, method, false, false); + GenerateGeneratedCodeAttribute(out); out->Print( "public virtual $returntype$ " "$methodname$($request_maybe$grpc::Metadata " @@ -573,6 +597,7 @@ void GenerateClientStub(Printer* out, const ServiceDescriptor* service) { // overload taking CallOptions as a param GenerateDocCommentClientMethod(out, method, false, true); + GenerateGeneratedCodeAttribute(out); out->Print( "public virtual $returntype$ " "$methodname$($request_maybe$grpc::CallOptions " @@ -615,6 +640,7 @@ void GenerateClientStub(Printer* out, const ServiceDescriptor* service) { out->Print( "/// Creates a new instance of client from given " "ClientBaseConfiguration.\n"); + GenerateGeneratedCodeAttribute(out); out->Print( "protected override $name$ NewInstance(ClientBaseConfiguration " "configuration)\n", @@ -638,6 +664,7 @@ void GenerateBindServiceMethod(Printer* out, const ServiceDescriptor* service) { out->Print( "/// An object implementing the server-side" " handling logic.\n"); + GenerateGeneratedCodeAttribute(out); out->Print( "public static grpc::ServerServiceDefinition BindService($implclass$ " "serviceImpl)\n", @@ -679,6 +706,7 @@ void GenerateBindServiceWithBinderMethod(Printer* out, out->Print( "/// An object implementing the server-side" " handling logic.\n"); + GenerateGeneratedCodeAttribute(out); out->Print( "public static void BindService(grpc::ServiceBinderBase serviceBinder, " "$implclass$ " @@ -709,6 +737,7 @@ void GenerateService(Printer* out, const ServiceDescriptor* service, bool generate_client, bool generate_server, bool internal_access) { GenerateDocCommentBody(out, service); + out->Print("$access_level$ static partial class $classname$\n", "access_level", GetAccessLevel(internal_access), "classname", GetServiceClassName(service)); diff --git a/src/csharp/Grpc.Examples/MathGrpc.cs b/src/csharp/Grpc.Examples/MathGrpc.cs index cb7cb089f72..50657c2127a 100644 --- a/src/csharp/Grpc.Examples/MathGrpc.cs +++ b/src/csharp/Grpc.Examples/MathGrpc.cs @@ -27,6 +27,7 @@ namespace Math { { static readonly string __ServiceName = "math.Math"; + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static void __Helper_SerializeMessage(global::Google.Protobuf.IMessage message, grpc::SerializationContext context) { #if !GRPC_DISABLE_PROTOBUF_BUFFER_SERIALIZATION @@ -41,11 +42,13 @@ namespace Math { context.Complete(global::Google.Protobuf.MessageExtensions.ToByteArray(message)); } + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static class __Helper_MessageCache { public static readonly bool IsBufferMessage = global::System.Reflection.IntrospectionExtensions.GetTypeInfo(typeof(global::Google.Protobuf.IBufferMessage)).IsAssignableFrom(typeof(T)); } + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static T __Helper_DeserializeMessage(grpc::DeserializationContext context, global::Google.Protobuf.MessageParser parser) where T : global::Google.Protobuf.IMessage { #if !GRPC_DISABLE_PROTOBUF_BUFFER_SERIALIZATION @@ -57,11 +60,16 @@ namespace Math { return parser.ParseFrom(context.PayloadAsNewBuffer()); } + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static readonly grpc::Marshaller __Marshaller_math_DivArgs = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Math.DivArgs.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static readonly grpc::Marshaller __Marshaller_math_DivReply = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Math.DivReply.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static readonly grpc::Marshaller __Marshaller_math_FibArgs = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Math.FibArgs.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static readonly grpc::Marshaller __Marshaller_math_Num = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Math.Num.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static readonly grpc::Method __Method_Div = new grpc::Method( grpc::MethodType.Unary, __ServiceName, @@ -69,6 +77,7 @@ namespace Math { __Marshaller_math_DivArgs, __Marshaller_math_DivReply); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static readonly grpc::Method __Method_DivMany = new grpc::Method( grpc::MethodType.DuplexStreaming, __ServiceName, @@ -76,6 +85,7 @@ namespace Math { __Marshaller_math_DivArgs, __Marshaller_math_DivReply); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static readonly grpc::Method __Method_Fib = new grpc::Method( grpc::MethodType.ServerStreaming, __ServiceName, @@ -83,6 +93,7 @@ namespace Math { __Marshaller_math_FibArgs, __Marshaller_math_Num); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static readonly grpc::Method __Method_Sum = new grpc::Method( grpc::MethodType.ClientStreaming, __ServiceName, @@ -107,6 +118,7 @@ namespace Math { /// The request received from the client. /// The context of the server-side call handler being invoked. /// The response to send back to the client (wrapped by a task). + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual global::System.Threading.Tasks.Task Div(global::Math.DivArgs request, grpc::ServerCallContext context) { throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); @@ -122,6 +134,7 @@ namespace Math { /// Used for sending responses back to the client. /// The context of the server-side call handler being invoked. /// A task indicating completion of the handler. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual global::System.Threading.Tasks.Task DivMany(grpc::IAsyncStreamReader requestStream, grpc::IServerStreamWriter responseStream, grpc::ServerCallContext context) { throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); @@ -136,6 +149,7 @@ namespace Math { /// Used for sending responses back to the client. /// The context of the server-side call handler being invoked. /// A task indicating completion of the handler. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual global::System.Threading.Tasks.Task Fib(global::Math.FibArgs request, grpc::IServerStreamWriter responseStream, grpc::ServerCallContext context) { throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); @@ -148,6 +162,7 @@ namespace Math { /// Used for reading requests from the client. /// The context of the server-side call handler being invoked. /// The response to send back to the client (wrapped by a task). + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual global::System.Threading.Tasks.Task Sum(grpc::IAsyncStreamReader requestStream, grpc::ServerCallContext context) { throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); @@ -160,20 +175,24 @@ namespace Math { { /// Creates a new client for Math /// The channel to use to make remote calls. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public MathClient(grpc::ChannelBase channel) : base(channel) { } /// Creates a new client for Math that uses a custom CallInvoker. /// The callInvoker to use to make remote calls. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public MathClient(grpc::CallInvoker callInvoker) : base(callInvoker) { } /// Protected parameterless constructor to allow creation of test doubles. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] protected MathClient() : base() { } /// Protected constructor to allow creation of configured clients. /// The client configuration. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] protected MathClient(ClientBaseConfiguration configuration) : base(configuration) { } @@ -187,6 +206,7 @@ namespace Math { /// An optional deadline for the call. The call will be cancelled if deadline is hit. /// An optional token for canceling the call. /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual global::Math.DivReply Div(global::Math.DivArgs request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { return Div(request, new grpc::CallOptions(headers, deadline, cancellationToken)); @@ -198,6 +218,7 @@ namespace Math { /// The request to send to the server. /// The options for the call. /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual global::Math.DivReply Div(global::Math.DivArgs request, grpc::CallOptions options) { return CallInvoker.BlockingUnaryCall(__Method_Div, null, options, request); @@ -211,6 +232,7 @@ namespace Math { /// An optional deadline for the call. The call will be cancelled if deadline is hit. /// An optional token for canceling the call. /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual grpc::AsyncUnaryCall DivAsync(global::Math.DivArgs request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { return DivAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); @@ -222,6 +244,7 @@ namespace Math { /// The request to send to the server. /// The options for the call. /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual grpc::AsyncUnaryCall DivAsync(global::Math.DivArgs request, grpc::CallOptions options) { return CallInvoker.AsyncUnaryCall(__Method_Div, null, options, request); @@ -236,6 +259,7 @@ namespace Math { /// An optional deadline for the call. The call will be cancelled if deadline is hit. /// An optional token for canceling the call. /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual grpc::AsyncDuplexStreamingCall DivMany(grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { return DivMany(new grpc::CallOptions(headers, deadline, cancellationToken)); @@ -248,6 +272,7 @@ namespace Math { /// /// The options for the call. /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual grpc::AsyncDuplexStreamingCall DivMany(grpc::CallOptions options) { return CallInvoker.AsyncDuplexStreamingCall(__Method_DivMany, null, options); @@ -262,6 +287,7 @@ namespace Math { /// An optional deadline for the call. The call will be cancelled if deadline is hit. /// An optional token for canceling the call. /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual grpc::AsyncServerStreamingCall Fib(global::Math.FibArgs request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { return Fib(request, new grpc::CallOptions(headers, deadline, cancellationToken)); @@ -274,6 +300,7 @@ namespace Math { /// The request to send to the server. /// The options for the call. /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual grpc::AsyncServerStreamingCall Fib(global::Math.FibArgs request, grpc::CallOptions options) { return CallInvoker.AsyncServerStreamingCall(__Method_Fib, null, options, request); @@ -286,6 +313,7 @@ namespace Math { /// An optional deadline for the call. The call will be cancelled if deadline is hit. /// An optional token for canceling the call. /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual grpc::AsyncClientStreamingCall Sum(grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { return Sum(new grpc::CallOptions(headers, deadline, cancellationToken)); @@ -296,11 +324,13 @@ namespace Math { /// /// The options for the call. /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual grpc::AsyncClientStreamingCall Sum(grpc::CallOptions options) { return CallInvoker.AsyncClientStreamingCall(__Method_Sum, null, options); } /// Creates a new instance of client from given ClientBaseConfiguration. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] protected override MathClient NewInstance(ClientBaseConfiguration configuration) { return new MathClient(configuration); @@ -309,6 +339,7 @@ namespace Math { /// Creates service definition that can be registered with a server /// An object implementing the server-side handling logic. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public static grpc::ServerServiceDefinition BindService(MathBase serviceImpl) { return grpc::ServerServiceDefinition.CreateBuilder() @@ -322,6 +353,7 @@ namespace Math { /// Note: this method is part of an experimental API that can change or be removed without any prior notice. /// Service methods will be bound by calling AddMethod on this object. /// An object implementing the server-side handling logic. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public static void BindService(grpc::ServiceBinderBase serviceBinder, MathBase serviceImpl) { serviceBinder.AddMethod(__Method_Div, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.Div)); diff --git a/src/csharp/Grpc.HealthCheck/HealthGrpc.cs b/src/csharp/Grpc.HealthCheck/HealthGrpc.cs index ffa666c5155..523f112af23 100644 --- a/src/csharp/Grpc.HealthCheck/HealthGrpc.cs +++ b/src/csharp/Grpc.HealthCheck/HealthGrpc.cs @@ -30,6 +30,7 @@ namespace Grpc.Health.V1 { { static readonly string __ServiceName = "grpc.health.v1.Health"; + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static void __Helper_SerializeMessage(global::Google.Protobuf.IMessage message, grpc::SerializationContext context) { #if !GRPC_DISABLE_PROTOBUF_BUFFER_SERIALIZATION @@ -44,11 +45,13 @@ namespace Grpc.Health.V1 { context.Complete(global::Google.Protobuf.MessageExtensions.ToByteArray(message)); } + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static class __Helper_MessageCache { public static readonly bool IsBufferMessage = global::System.Reflection.IntrospectionExtensions.GetTypeInfo(typeof(global::Google.Protobuf.IBufferMessage)).IsAssignableFrom(typeof(T)); } + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static T __Helper_DeserializeMessage(grpc::DeserializationContext context, global::Google.Protobuf.MessageParser parser) where T : global::Google.Protobuf.IMessage { #if !GRPC_DISABLE_PROTOBUF_BUFFER_SERIALIZATION @@ -60,9 +63,12 @@ namespace Grpc.Health.V1 { return parser.ParseFrom(context.PayloadAsNewBuffer()); } + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static readonly grpc::Marshaller __Marshaller_grpc_health_v1_HealthCheckRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Grpc.Health.V1.HealthCheckRequest.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static readonly grpc::Marshaller __Marshaller_grpc_health_v1_HealthCheckResponse = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Grpc.Health.V1.HealthCheckResponse.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static readonly grpc::Method __Method_Check = new grpc::Method( grpc::MethodType.Unary, __ServiceName, @@ -70,6 +76,7 @@ namespace Grpc.Health.V1 { __Marshaller_grpc_health_v1_HealthCheckRequest, __Marshaller_grpc_health_v1_HealthCheckResponse); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static readonly grpc::Method __Method_Watch = new grpc::Method( grpc::MethodType.ServerStreaming, __ServiceName, @@ -94,6 +101,7 @@ namespace Grpc.Health.V1 { /// The request received from the client. /// The context of the server-side call handler being invoked. /// The response to send back to the client (wrapped by a task). + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual global::System.Threading.Tasks.Task Check(global::Grpc.Health.V1.HealthCheckRequest request, grpc::ServerCallContext context) { throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); @@ -120,6 +128,7 @@ namespace Grpc.Health.V1 { /// Used for sending responses back to the client. /// The context of the server-side call handler being invoked. /// A task indicating completion of the handler. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual global::System.Threading.Tasks.Task Watch(global::Grpc.Health.V1.HealthCheckRequest request, grpc::IServerStreamWriter responseStream, grpc::ServerCallContext context) { throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); @@ -132,20 +141,24 @@ namespace Grpc.Health.V1 { { /// Creates a new client for Health /// The channel to use to make remote calls. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public HealthClient(grpc::ChannelBase channel) : base(channel) { } /// Creates a new client for Health that uses a custom CallInvoker. /// The callInvoker to use to make remote calls. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public HealthClient(grpc::CallInvoker callInvoker) : base(callInvoker) { } /// Protected parameterless constructor to allow creation of test doubles. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] protected HealthClient() : base() { } /// Protected constructor to allow creation of configured clients. /// The client configuration. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] protected HealthClient(ClientBaseConfiguration configuration) : base(configuration) { } @@ -159,6 +172,7 @@ namespace Grpc.Health.V1 { /// An optional deadline for the call. The call will be cancelled if deadline is hit. /// An optional token for canceling the call. /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual global::Grpc.Health.V1.HealthCheckResponse Check(global::Grpc.Health.V1.HealthCheckRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { return Check(request, new grpc::CallOptions(headers, deadline, cancellationToken)); @@ -170,6 +184,7 @@ namespace Grpc.Health.V1 { /// The request to send to the server. /// The options for the call. /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual global::Grpc.Health.V1.HealthCheckResponse Check(global::Grpc.Health.V1.HealthCheckRequest request, grpc::CallOptions options) { return CallInvoker.BlockingUnaryCall(__Method_Check, null, options, request); @@ -183,6 +198,7 @@ namespace Grpc.Health.V1 { /// An optional deadline for the call. The call will be cancelled if deadline is hit. /// An optional token for canceling the call. /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual grpc::AsyncUnaryCall CheckAsync(global::Grpc.Health.V1.HealthCheckRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { return CheckAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); @@ -194,6 +210,7 @@ namespace Grpc.Health.V1 { /// The request to send to the server. /// The options for the call. /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual grpc::AsyncUnaryCall CheckAsync(global::Grpc.Health.V1.HealthCheckRequest request, grpc::CallOptions options) { return CallInvoker.AsyncUnaryCall(__Method_Check, null, options, request); @@ -220,6 +237,7 @@ namespace Grpc.Health.V1 { /// An optional deadline for the call. The call will be cancelled if deadline is hit. /// An optional token for canceling the call. /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual grpc::AsyncServerStreamingCall Watch(global::Grpc.Health.V1.HealthCheckRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { return Watch(request, new grpc::CallOptions(headers, deadline, cancellationToken)); @@ -244,11 +262,13 @@ namespace Grpc.Health.V1 { /// The request to send to the server. /// The options for the call. /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual grpc::AsyncServerStreamingCall Watch(global::Grpc.Health.V1.HealthCheckRequest request, grpc::CallOptions options) { return CallInvoker.AsyncServerStreamingCall(__Method_Watch, null, options, request); } /// Creates a new instance of client from given ClientBaseConfiguration. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] protected override HealthClient NewInstance(ClientBaseConfiguration configuration) { return new HealthClient(configuration); @@ -257,6 +277,7 @@ namespace Grpc.Health.V1 { /// Creates service definition that can be registered with a server /// An object implementing the server-side handling logic. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public static grpc::ServerServiceDefinition BindService(HealthBase serviceImpl) { return grpc::ServerServiceDefinition.CreateBuilder() @@ -268,6 +289,7 @@ namespace Grpc.Health.V1 { /// Note: this method is part of an experimental API that can change or be removed without any prior notice. /// Service methods will be bound by calling AddMethod on this object. /// An object implementing the server-side handling logic. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public static void BindService(grpc::ServiceBinderBase serviceBinder, HealthBase serviceImpl) { serviceBinder.AddMethod(__Method_Check, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.Check)); diff --git a/src/csharp/Grpc.IntegrationTesting/BenchmarkServiceGrpc.cs b/src/csharp/Grpc.IntegrationTesting/BenchmarkServiceGrpc.cs index 7c65cda71b5..d39cb5bd7f3 100644 --- a/src/csharp/Grpc.IntegrationTesting/BenchmarkServiceGrpc.cs +++ b/src/csharp/Grpc.IntegrationTesting/BenchmarkServiceGrpc.cs @@ -29,6 +29,7 @@ namespace Grpc.Testing { { static readonly string __ServiceName = "grpc.testing.BenchmarkService"; + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static void __Helper_SerializeMessage(global::Google.Protobuf.IMessage message, grpc::SerializationContext context) { #if !GRPC_DISABLE_PROTOBUF_BUFFER_SERIALIZATION @@ -43,11 +44,13 @@ namespace Grpc.Testing { context.Complete(global::Google.Protobuf.MessageExtensions.ToByteArray(message)); } + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static class __Helper_MessageCache { public static readonly bool IsBufferMessage = global::System.Reflection.IntrospectionExtensions.GetTypeInfo(typeof(global::Google.Protobuf.IBufferMessage)).IsAssignableFrom(typeof(T)); } + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static T __Helper_DeserializeMessage(grpc::DeserializationContext context, global::Google.Protobuf.MessageParser parser) where T : global::Google.Protobuf.IMessage { #if !GRPC_DISABLE_PROTOBUF_BUFFER_SERIALIZATION @@ -59,9 +62,12 @@ namespace Grpc.Testing { return parser.ParseFrom(context.PayloadAsNewBuffer()); } + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static readonly grpc::Marshaller __Marshaller_grpc_testing_SimpleRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Grpc.Testing.SimpleRequest.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static readonly grpc::Marshaller __Marshaller_grpc_testing_SimpleResponse = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Grpc.Testing.SimpleResponse.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static readonly grpc::Method __Method_UnaryCall = new grpc::Method( grpc::MethodType.Unary, __ServiceName, @@ -69,6 +75,7 @@ namespace Grpc.Testing { __Marshaller_grpc_testing_SimpleRequest, __Marshaller_grpc_testing_SimpleResponse); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static readonly grpc::Method __Method_StreamingCall = new grpc::Method( grpc::MethodType.DuplexStreaming, __ServiceName, @@ -76,6 +83,7 @@ namespace Grpc.Testing { __Marshaller_grpc_testing_SimpleRequest, __Marshaller_grpc_testing_SimpleResponse); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static readonly grpc::Method __Method_StreamingFromClient = new grpc::Method( grpc::MethodType.ClientStreaming, __ServiceName, @@ -83,6 +91,7 @@ namespace Grpc.Testing { __Marshaller_grpc_testing_SimpleRequest, __Marshaller_grpc_testing_SimpleResponse); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static readonly grpc::Method __Method_StreamingFromServer = new grpc::Method( grpc::MethodType.ServerStreaming, __ServiceName, @@ -90,6 +99,7 @@ namespace Grpc.Testing { __Marshaller_grpc_testing_SimpleRequest, __Marshaller_grpc_testing_SimpleResponse); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static readonly grpc::Method __Method_StreamingBothWays = new grpc::Method( grpc::MethodType.DuplexStreaming, __ServiceName, @@ -114,6 +124,7 @@ namespace Grpc.Testing { /// The request received from the client. /// The context of the server-side call handler being invoked. /// The response to send back to the client (wrapped by a task). + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual global::System.Threading.Tasks.Task UnaryCall(global::Grpc.Testing.SimpleRequest request, grpc::ServerCallContext context) { throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); @@ -128,6 +139,7 @@ namespace Grpc.Testing { /// Used for sending responses back to the client. /// The context of the server-side call handler being invoked. /// A task indicating completion of the handler. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual global::System.Threading.Tasks.Task StreamingCall(grpc::IAsyncStreamReader requestStream, grpc::IServerStreamWriter responseStream, grpc::ServerCallContext context) { throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); @@ -140,6 +152,7 @@ namespace Grpc.Testing { /// Used for reading requests from the client. /// The context of the server-side call handler being invoked. /// The response to send back to the client (wrapped by a task). + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual global::System.Threading.Tasks.Task StreamingFromClient(grpc::IAsyncStreamReader requestStream, grpc::ServerCallContext context) { throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); @@ -153,6 +166,7 @@ namespace Grpc.Testing { /// Used for sending responses back to the client. /// The context of the server-side call handler being invoked. /// A task indicating completion of the handler. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual global::System.Threading.Tasks.Task StreamingFromServer(global::Grpc.Testing.SimpleRequest request, grpc::IServerStreamWriter responseStream, grpc::ServerCallContext context) { throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); @@ -166,6 +180,7 @@ namespace Grpc.Testing { /// Used for sending responses back to the client. /// The context of the server-side call handler being invoked. /// A task indicating completion of the handler. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual global::System.Threading.Tasks.Task StreamingBothWays(grpc::IAsyncStreamReader requestStream, grpc::IServerStreamWriter responseStream, grpc::ServerCallContext context) { throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); @@ -178,20 +193,24 @@ namespace Grpc.Testing { { /// Creates a new client for BenchmarkService /// The channel to use to make remote calls. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public BenchmarkServiceClient(grpc::ChannelBase channel) : base(channel) { } /// Creates a new client for BenchmarkService that uses a custom CallInvoker. /// The callInvoker to use to make remote calls. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public BenchmarkServiceClient(grpc::CallInvoker callInvoker) : base(callInvoker) { } /// Protected parameterless constructor to allow creation of test doubles. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] protected BenchmarkServiceClient() : base() { } /// Protected constructor to allow creation of configured clients. /// The client configuration. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] protected BenchmarkServiceClient(ClientBaseConfiguration configuration) : base(configuration) { } @@ -205,6 +224,7 @@ namespace Grpc.Testing { /// An optional deadline for the call. The call will be cancelled if deadline is hit. /// An optional token for canceling the call. /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual global::Grpc.Testing.SimpleResponse UnaryCall(global::Grpc.Testing.SimpleRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { return UnaryCall(request, new grpc::CallOptions(headers, deadline, cancellationToken)); @@ -216,6 +236,7 @@ namespace Grpc.Testing { /// The request to send to the server. /// The options for the call. /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual global::Grpc.Testing.SimpleResponse UnaryCall(global::Grpc.Testing.SimpleRequest request, grpc::CallOptions options) { return CallInvoker.BlockingUnaryCall(__Method_UnaryCall, null, options, request); @@ -229,6 +250,7 @@ namespace Grpc.Testing { /// An optional deadline for the call. The call will be cancelled if deadline is hit. /// An optional token for canceling the call. /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual grpc::AsyncUnaryCall UnaryCallAsync(global::Grpc.Testing.SimpleRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { return UnaryCallAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); @@ -240,6 +262,7 @@ namespace Grpc.Testing { /// The request to send to the server. /// The options for the call. /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual grpc::AsyncUnaryCall UnaryCallAsync(global::Grpc.Testing.SimpleRequest request, grpc::CallOptions options) { return CallInvoker.AsyncUnaryCall(__Method_UnaryCall, null, options, request); @@ -253,6 +276,7 @@ namespace Grpc.Testing { /// An optional deadline for the call. The call will be cancelled if deadline is hit. /// An optional token for canceling the call. /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual grpc::AsyncDuplexStreamingCall StreamingCall(grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { return StreamingCall(new grpc::CallOptions(headers, deadline, cancellationToken)); @@ -264,6 +288,7 @@ namespace Grpc.Testing { /// /// The options for the call. /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual grpc::AsyncDuplexStreamingCall StreamingCall(grpc::CallOptions options) { return CallInvoker.AsyncDuplexStreamingCall(__Method_StreamingCall, null, options); @@ -276,6 +301,7 @@ namespace Grpc.Testing { /// An optional deadline for the call. The call will be cancelled if deadline is hit. /// An optional token for canceling the call. /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual grpc::AsyncClientStreamingCall StreamingFromClient(grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { return StreamingFromClient(new grpc::CallOptions(headers, deadline, cancellationToken)); @@ -286,6 +312,7 @@ namespace Grpc.Testing { /// /// The options for the call. /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual grpc::AsyncClientStreamingCall StreamingFromClient(grpc::CallOptions options) { return CallInvoker.AsyncClientStreamingCall(__Method_StreamingFromClient, null, options); @@ -299,6 +326,7 @@ namespace Grpc.Testing { /// An optional deadline for the call. The call will be cancelled if deadline is hit. /// An optional token for canceling the call. /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual grpc::AsyncServerStreamingCall StreamingFromServer(global::Grpc.Testing.SimpleRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { return StreamingFromServer(request, new grpc::CallOptions(headers, deadline, cancellationToken)); @@ -310,6 +338,7 @@ namespace Grpc.Testing { /// The request to send to the server. /// The options for the call. /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual grpc::AsyncServerStreamingCall StreamingFromServer(global::Grpc.Testing.SimpleRequest request, grpc::CallOptions options) { return CallInvoker.AsyncServerStreamingCall(__Method_StreamingFromServer, null, options, request); @@ -322,6 +351,7 @@ namespace Grpc.Testing { /// An optional deadline for the call. The call will be cancelled if deadline is hit. /// An optional token for canceling the call. /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual grpc::AsyncDuplexStreamingCall StreamingBothWays(grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { return StreamingBothWays(new grpc::CallOptions(headers, deadline, cancellationToken)); @@ -332,11 +362,13 @@ namespace Grpc.Testing { /// /// The options for the call. /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual grpc::AsyncDuplexStreamingCall StreamingBothWays(grpc::CallOptions options) { return CallInvoker.AsyncDuplexStreamingCall(__Method_StreamingBothWays, null, options); } /// Creates a new instance of client from given ClientBaseConfiguration. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] protected override BenchmarkServiceClient NewInstance(ClientBaseConfiguration configuration) { return new BenchmarkServiceClient(configuration); @@ -345,6 +377,7 @@ namespace Grpc.Testing { /// Creates service definition that can be registered with a server /// An object implementing the server-side handling logic. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public static grpc::ServerServiceDefinition BindService(BenchmarkServiceBase serviceImpl) { return grpc::ServerServiceDefinition.CreateBuilder() @@ -359,6 +392,7 @@ namespace Grpc.Testing { /// Note: this method is part of an experimental API that can change or be removed without any prior notice. /// Service methods will be bound by calling AddMethod on this object. /// An object implementing the server-side handling logic. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public static void BindService(grpc::ServiceBinderBase serviceBinder, BenchmarkServiceBase serviceImpl) { serviceBinder.AddMethod(__Method_UnaryCall, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.UnaryCall)); diff --git a/src/csharp/Grpc.IntegrationTesting/EmptyServiceGrpc.cs b/src/csharp/Grpc.IntegrationTesting/EmptyServiceGrpc.cs index 30fd6dec542..c5e9d438ad8 100644 --- a/src/csharp/Grpc.IntegrationTesting/EmptyServiceGrpc.cs +++ b/src/csharp/Grpc.IntegrationTesting/EmptyServiceGrpc.cs @@ -49,25 +49,30 @@ namespace Grpc.Testing { { /// Creates a new client for EmptyService /// The channel to use to make remote calls. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public EmptyServiceClient(grpc::ChannelBase channel) : base(channel) { } /// Creates a new client for EmptyService that uses a custom CallInvoker. /// The callInvoker to use to make remote calls. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public EmptyServiceClient(grpc::CallInvoker callInvoker) : base(callInvoker) { } /// Protected parameterless constructor to allow creation of test doubles. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] protected EmptyServiceClient() : base() { } /// Protected constructor to allow creation of configured clients. /// The client configuration. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] protected EmptyServiceClient(ClientBaseConfiguration configuration) : base(configuration) { } /// Creates a new instance of client from given ClientBaseConfiguration. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] protected override EmptyServiceClient NewInstance(ClientBaseConfiguration configuration) { return new EmptyServiceClient(configuration); @@ -76,6 +81,7 @@ namespace Grpc.Testing { /// Creates service definition that can be registered with a server /// An object implementing the server-side handling logic. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public static grpc::ServerServiceDefinition BindService(EmptyServiceBase serviceImpl) { return grpc::ServerServiceDefinition.CreateBuilder().Build(); @@ -85,6 +91,7 @@ namespace Grpc.Testing { /// Note: this method is part of an experimental API that can change or be removed without any prior notice. /// Service methods will be bound by calling AddMethod on this object. /// An object implementing the server-side handling logic. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public static void BindService(grpc::ServiceBinderBase serviceBinder, EmptyServiceBase serviceImpl) { } diff --git a/src/csharp/Grpc.IntegrationTesting/MetricsGrpc.cs b/src/csharp/Grpc.IntegrationTesting/MetricsGrpc.cs index 0b364cdd783..994546cd77a 100644 --- a/src/csharp/Grpc.IntegrationTesting/MetricsGrpc.cs +++ b/src/csharp/Grpc.IntegrationTesting/MetricsGrpc.cs @@ -33,6 +33,7 @@ namespace Grpc.Testing { { static readonly string __ServiceName = "grpc.testing.MetricsService"; + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static void __Helper_SerializeMessage(global::Google.Protobuf.IMessage message, grpc::SerializationContext context) { #if !GRPC_DISABLE_PROTOBUF_BUFFER_SERIALIZATION @@ -47,11 +48,13 @@ namespace Grpc.Testing { context.Complete(global::Google.Protobuf.MessageExtensions.ToByteArray(message)); } + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static class __Helper_MessageCache { public static readonly bool IsBufferMessage = global::System.Reflection.IntrospectionExtensions.GetTypeInfo(typeof(global::Google.Protobuf.IBufferMessage)).IsAssignableFrom(typeof(T)); } + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static T __Helper_DeserializeMessage(grpc::DeserializationContext context, global::Google.Protobuf.MessageParser parser) where T : global::Google.Protobuf.IMessage { #if !GRPC_DISABLE_PROTOBUF_BUFFER_SERIALIZATION @@ -63,10 +66,14 @@ namespace Grpc.Testing { return parser.ParseFrom(context.PayloadAsNewBuffer()); } + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static readonly grpc::Marshaller __Marshaller_grpc_testing_EmptyMessage = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Grpc.Testing.EmptyMessage.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static readonly grpc::Marshaller __Marshaller_grpc_testing_GaugeResponse = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Grpc.Testing.GaugeResponse.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static readonly grpc::Marshaller __Marshaller_grpc_testing_GaugeRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Grpc.Testing.GaugeRequest.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static readonly grpc::Method __Method_GetAllGauges = new grpc::Method( grpc::MethodType.ServerStreaming, __ServiceName, @@ -74,6 +81,7 @@ namespace Grpc.Testing { __Marshaller_grpc_testing_EmptyMessage, __Marshaller_grpc_testing_GaugeResponse); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static readonly grpc::Method __Method_GetGauge = new grpc::Method( grpc::MethodType.Unary, __ServiceName, @@ -99,6 +107,7 @@ namespace Grpc.Testing { /// Used for sending responses back to the client. /// The context of the server-side call handler being invoked. /// A task indicating completion of the handler. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual global::System.Threading.Tasks.Task GetAllGauges(global::Grpc.Testing.EmptyMessage request, grpc::IServerStreamWriter responseStream, grpc::ServerCallContext context) { throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); @@ -110,6 +119,7 @@ namespace Grpc.Testing { /// The request received from the client. /// The context of the server-side call handler being invoked. /// The response to send back to the client (wrapped by a task). + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual global::System.Threading.Tasks.Task GetGauge(global::Grpc.Testing.GaugeRequest request, grpc::ServerCallContext context) { throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); @@ -122,20 +132,24 @@ namespace Grpc.Testing { { /// Creates a new client for MetricsService /// The channel to use to make remote calls. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public MetricsServiceClient(grpc::ChannelBase channel) : base(channel) { } /// Creates a new client for MetricsService that uses a custom CallInvoker. /// The callInvoker to use to make remote calls. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public MetricsServiceClient(grpc::CallInvoker callInvoker) : base(callInvoker) { } /// Protected parameterless constructor to allow creation of test doubles. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] protected MetricsServiceClient() : base() { } /// Protected constructor to allow creation of configured clients. /// The client configuration. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] protected MetricsServiceClient(ClientBaseConfiguration configuration) : base(configuration) { } @@ -149,6 +163,7 @@ namespace Grpc.Testing { /// An optional deadline for the call. The call will be cancelled if deadline is hit. /// An optional token for canceling the call. /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual grpc::AsyncServerStreamingCall GetAllGauges(global::Grpc.Testing.EmptyMessage request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { return GetAllGauges(request, new grpc::CallOptions(headers, deadline, cancellationToken)); @@ -160,6 +175,7 @@ namespace Grpc.Testing { /// The request to send to the server. /// The options for the call. /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual grpc::AsyncServerStreamingCall GetAllGauges(global::Grpc.Testing.EmptyMessage request, grpc::CallOptions options) { return CallInvoker.AsyncServerStreamingCall(__Method_GetAllGauges, null, options, request); @@ -172,6 +188,7 @@ namespace Grpc.Testing { /// An optional deadline for the call. The call will be cancelled if deadline is hit. /// An optional token for canceling the call. /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual global::Grpc.Testing.GaugeResponse GetGauge(global::Grpc.Testing.GaugeRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { return GetGauge(request, new grpc::CallOptions(headers, deadline, cancellationToken)); @@ -182,6 +199,7 @@ namespace Grpc.Testing { /// The request to send to the server. /// The options for the call. /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual global::Grpc.Testing.GaugeResponse GetGauge(global::Grpc.Testing.GaugeRequest request, grpc::CallOptions options) { return CallInvoker.BlockingUnaryCall(__Method_GetGauge, null, options, request); @@ -194,6 +212,7 @@ namespace Grpc.Testing { /// An optional deadline for the call. The call will be cancelled if deadline is hit. /// An optional token for canceling the call. /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual grpc::AsyncUnaryCall GetGaugeAsync(global::Grpc.Testing.GaugeRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { return GetGaugeAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); @@ -204,11 +223,13 @@ namespace Grpc.Testing { /// The request to send to the server. /// The options for the call. /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual grpc::AsyncUnaryCall GetGaugeAsync(global::Grpc.Testing.GaugeRequest request, grpc::CallOptions options) { return CallInvoker.AsyncUnaryCall(__Method_GetGauge, null, options, request); } /// Creates a new instance of client from given ClientBaseConfiguration. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] protected override MetricsServiceClient NewInstance(ClientBaseConfiguration configuration) { return new MetricsServiceClient(configuration); @@ -217,6 +238,7 @@ namespace Grpc.Testing { /// Creates service definition that can be registered with a server /// An object implementing the server-side handling logic. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public static grpc::ServerServiceDefinition BindService(MetricsServiceBase serviceImpl) { return grpc::ServerServiceDefinition.CreateBuilder() @@ -228,6 +250,7 @@ namespace Grpc.Testing { /// Note: this method is part of an experimental API that can change or be removed without any prior notice. /// Service methods will be bound by calling AddMethod on this object. /// An object implementing the server-side handling logic. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public static void BindService(grpc::ServiceBinderBase serviceBinder, MetricsServiceBase serviceImpl) { serviceBinder.AddMethod(__Method_GetAllGauges, serviceImpl == null ? null : new grpc::ServerStreamingServerMethod(serviceImpl.GetAllGauges)); diff --git a/src/csharp/Grpc.IntegrationTesting/ReportQpsScenarioServiceGrpc.cs b/src/csharp/Grpc.IntegrationTesting/ReportQpsScenarioServiceGrpc.cs index 98f03dbab3a..36ba70d809b 100644 --- a/src/csharp/Grpc.IntegrationTesting/ReportQpsScenarioServiceGrpc.cs +++ b/src/csharp/Grpc.IntegrationTesting/ReportQpsScenarioServiceGrpc.cs @@ -29,6 +29,7 @@ namespace Grpc.Testing { { static readonly string __ServiceName = "grpc.testing.ReportQpsScenarioService"; + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static void __Helper_SerializeMessage(global::Google.Protobuf.IMessage message, grpc::SerializationContext context) { #if !GRPC_DISABLE_PROTOBUF_BUFFER_SERIALIZATION @@ -43,11 +44,13 @@ namespace Grpc.Testing { context.Complete(global::Google.Protobuf.MessageExtensions.ToByteArray(message)); } + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static class __Helper_MessageCache { public static readonly bool IsBufferMessage = global::System.Reflection.IntrospectionExtensions.GetTypeInfo(typeof(global::Google.Protobuf.IBufferMessage)).IsAssignableFrom(typeof(T)); } + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static T __Helper_DeserializeMessage(grpc::DeserializationContext context, global::Google.Protobuf.MessageParser parser) where T : global::Google.Protobuf.IMessage { #if !GRPC_DISABLE_PROTOBUF_BUFFER_SERIALIZATION @@ -59,9 +62,12 @@ namespace Grpc.Testing { return parser.ParseFrom(context.PayloadAsNewBuffer()); } + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static readonly grpc::Marshaller __Marshaller_grpc_testing_ScenarioResult = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Grpc.Testing.ScenarioResult.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static readonly grpc::Marshaller __Marshaller_grpc_testing_Void = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Grpc.Testing.Void.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static readonly grpc::Method __Method_ReportScenario = new grpc::Method( grpc::MethodType.Unary, __ServiceName, @@ -85,6 +91,7 @@ namespace Grpc.Testing { /// The request received from the client. /// The context of the server-side call handler being invoked. /// The response to send back to the client (wrapped by a task). + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual global::System.Threading.Tasks.Task ReportScenario(global::Grpc.Testing.ScenarioResult request, grpc::ServerCallContext context) { throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); @@ -97,20 +104,24 @@ namespace Grpc.Testing { { /// Creates a new client for ReportQpsScenarioService /// The channel to use to make remote calls. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public ReportQpsScenarioServiceClient(grpc::ChannelBase channel) : base(channel) { } /// Creates a new client for ReportQpsScenarioService that uses a custom CallInvoker. /// The callInvoker to use to make remote calls. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public ReportQpsScenarioServiceClient(grpc::CallInvoker callInvoker) : base(callInvoker) { } /// Protected parameterless constructor to allow creation of test doubles. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] protected ReportQpsScenarioServiceClient() : base() { } /// Protected constructor to allow creation of configured clients. /// The client configuration. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] protected ReportQpsScenarioServiceClient(ClientBaseConfiguration configuration) : base(configuration) { } @@ -123,6 +134,7 @@ namespace Grpc.Testing { /// An optional deadline for the call. The call will be cancelled if deadline is hit. /// An optional token for canceling the call. /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual global::Grpc.Testing.Void ReportScenario(global::Grpc.Testing.ScenarioResult request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { return ReportScenario(request, new grpc::CallOptions(headers, deadline, cancellationToken)); @@ -133,6 +145,7 @@ namespace Grpc.Testing { /// The request to send to the server. /// The options for the call. /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual global::Grpc.Testing.Void ReportScenario(global::Grpc.Testing.ScenarioResult request, grpc::CallOptions options) { return CallInvoker.BlockingUnaryCall(__Method_ReportScenario, null, options, request); @@ -145,6 +158,7 @@ namespace Grpc.Testing { /// An optional deadline for the call. The call will be cancelled if deadline is hit. /// An optional token for canceling the call. /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual grpc::AsyncUnaryCall ReportScenarioAsync(global::Grpc.Testing.ScenarioResult request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { return ReportScenarioAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); @@ -155,11 +169,13 @@ namespace Grpc.Testing { /// The request to send to the server. /// The options for the call. /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual grpc::AsyncUnaryCall ReportScenarioAsync(global::Grpc.Testing.ScenarioResult request, grpc::CallOptions options) { return CallInvoker.AsyncUnaryCall(__Method_ReportScenario, null, options, request); } /// Creates a new instance of client from given ClientBaseConfiguration. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] protected override ReportQpsScenarioServiceClient NewInstance(ClientBaseConfiguration configuration) { return new ReportQpsScenarioServiceClient(configuration); @@ -168,6 +184,7 @@ namespace Grpc.Testing { /// Creates service definition that can be registered with a server /// An object implementing the server-side handling logic. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public static grpc::ServerServiceDefinition BindService(ReportQpsScenarioServiceBase serviceImpl) { return grpc::ServerServiceDefinition.CreateBuilder() @@ -178,6 +195,7 @@ namespace Grpc.Testing { /// Note: this method is part of an experimental API that can change or be removed without any prior notice. /// Service methods will be bound by calling AddMethod on this object. /// An object implementing the server-side handling logic. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public static void BindService(grpc::ServiceBinderBase serviceBinder, ReportQpsScenarioServiceBase serviceImpl) { serviceBinder.AddMethod(__Method_ReportScenario, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.ReportScenario)); diff --git a/src/csharp/Grpc.IntegrationTesting/TestGrpc.cs b/src/csharp/Grpc.IntegrationTesting/TestGrpc.cs index 8c1e0123879..4887c671571 100644 --- a/src/csharp/Grpc.IntegrationTesting/TestGrpc.cs +++ b/src/csharp/Grpc.IntegrationTesting/TestGrpc.cs @@ -34,6 +34,7 @@ namespace Grpc.Testing { { static readonly string __ServiceName = "grpc.testing.TestService"; + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static void __Helper_SerializeMessage(global::Google.Protobuf.IMessage message, grpc::SerializationContext context) { #if !GRPC_DISABLE_PROTOBUF_BUFFER_SERIALIZATION @@ -48,11 +49,13 @@ namespace Grpc.Testing { context.Complete(global::Google.Protobuf.MessageExtensions.ToByteArray(message)); } + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static class __Helper_MessageCache { public static readonly bool IsBufferMessage = global::System.Reflection.IntrospectionExtensions.GetTypeInfo(typeof(global::Google.Protobuf.IBufferMessage)).IsAssignableFrom(typeof(T)); } + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static T __Helper_DeserializeMessage(grpc::DeserializationContext context, global::Google.Protobuf.MessageParser parser) where T : global::Google.Protobuf.IMessage { #if !GRPC_DISABLE_PROTOBUF_BUFFER_SERIALIZATION @@ -64,14 +67,22 @@ namespace Grpc.Testing { return parser.ParseFrom(context.PayloadAsNewBuffer()); } + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static readonly grpc::Marshaller __Marshaller_grpc_testing_Empty = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Grpc.Testing.Empty.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static readonly grpc::Marshaller __Marshaller_grpc_testing_SimpleRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Grpc.Testing.SimpleRequest.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static readonly grpc::Marshaller __Marshaller_grpc_testing_SimpleResponse = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Grpc.Testing.SimpleResponse.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static readonly grpc::Marshaller __Marshaller_grpc_testing_StreamingOutputCallRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Grpc.Testing.StreamingOutputCallRequest.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static readonly grpc::Marshaller __Marshaller_grpc_testing_StreamingOutputCallResponse = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Grpc.Testing.StreamingOutputCallResponse.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static readonly grpc::Marshaller __Marshaller_grpc_testing_StreamingInputCallRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Grpc.Testing.StreamingInputCallRequest.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static readonly grpc::Marshaller __Marshaller_grpc_testing_StreamingInputCallResponse = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Grpc.Testing.StreamingInputCallResponse.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static readonly grpc::Method __Method_EmptyCall = new grpc::Method( grpc::MethodType.Unary, __ServiceName, @@ -79,6 +90,7 @@ namespace Grpc.Testing { __Marshaller_grpc_testing_Empty, __Marshaller_grpc_testing_Empty); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static readonly grpc::Method __Method_UnaryCall = new grpc::Method( grpc::MethodType.Unary, __ServiceName, @@ -86,6 +98,7 @@ namespace Grpc.Testing { __Marshaller_grpc_testing_SimpleRequest, __Marshaller_grpc_testing_SimpleResponse); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static readonly grpc::Method __Method_CacheableUnaryCall = new grpc::Method( grpc::MethodType.Unary, __ServiceName, @@ -93,6 +106,7 @@ namespace Grpc.Testing { __Marshaller_grpc_testing_SimpleRequest, __Marshaller_grpc_testing_SimpleResponse); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static readonly grpc::Method __Method_StreamingOutputCall = new grpc::Method( grpc::MethodType.ServerStreaming, __ServiceName, @@ -100,6 +114,7 @@ namespace Grpc.Testing { __Marshaller_grpc_testing_StreamingOutputCallRequest, __Marshaller_grpc_testing_StreamingOutputCallResponse); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static readonly grpc::Method __Method_StreamingInputCall = new grpc::Method( grpc::MethodType.ClientStreaming, __ServiceName, @@ -107,6 +122,7 @@ namespace Grpc.Testing { __Marshaller_grpc_testing_StreamingInputCallRequest, __Marshaller_grpc_testing_StreamingInputCallResponse); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static readonly grpc::Method __Method_FullDuplexCall = new grpc::Method( grpc::MethodType.DuplexStreaming, __ServiceName, @@ -114,6 +130,7 @@ namespace Grpc.Testing { __Marshaller_grpc_testing_StreamingOutputCallRequest, __Marshaller_grpc_testing_StreamingOutputCallResponse); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static readonly grpc::Method __Method_HalfDuplexCall = new grpc::Method( grpc::MethodType.DuplexStreaming, __ServiceName, @@ -121,6 +138,7 @@ namespace Grpc.Testing { __Marshaller_grpc_testing_StreamingOutputCallRequest, __Marshaller_grpc_testing_StreamingOutputCallResponse); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static readonly grpc::Method __Method_UnimplementedCall = new grpc::Method( grpc::MethodType.Unary, __ServiceName, @@ -144,6 +162,7 @@ namespace Grpc.Testing { /// The request received from the client. /// The context of the server-side call handler being invoked. /// The response to send back to the client (wrapped by a task). + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual global::System.Threading.Tasks.Task EmptyCall(global::Grpc.Testing.Empty request, grpc::ServerCallContext context) { throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); @@ -155,6 +174,7 @@ namespace Grpc.Testing { /// The request received from the client. /// The context of the server-side call handler being invoked. /// The response to send back to the client (wrapped by a task). + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual global::System.Threading.Tasks.Task UnaryCall(global::Grpc.Testing.SimpleRequest request, grpc::ServerCallContext context) { throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); @@ -168,6 +188,7 @@ namespace Grpc.Testing { /// The request received from the client. /// The context of the server-side call handler being invoked. /// The response to send back to the client (wrapped by a task). + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual global::System.Threading.Tasks.Task CacheableUnaryCall(global::Grpc.Testing.SimpleRequest request, grpc::ServerCallContext context) { throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); @@ -181,6 +202,7 @@ namespace Grpc.Testing { /// Used for sending responses back to the client. /// The context of the server-side call handler being invoked. /// A task indicating completion of the handler. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual global::System.Threading.Tasks.Task StreamingOutputCall(global::Grpc.Testing.StreamingOutputCallRequest request, grpc::IServerStreamWriter responseStream, grpc::ServerCallContext context) { throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); @@ -193,6 +215,7 @@ namespace Grpc.Testing { /// Used for reading requests from the client. /// The context of the server-side call handler being invoked. /// The response to send back to the client (wrapped by a task). + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual global::System.Threading.Tasks.Task StreamingInputCall(grpc::IAsyncStreamReader requestStream, grpc::ServerCallContext context) { throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); @@ -207,6 +230,7 @@ namespace Grpc.Testing { /// Used for sending responses back to the client. /// The context of the server-side call handler being invoked. /// A task indicating completion of the handler. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual global::System.Threading.Tasks.Task FullDuplexCall(grpc::IAsyncStreamReader requestStream, grpc::IServerStreamWriter responseStream, grpc::ServerCallContext context) { throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); @@ -222,6 +246,7 @@ namespace Grpc.Testing { /// Used for sending responses back to the client. /// The context of the server-side call handler being invoked. /// A task indicating completion of the handler. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual global::System.Threading.Tasks.Task HalfDuplexCall(grpc::IAsyncStreamReader requestStream, grpc::IServerStreamWriter responseStream, grpc::ServerCallContext context) { throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); @@ -234,6 +259,7 @@ namespace Grpc.Testing { /// The request received from the client. /// The context of the server-side call handler being invoked. /// The response to send back to the client (wrapped by a task). + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual global::System.Threading.Tasks.Task UnimplementedCall(global::Grpc.Testing.Empty request, grpc::ServerCallContext context) { throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); @@ -246,20 +272,24 @@ namespace Grpc.Testing { { /// Creates a new client for TestService /// The channel to use to make remote calls. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public TestServiceClient(grpc::ChannelBase channel) : base(channel) { } /// Creates a new client for TestService that uses a custom CallInvoker. /// The callInvoker to use to make remote calls. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public TestServiceClient(grpc::CallInvoker callInvoker) : base(callInvoker) { } /// Protected parameterless constructor to allow creation of test doubles. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] protected TestServiceClient() : base() { } /// Protected constructor to allow creation of configured clients. /// The client configuration. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] protected TestServiceClient(ClientBaseConfiguration configuration) : base(configuration) { } @@ -272,6 +302,7 @@ namespace Grpc.Testing { /// An optional deadline for the call. The call will be cancelled if deadline is hit. /// An optional token for canceling the call. /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual global::Grpc.Testing.Empty EmptyCall(global::Grpc.Testing.Empty request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { return EmptyCall(request, new grpc::CallOptions(headers, deadline, cancellationToken)); @@ -282,6 +313,7 @@ namespace Grpc.Testing { /// The request to send to the server. /// The options for the call. /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual global::Grpc.Testing.Empty EmptyCall(global::Grpc.Testing.Empty request, grpc::CallOptions options) { return CallInvoker.BlockingUnaryCall(__Method_EmptyCall, null, options, request); @@ -294,6 +326,7 @@ namespace Grpc.Testing { /// An optional deadline for the call. The call will be cancelled if deadline is hit. /// An optional token for canceling the call. /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual grpc::AsyncUnaryCall EmptyCallAsync(global::Grpc.Testing.Empty request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { return EmptyCallAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); @@ -304,6 +337,7 @@ namespace Grpc.Testing { /// The request to send to the server. /// The options for the call. /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual grpc::AsyncUnaryCall EmptyCallAsync(global::Grpc.Testing.Empty request, grpc::CallOptions options) { return CallInvoker.AsyncUnaryCall(__Method_EmptyCall, null, options, request); @@ -316,6 +350,7 @@ namespace Grpc.Testing { /// An optional deadline for the call. The call will be cancelled if deadline is hit. /// An optional token for canceling the call. /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual global::Grpc.Testing.SimpleResponse UnaryCall(global::Grpc.Testing.SimpleRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { return UnaryCall(request, new grpc::CallOptions(headers, deadline, cancellationToken)); @@ -326,6 +361,7 @@ namespace Grpc.Testing { /// The request to send to the server. /// The options for the call. /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual global::Grpc.Testing.SimpleResponse UnaryCall(global::Grpc.Testing.SimpleRequest request, grpc::CallOptions options) { return CallInvoker.BlockingUnaryCall(__Method_UnaryCall, null, options, request); @@ -338,6 +374,7 @@ namespace Grpc.Testing { /// An optional deadline for the call. The call will be cancelled if deadline is hit. /// An optional token for canceling the call. /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual grpc::AsyncUnaryCall UnaryCallAsync(global::Grpc.Testing.SimpleRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { return UnaryCallAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); @@ -348,6 +385,7 @@ namespace Grpc.Testing { /// The request to send to the server. /// The options for the call. /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual grpc::AsyncUnaryCall UnaryCallAsync(global::Grpc.Testing.SimpleRequest request, grpc::CallOptions options) { return CallInvoker.AsyncUnaryCall(__Method_UnaryCall, null, options, request); @@ -362,6 +400,7 @@ namespace Grpc.Testing { /// An optional deadline for the call. The call will be cancelled if deadline is hit. /// An optional token for canceling the call. /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual global::Grpc.Testing.SimpleResponse CacheableUnaryCall(global::Grpc.Testing.SimpleRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { return CacheableUnaryCall(request, new grpc::CallOptions(headers, deadline, cancellationToken)); @@ -374,6 +413,7 @@ namespace Grpc.Testing { /// The request to send to the server. /// The options for the call. /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual global::Grpc.Testing.SimpleResponse CacheableUnaryCall(global::Grpc.Testing.SimpleRequest request, grpc::CallOptions options) { return CallInvoker.BlockingUnaryCall(__Method_CacheableUnaryCall, null, options, request); @@ -388,6 +428,7 @@ namespace Grpc.Testing { /// An optional deadline for the call. The call will be cancelled if deadline is hit. /// An optional token for canceling the call. /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual grpc::AsyncUnaryCall CacheableUnaryCallAsync(global::Grpc.Testing.SimpleRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { return CacheableUnaryCallAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); @@ -400,6 +441,7 @@ namespace Grpc.Testing { /// The request to send to the server. /// The options for the call. /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual grpc::AsyncUnaryCall CacheableUnaryCallAsync(global::Grpc.Testing.SimpleRequest request, grpc::CallOptions options) { return CallInvoker.AsyncUnaryCall(__Method_CacheableUnaryCall, null, options, request); @@ -413,6 +455,7 @@ namespace Grpc.Testing { /// An optional deadline for the call. The call will be cancelled if deadline is hit. /// An optional token for canceling the call. /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual grpc::AsyncServerStreamingCall StreamingOutputCall(global::Grpc.Testing.StreamingOutputCallRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { return StreamingOutputCall(request, new grpc::CallOptions(headers, deadline, cancellationToken)); @@ -424,6 +467,7 @@ namespace Grpc.Testing { /// The request to send to the server. /// The options for the call. /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual grpc::AsyncServerStreamingCall StreamingOutputCall(global::Grpc.Testing.StreamingOutputCallRequest request, grpc::CallOptions options) { return CallInvoker.AsyncServerStreamingCall(__Method_StreamingOutputCall, null, options, request); @@ -436,6 +480,7 @@ namespace Grpc.Testing { /// An optional deadline for the call. The call will be cancelled if deadline is hit. /// An optional token for canceling the call. /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual grpc::AsyncClientStreamingCall StreamingInputCall(grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { return StreamingInputCall(new grpc::CallOptions(headers, deadline, cancellationToken)); @@ -446,6 +491,7 @@ namespace Grpc.Testing { /// /// The options for the call. /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual grpc::AsyncClientStreamingCall StreamingInputCall(grpc::CallOptions options) { return CallInvoker.AsyncClientStreamingCall(__Method_StreamingInputCall, null, options); @@ -459,6 +505,7 @@ namespace Grpc.Testing { /// An optional deadline for the call. The call will be cancelled if deadline is hit. /// An optional token for canceling the call. /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual grpc::AsyncDuplexStreamingCall FullDuplexCall(grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { return FullDuplexCall(new grpc::CallOptions(headers, deadline, cancellationToken)); @@ -470,6 +517,7 @@ namespace Grpc.Testing { /// /// The options for the call. /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual grpc::AsyncDuplexStreamingCall FullDuplexCall(grpc::CallOptions options) { return CallInvoker.AsyncDuplexStreamingCall(__Method_FullDuplexCall, null, options); @@ -484,6 +532,7 @@ namespace Grpc.Testing { /// An optional deadline for the call. The call will be cancelled if deadline is hit. /// An optional token for canceling the call. /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual grpc::AsyncDuplexStreamingCall HalfDuplexCall(grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { return HalfDuplexCall(new grpc::CallOptions(headers, deadline, cancellationToken)); @@ -496,6 +545,7 @@ namespace Grpc.Testing { /// /// The options for the call. /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual grpc::AsyncDuplexStreamingCall HalfDuplexCall(grpc::CallOptions options) { return CallInvoker.AsyncDuplexStreamingCall(__Method_HalfDuplexCall, null, options); @@ -509,6 +559,7 @@ namespace Grpc.Testing { /// An optional deadline for the call. The call will be cancelled if deadline is hit. /// An optional token for canceling the call. /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual global::Grpc.Testing.Empty UnimplementedCall(global::Grpc.Testing.Empty request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { return UnimplementedCall(request, new grpc::CallOptions(headers, deadline, cancellationToken)); @@ -520,6 +571,7 @@ namespace Grpc.Testing { /// The request to send to the server. /// The options for the call. /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual global::Grpc.Testing.Empty UnimplementedCall(global::Grpc.Testing.Empty request, grpc::CallOptions options) { return CallInvoker.BlockingUnaryCall(__Method_UnimplementedCall, null, options, request); @@ -533,6 +585,7 @@ namespace Grpc.Testing { /// An optional deadline for the call. The call will be cancelled if deadline is hit. /// An optional token for canceling the call. /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual grpc::AsyncUnaryCall UnimplementedCallAsync(global::Grpc.Testing.Empty request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { return UnimplementedCallAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); @@ -544,11 +597,13 @@ namespace Grpc.Testing { /// The request to send to the server. /// The options for the call. /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual grpc::AsyncUnaryCall UnimplementedCallAsync(global::Grpc.Testing.Empty request, grpc::CallOptions options) { return CallInvoker.AsyncUnaryCall(__Method_UnimplementedCall, null, options, request); } /// Creates a new instance of client from given ClientBaseConfiguration. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] protected override TestServiceClient NewInstance(ClientBaseConfiguration configuration) { return new TestServiceClient(configuration); @@ -557,6 +612,7 @@ namespace Grpc.Testing { /// Creates service definition that can be registered with a server /// An object implementing the server-side handling logic. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public static grpc::ServerServiceDefinition BindService(TestServiceBase serviceImpl) { return grpc::ServerServiceDefinition.CreateBuilder() @@ -574,6 +630,7 @@ namespace Grpc.Testing { /// Note: this method is part of an experimental API that can change or be removed without any prior notice. /// Service methods will be bound by calling AddMethod on this object. /// An object implementing the server-side handling logic. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public static void BindService(grpc::ServiceBinderBase serviceBinder, TestServiceBase serviceImpl) { serviceBinder.AddMethod(__Method_EmptyCall, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.EmptyCall)); @@ -595,6 +652,7 @@ namespace Grpc.Testing { { static readonly string __ServiceName = "grpc.testing.UnimplementedService"; + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static void __Helper_SerializeMessage(global::Google.Protobuf.IMessage message, grpc::SerializationContext context) { #if !GRPC_DISABLE_PROTOBUF_BUFFER_SERIALIZATION @@ -609,11 +667,13 @@ namespace Grpc.Testing { context.Complete(global::Google.Protobuf.MessageExtensions.ToByteArray(message)); } + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static class __Helper_MessageCache { public static readonly bool IsBufferMessage = global::System.Reflection.IntrospectionExtensions.GetTypeInfo(typeof(global::Google.Protobuf.IBufferMessage)).IsAssignableFrom(typeof(T)); } + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static T __Helper_DeserializeMessage(grpc::DeserializationContext context, global::Google.Protobuf.MessageParser parser) where T : global::Google.Protobuf.IMessage { #if !GRPC_DISABLE_PROTOBUF_BUFFER_SERIALIZATION @@ -625,8 +685,10 @@ namespace Grpc.Testing { return parser.ParseFrom(context.PayloadAsNewBuffer()); } + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static readonly grpc::Marshaller __Marshaller_grpc_testing_Empty = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Grpc.Testing.Empty.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static readonly grpc::Method __Method_UnimplementedCall = new grpc::Method( grpc::MethodType.Unary, __ServiceName, @@ -650,6 +712,7 @@ namespace Grpc.Testing { /// The request received from the client. /// The context of the server-side call handler being invoked. /// The response to send back to the client (wrapped by a task). + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual global::System.Threading.Tasks.Task UnimplementedCall(global::Grpc.Testing.Empty request, grpc::ServerCallContext context) { throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); @@ -662,20 +725,24 @@ namespace Grpc.Testing { { /// Creates a new client for UnimplementedService /// The channel to use to make remote calls. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public UnimplementedServiceClient(grpc::ChannelBase channel) : base(channel) { } /// Creates a new client for UnimplementedService that uses a custom CallInvoker. /// The callInvoker to use to make remote calls. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public UnimplementedServiceClient(grpc::CallInvoker callInvoker) : base(callInvoker) { } /// Protected parameterless constructor to allow creation of test doubles. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] protected UnimplementedServiceClient() : base() { } /// Protected constructor to allow creation of configured clients. /// The client configuration. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] protected UnimplementedServiceClient(ClientBaseConfiguration configuration) : base(configuration) { } @@ -688,6 +755,7 @@ namespace Grpc.Testing { /// An optional deadline for the call. The call will be cancelled if deadline is hit. /// An optional token for canceling the call. /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual global::Grpc.Testing.Empty UnimplementedCall(global::Grpc.Testing.Empty request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { return UnimplementedCall(request, new grpc::CallOptions(headers, deadline, cancellationToken)); @@ -698,6 +766,7 @@ namespace Grpc.Testing { /// The request to send to the server. /// The options for the call. /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual global::Grpc.Testing.Empty UnimplementedCall(global::Grpc.Testing.Empty request, grpc::CallOptions options) { return CallInvoker.BlockingUnaryCall(__Method_UnimplementedCall, null, options, request); @@ -710,6 +779,7 @@ namespace Grpc.Testing { /// An optional deadline for the call. The call will be cancelled if deadline is hit. /// An optional token for canceling the call. /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual grpc::AsyncUnaryCall UnimplementedCallAsync(global::Grpc.Testing.Empty request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { return UnimplementedCallAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); @@ -720,11 +790,13 @@ namespace Grpc.Testing { /// The request to send to the server. /// The options for the call. /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual grpc::AsyncUnaryCall UnimplementedCallAsync(global::Grpc.Testing.Empty request, grpc::CallOptions options) { return CallInvoker.AsyncUnaryCall(__Method_UnimplementedCall, null, options, request); } /// Creates a new instance of client from given ClientBaseConfiguration. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] protected override UnimplementedServiceClient NewInstance(ClientBaseConfiguration configuration) { return new UnimplementedServiceClient(configuration); @@ -733,6 +805,7 @@ namespace Grpc.Testing { /// Creates service definition that can be registered with a server /// An object implementing the server-side handling logic. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public static grpc::ServerServiceDefinition BindService(UnimplementedServiceBase serviceImpl) { return grpc::ServerServiceDefinition.CreateBuilder() @@ -743,6 +816,7 @@ namespace Grpc.Testing { /// Note: this method is part of an experimental API that can change or be removed without any prior notice. /// Service methods will be bound by calling AddMethod on this object. /// An object implementing the server-side handling logic. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public static void BindService(grpc::ServiceBinderBase serviceBinder, UnimplementedServiceBase serviceImpl) { serviceBinder.AddMethod(__Method_UnimplementedCall, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.UnimplementedCall)); @@ -756,6 +830,7 @@ namespace Grpc.Testing { { static readonly string __ServiceName = "grpc.testing.ReconnectService"; + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static void __Helper_SerializeMessage(global::Google.Protobuf.IMessage message, grpc::SerializationContext context) { #if !GRPC_DISABLE_PROTOBUF_BUFFER_SERIALIZATION @@ -770,11 +845,13 @@ namespace Grpc.Testing { context.Complete(global::Google.Protobuf.MessageExtensions.ToByteArray(message)); } + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static class __Helper_MessageCache { public static readonly bool IsBufferMessage = global::System.Reflection.IntrospectionExtensions.GetTypeInfo(typeof(global::Google.Protobuf.IBufferMessage)).IsAssignableFrom(typeof(T)); } + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static T __Helper_DeserializeMessage(grpc::DeserializationContext context, global::Google.Protobuf.MessageParser parser) where T : global::Google.Protobuf.IMessage { #if !GRPC_DISABLE_PROTOBUF_BUFFER_SERIALIZATION @@ -786,10 +863,14 @@ namespace Grpc.Testing { return parser.ParseFrom(context.PayloadAsNewBuffer()); } + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static readonly grpc::Marshaller __Marshaller_grpc_testing_ReconnectParams = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Grpc.Testing.ReconnectParams.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static readonly grpc::Marshaller __Marshaller_grpc_testing_Empty = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Grpc.Testing.Empty.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static readonly grpc::Marshaller __Marshaller_grpc_testing_ReconnectInfo = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Grpc.Testing.ReconnectInfo.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static readonly grpc::Method __Method_Start = new grpc::Method( grpc::MethodType.Unary, __ServiceName, @@ -797,6 +878,7 @@ namespace Grpc.Testing { __Marshaller_grpc_testing_ReconnectParams, __Marshaller_grpc_testing_Empty); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static readonly grpc::Method __Method_Stop = new grpc::Method( grpc::MethodType.Unary, __ServiceName, @@ -814,11 +896,13 @@ namespace Grpc.Testing { [grpc::BindServiceMethod(typeof(ReconnectService), "BindService")] public abstract partial class ReconnectServiceBase { + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual global::System.Threading.Tasks.Task Start(global::Grpc.Testing.ReconnectParams request, grpc::ServerCallContext context) { throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); } + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual global::System.Threading.Tasks.Task Stop(global::Grpc.Testing.Empty request, grpc::ServerCallContext context) { throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); @@ -831,57 +915,70 @@ namespace Grpc.Testing { { /// Creates a new client for ReconnectService /// The channel to use to make remote calls. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public ReconnectServiceClient(grpc::ChannelBase channel) : base(channel) { } /// Creates a new client for ReconnectService that uses a custom CallInvoker. /// The callInvoker to use to make remote calls. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public ReconnectServiceClient(grpc::CallInvoker callInvoker) : base(callInvoker) { } /// Protected parameterless constructor to allow creation of test doubles. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] protected ReconnectServiceClient() : base() { } /// Protected constructor to allow creation of configured clients. /// The client configuration. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] protected ReconnectServiceClient(ClientBaseConfiguration configuration) : base(configuration) { } + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual global::Grpc.Testing.Empty Start(global::Grpc.Testing.ReconnectParams request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { return Start(request, new grpc::CallOptions(headers, deadline, cancellationToken)); } + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual global::Grpc.Testing.Empty Start(global::Grpc.Testing.ReconnectParams request, grpc::CallOptions options) { return CallInvoker.BlockingUnaryCall(__Method_Start, null, options, request); } + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual grpc::AsyncUnaryCall StartAsync(global::Grpc.Testing.ReconnectParams request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { return StartAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); } + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual grpc::AsyncUnaryCall StartAsync(global::Grpc.Testing.ReconnectParams request, grpc::CallOptions options) { return CallInvoker.AsyncUnaryCall(__Method_Start, null, options, request); } + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual global::Grpc.Testing.ReconnectInfo Stop(global::Grpc.Testing.Empty request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { return Stop(request, new grpc::CallOptions(headers, deadline, cancellationToken)); } + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual global::Grpc.Testing.ReconnectInfo Stop(global::Grpc.Testing.Empty request, grpc::CallOptions options) { return CallInvoker.BlockingUnaryCall(__Method_Stop, null, options, request); } + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual grpc::AsyncUnaryCall StopAsync(global::Grpc.Testing.Empty request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { return StopAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); } + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual grpc::AsyncUnaryCall StopAsync(global::Grpc.Testing.Empty request, grpc::CallOptions options) { return CallInvoker.AsyncUnaryCall(__Method_Stop, null, options, request); } /// Creates a new instance of client from given ClientBaseConfiguration. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] protected override ReconnectServiceClient NewInstance(ClientBaseConfiguration configuration) { return new ReconnectServiceClient(configuration); @@ -890,6 +987,7 @@ namespace Grpc.Testing { /// Creates service definition that can be registered with a server /// An object implementing the server-side handling logic. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public static grpc::ServerServiceDefinition BindService(ReconnectServiceBase serviceImpl) { return grpc::ServerServiceDefinition.CreateBuilder() @@ -901,6 +999,7 @@ namespace Grpc.Testing { /// Note: this method is part of an experimental API that can change or be removed without any prior notice. /// Service methods will be bound by calling AddMethod on this object. /// An object implementing the server-side handling logic. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public static void BindService(grpc::ServiceBinderBase serviceBinder, ReconnectServiceBase serviceImpl) { serviceBinder.AddMethod(__Method_Start, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.Start)); @@ -915,6 +1014,7 @@ namespace Grpc.Testing { { static readonly string __ServiceName = "grpc.testing.LoadBalancerStatsService"; + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static void __Helper_SerializeMessage(global::Google.Protobuf.IMessage message, grpc::SerializationContext context) { #if !GRPC_DISABLE_PROTOBUF_BUFFER_SERIALIZATION @@ -929,11 +1029,13 @@ namespace Grpc.Testing { context.Complete(global::Google.Protobuf.MessageExtensions.ToByteArray(message)); } + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static class __Helper_MessageCache { public static readonly bool IsBufferMessage = global::System.Reflection.IntrospectionExtensions.GetTypeInfo(typeof(global::Google.Protobuf.IBufferMessage)).IsAssignableFrom(typeof(T)); } + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static T __Helper_DeserializeMessage(grpc::DeserializationContext context, global::Google.Protobuf.MessageParser parser) where T : global::Google.Protobuf.IMessage { #if !GRPC_DISABLE_PROTOBUF_BUFFER_SERIALIZATION @@ -945,11 +1047,16 @@ namespace Grpc.Testing { return parser.ParseFrom(context.PayloadAsNewBuffer()); } + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static readonly grpc::Marshaller __Marshaller_grpc_testing_LoadBalancerStatsRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Grpc.Testing.LoadBalancerStatsRequest.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static readonly grpc::Marshaller __Marshaller_grpc_testing_LoadBalancerStatsResponse = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Grpc.Testing.LoadBalancerStatsResponse.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static readonly grpc::Marshaller __Marshaller_grpc_testing_LoadBalancerAccumulatedStatsRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Grpc.Testing.LoadBalancerAccumulatedStatsRequest.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static readonly grpc::Marshaller __Marshaller_grpc_testing_LoadBalancerAccumulatedStatsResponse = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Grpc.Testing.LoadBalancerAccumulatedStatsResponse.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static readonly grpc::Method __Method_GetClientStats = new grpc::Method( grpc::MethodType.Unary, __ServiceName, @@ -957,6 +1064,7 @@ namespace Grpc.Testing { __Marshaller_grpc_testing_LoadBalancerStatsRequest, __Marshaller_grpc_testing_LoadBalancerStatsResponse); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static readonly grpc::Method __Method_GetClientAccumulatedStats = new grpc::Method( grpc::MethodType.Unary, __ServiceName, @@ -980,6 +1088,7 @@ namespace Grpc.Testing { /// The request received from the client. /// The context of the server-side call handler being invoked. /// The response to send back to the client (wrapped by a task). + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual global::System.Threading.Tasks.Task GetClientStats(global::Grpc.Testing.LoadBalancerStatsRequest request, grpc::ServerCallContext context) { throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); @@ -991,6 +1100,7 @@ namespace Grpc.Testing { /// The request received from the client. /// The context of the server-side call handler being invoked. /// The response to send back to the client (wrapped by a task). + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual global::System.Threading.Tasks.Task GetClientAccumulatedStats(global::Grpc.Testing.LoadBalancerAccumulatedStatsRequest request, grpc::ServerCallContext context) { throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); @@ -1003,20 +1113,24 @@ namespace Grpc.Testing { { /// Creates a new client for LoadBalancerStatsService /// The channel to use to make remote calls. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public LoadBalancerStatsServiceClient(grpc::ChannelBase channel) : base(channel) { } /// Creates a new client for LoadBalancerStatsService that uses a custom CallInvoker. /// The callInvoker to use to make remote calls. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public LoadBalancerStatsServiceClient(grpc::CallInvoker callInvoker) : base(callInvoker) { } /// Protected parameterless constructor to allow creation of test doubles. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] protected LoadBalancerStatsServiceClient() : base() { } /// Protected constructor to allow creation of configured clients. /// The client configuration. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] protected LoadBalancerStatsServiceClient(ClientBaseConfiguration configuration) : base(configuration) { } @@ -1029,6 +1143,7 @@ namespace Grpc.Testing { /// An optional deadline for the call. The call will be cancelled if deadline is hit. /// An optional token for canceling the call. /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual global::Grpc.Testing.LoadBalancerStatsResponse GetClientStats(global::Grpc.Testing.LoadBalancerStatsRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { return GetClientStats(request, new grpc::CallOptions(headers, deadline, cancellationToken)); @@ -1039,6 +1154,7 @@ namespace Grpc.Testing { /// The request to send to the server. /// The options for the call. /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual global::Grpc.Testing.LoadBalancerStatsResponse GetClientStats(global::Grpc.Testing.LoadBalancerStatsRequest request, grpc::CallOptions options) { return CallInvoker.BlockingUnaryCall(__Method_GetClientStats, null, options, request); @@ -1051,6 +1167,7 @@ namespace Grpc.Testing { /// An optional deadline for the call. The call will be cancelled if deadline is hit. /// An optional token for canceling the call. /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual grpc::AsyncUnaryCall GetClientStatsAsync(global::Grpc.Testing.LoadBalancerStatsRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { return GetClientStatsAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); @@ -1061,6 +1178,7 @@ namespace Grpc.Testing { /// The request to send to the server. /// The options for the call. /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual grpc::AsyncUnaryCall GetClientStatsAsync(global::Grpc.Testing.LoadBalancerStatsRequest request, grpc::CallOptions options) { return CallInvoker.AsyncUnaryCall(__Method_GetClientStats, null, options, request); @@ -1073,6 +1191,7 @@ namespace Grpc.Testing { /// An optional deadline for the call. The call will be cancelled if deadline is hit. /// An optional token for canceling the call. /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual global::Grpc.Testing.LoadBalancerAccumulatedStatsResponse GetClientAccumulatedStats(global::Grpc.Testing.LoadBalancerAccumulatedStatsRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { return GetClientAccumulatedStats(request, new grpc::CallOptions(headers, deadline, cancellationToken)); @@ -1083,6 +1202,7 @@ namespace Grpc.Testing { /// The request to send to the server. /// The options for the call. /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual global::Grpc.Testing.LoadBalancerAccumulatedStatsResponse GetClientAccumulatedStats(global::Grpc.Testing.LoadBalancerAccumulatedStatsRequest request, grpc::CallOptions options) { return CallInvoker.BlockingUnaryCall(__Method_GetClientAccumulatedStats, null, options, request); @@ -1095,6 +1215,7 @@ namespace Grpc.Testing { /// An optional deadline for the call. The call will be cancelled if deadline is hit. /// An optional token for canceling the call. /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual grpc::AsyncUnaryCall GetClientAccumulatedStatsAsync(global::Grpc.Testing.LoadBalancerAccumulatedStatsRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { return GetClientAccumulatedStatsAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); @@ -1105,11 +1226,13 @@ namespace Grpc.Testing { /// The request to send to the server. /// The options for the call. /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual grpc::AsyncUnaryCall GetClientAccumulatedStatsAsync(global::Grpc.Testing.LoadBalancerAccumulatedStatsRequest request, grpc::CallOptions options) { return CallInvoker.AsyncUnaryCall(__Method_GetClientAccumulatedStats, null, options, request); } /// Creates a new instance of client from given ClientBaseConfiguration. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] protected override LoadBalancerStatsServiceClient NewInstance(ClientBaseConfiguration configuration) { return new LoadBalancerStatsServiceClient(configuration); @@ -1118,6 +1241,7 @@ namespace Grpc.Testing { /// Creates service definition that can be registered with a server /// An object implementing the server-side handling logic. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public static grpc::ServerServiceDefinition BindService(LoadBalancerStatsServiceBase serviceImpl) { return grpc::ServerServiceDefinition.CreateBuilder() @@ -1129,6 +1253,7 @@ namespace Grpc.Testing { /// Note: this method is part of an experimental API that can change or be removed without any prior notice. /// Service methods will be bound by calling AddMethod on this object. /// An object implementing the server-side handling logic. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public static void BindService(grpc::ServiceBinderBase serviceBinder, LoadBalancerStatsServiceBase serviceImpl) { serviceBinder.AddMethod(__Method_GetClientStats, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.GetClientStats)); @@ -1143,6 +1268,7 @@ namespace Grpc.Testing { { static readonly string __ServiceName = "grpc.testing.XdsUpdateHealthService"; + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static void __Helper_SerializeMessage(global::Google.Protobuf.IMessage message, grpc::SerializationContext context) { #if !GRPC_DISABLE_PROTOBUF_BUFFER_SERIALIZATION @@ -1157,11 +1283,13 @@ namespace Grpc.Testing { context.Complete(global::Google.Protobuf.MessageExtensions.ToByteArray(message)); } + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static class __Helper_MessageCache { public static readonly bool IsBufferMessage = global::System.Reflection.IntrospectionExtensions.GetTypeInfo(typeof(global::Google.Protobuf.IBufferMessage)).IsAssignableFrom(typeof(T)); } + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static T __Helper_DeserializeMessage(grpc::DeserializationContext context, global::Google.Protobuf.MessageParser parser) where T : global::Google.Protobuf.IMessage { #if !GRPC_DISABLE_PROTOBUF_BUFFER_SERIALIZATION @@ -1173,8 +1301,10 @@ namespace Grpc.Testing { return parser.ParseFrom(context.PayloadAsNewBuffer()); } + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static readonly grpc::Marshaller __Marshaller_grpc_testing_Empty = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Grpc.Testing.Empty.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static readonly grpc::Method __Method_SetServing = new grpc::Method( grpc::MethodType.Unary, __ServiceName, @@ -1182,6 +1312,7 @@ namespace Grpc.Testing { __Marshaller_grpc_testing_Empty, __Marshaller_grpc_testing_Empty); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static readonly grpc::Method __Method_SetNotServing = new grpc::Method( grpc::MethodType.Unary, __ServiceName, @@ -1199,11 +1330,13 @@ namespace Grpc.Testing { [grpc::BindServiceMethod(typeof(XdsUpdateHealthService), "BindService")] public abstract partial class XdsUpdateHealthServiceBase { + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual global::System.Threading.Tasks.Task SetServing(global::Grpc.Testing.Empty request, grpc::ServerCallContext context) { throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); } + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual global::System.Threading.Tasks.Task SetNotServing(global::Grpc.Testing.Empty request, grpc::ServerCallContext context) { throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); @@ -1216,57 +1349,70 @@ namespace Grpc.Testing { { /// Creates a new client for XdsUpdateHealthService /// The channel to use to make remote calls. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public XdsUpdateHealthServiceClient(grpc::ChannelBase channel) : base(channel) { } /// Creates a new client for XdsUpdateHealthService that uses a custom CallInvoker. /// The callInvoker to use to make remote calls. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public XdsUpdateHealthServiceClient(grpc::CallInvoker callInvoker) : base(callInvoker) { } /// Protected parameterless constructor to allow creation of test doubles. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] protected XdsUpdateHealthServiceClient() : base() { } /// Protected constructor to allow creation of configured clients. /// The client configuration. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] protected XdsUpdateHealthServiceClient(ClientBaseConfiguration configuration) : base(configuration) { } + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual global::Grpc.Testing.Empty SetServing(global::Grpc.Testing.Empty request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { return SetServing(request, new grpc::CallOptions(headers, deadline, cancellationToken)); } + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual global::Grpc.Testing.Empty SetServing(global::Grpc.Testing.Empty request, grpc::CallOptions options) { return CallInvoker.BlockingUnaryCall(__Method_SetServing, null, options, request); } + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual grpc::AsyncUnaryCall SetServingAsync(global::Grpc.Testing.Empty request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { return SetServingAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); } + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual grpc::AsyncUnaryCall SetServingAsync(global::Grpc.Testing.Empty request, grpc::CallOptions options) { return CallInvoker.AsyncUnaryCall(__Method_SetServing, null, options, request); } + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual global::Grpc.Testing.Empty SetNotServing(global::Grpc.Testing.Empty request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { return SetNotServing(request, new grpc::CallOptions(headers, deadline, cancellationToken)); } + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual global::Grpc.Testing.Empty SetNotServing(global::Grpc.Testing.Empty request, grpc::CallOptions options) { return CallInvoker.BlockingUnaryCall(__Method_SetNotServing, null, options, request); } + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual grpc::AsyncUnaryCall SetNotServingAsync(global::Grpc.Testing.Empty request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { return SetNotServingAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); } + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual grpc::AsyncUnaryCall SetNotServingAsync(global::Grpc.Testing.Empty request, grpc::CallOptions options) { return CallInvoker.AsyncUnaryCall(__Method_SetNotServing, null, options, request); } /// Creates a new instance of client from given ClientBaseConfiguration. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] protected override XdsUpdateHealthServiceClient NewInstance(ClientBaseConfiguration configuration) { return new XdsUpdateHealthServiceClient(configuration); @@ -1275,6 +1421,7 @@ namespace Grpc.Testing { /// Creates service definition that can be registered with a server /// An object implementing the server-side handling logic. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public static grpc::ServerServiceDefinition BindService(XdsUpdateHealthServiceBase serviceImpl) { return grpc::ServerServiceDefinition.CreateBuilder() @@ -1286,6 +1433,7 @@ namespace Grpc.Testing { /// Note: this method is part of an experimental API that can change or be removed without any prior notice. /// Service methods will be bound by calling AddMethod on this object. /// An object implementing the server-side handling logic. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public static void BindService(grpc::ServiceBinderBase serviceBinder, XdsUpdateHealthServiceBase serviceImpl) { serviceBinder.AddMethod(__Method_SetServing, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.SetServing)); @@ -1300,6 +1448,7 @@ namespace Grpc.Testing { { static readonly string __ServiceName = "grpc.testing.XdsUpdateClientConfigureService"; + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static void __Helper_SerializeMessage(global::Google.Protobuf.IMessage message, grpc::SerializationContext context) { #if !GRPC_DISABLE_PROTOBUF_BUFFER_SERIALIZATION @@ -1314,11 +1463,13 @@ namespace Grpc.Testing { context.Complete(global::Google.Protobuf.MessageExtensions.ToByteArray(message)); } + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static class __Helper_MessageCache { public static readonly bool IsBufferMessage = global::System.Reflection.IntrospectionExtensions.GetTypeInfo(typeof(global::Google.Protobuf.IBufferMessage)).IsAssignableFrom(typeof(T)); } + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static T __Helper_DeserializeMessage(grpc::DeserializationContext context, global::Google.Protobuf.MessageParser parser) where T : global::Google.Protobuf.IMessage { #if !GRPC_DISABLE_PROTOBUF_BUFFER_SERIALIZATION @@ -1330,9 +1481,12 @@ namespace Grpc.Testing { return parser.ParseFrom(context.PayloadAsNewBuffer()); } + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static readonly grpc::Marshaller __Marshaller_grpc_testing_ClientConfigureRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Grpc.Testing.ClientConfigureRequest.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static readonly grpc::Marshaller __Marshaller_grpc_testing_ClientConfigureResponse = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Grpc.Testing.ClientConfigureResponse.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static readonly grpc::Method __Method_Configure = new grpc::Method( grpc::MethodType.Unary, __ServiceName, @@ -1356,6 +1510,7 @@ namespace Grpc.Testing { /// The request received from the client. /// The context of the server-side call handler being invoked. /// The response to send back to the client (wrapped by a task). + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual global::System.Threading.Tasks.Task Configure(global::Grpc.Testing.ClientConfigureRequest request, grpc::ServerCallContext context) { throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); @@ -1368,20 +1523,24 @@ namespace Grpc.Testing { { /// Creates a new client for XdsUpdateClientConfigureService /// The channel to use to make remote calls. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public XdsUpdateClientConfigureServiceClient(grpc::ChannelBase channel) : base(channel) { } /// Creates a new client for XdsUpdateClientConfigureService that uses a custom CallInvoker. /// The callInvoker to use to make remote calls. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public XdsUpdateClientConfigureServiceClient(grpc::CallInvoker callInvoker) : base(callInvoker) { } /// Protected parameterless constructor to allow creation of test doubles. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] protected XdsUpdateClientConfigureServiceClient() : base() { } /// Protected constructor to allow creation of configured clients. /// The client configuration. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] protected XdsUpdateClientConfigureServiceClient(ClientBaseConfiguration configuration) : base(configuration) { } @@ -1394,6 +1553,7 @@ namespace Grpc.Testing { /// An optional deadline for the call. The call will be cancelled if deadline is hit. /// An optional token for canceling the call. /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual global::Grpc.Testing.ClientConfigureResponse Configure(global::Grpc.Testing.ClientConfigureRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { return Configure(request, new grpc::CallOptions(headers, deadline, cancellationToken)); @@ -1404,6 +1564,7 @@ namespace Grpc.Testing { /// The request to send to the server. /// The options for the call. /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual global::Grpc.Testing.ClientConfigureResponse Configure(global::Grpc.Testing.ClientConfigureRequest request, grpc::CallOptions options) { return CallInvoker.BlockingUnaryCall(__Method_Configure, null, options, request); @@ -1416,6 +1577,7 @@ namespace Grpc.Testing { /// An optional deadline for the call. The call will be cancelled if deadline is hit. /// An optional token for canceling the call. /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual grpc::AsyncUnaryCall ConfigureAsync(global::Grpc.Testing.ClientConfigureRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { return ConfigureAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); @@ -1426,11 +1588,13 @@ namespace Grpc.Testing { /// The request to send to the server. /// The options for the call. /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual grpc::AsyncUnaryCall ConfigureAsync(global::Grpc.Testing.ClientConfigureRequest request, grpc::CallOptions options) { return CallInvoker.AsyncUnaryCall(__Method_Configure, null, options, request); } /// Creates a new instance of client from given ClientBaseConfiguration. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] protected override XdsUpdateClientConfigureServiceClient NewInstance(ClientBaseConfiguration configuration) { return new XdsUpdateClientConfigureServiceClient(configuration); @@ -1439,6 +1603,7 @@ namespace Grpc.Testing { /// Creates service definition that can be registered with a server /// An object implementing the server-side handling logic. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public static grpc::ServerServiceDefinition BindService(XdsUpdateClientConfigureServiceBase serviceImpl) { return grpc::ServerServiceDefinition.CreateBuilder() @@ -1449,6 +1614,7 @@ namespace Grpc.Testing { /// Note: this method is part of an experimental API that can change or be removed without any prior notice. /// Service methods will be bound by calling AddMethod on this object. /// An object implementing the server-side handling logic. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public static void BindService(grpc::ServiceBinderBase serviceBinder, XdsUpdateClientConfigureServiceBase serviceImpl) { serviceBinder.AddMethod(__Method_Configure, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.Configure)); diff --git a/src/csharp/Grpc.IntegrationTesting/WorkerServiceGrpc.cs b/src/csharp/Grpc.IntegrationTesting/WorkerServiceGrpc.cs index 31bab7ca424..90047939366 100644 --- a/src/csharp/Grpc.IntegrationTesting/WorkerServiceGrpc.cs +++ b/src/csharp/Grpc.IntegrationTesting/WorkerServiceGrpc.cs @@ -29,6 +29,7 @@ namespace Grpc.Testing { { static readonly string __ServiceName = "grpc.testing.WorkerService"; + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static void __Helper_SerializeMessage(global::Google.Protobuf.IMessage message, grpc::SerializationContext context) { #if !GRPC_DISABLE_PROTOBUF_BUFFER_SERIALIZATION @@ -43,11 +44,13 @@ namespace Grpc.Testing { context.Complete(global::Google.Protobuf.MessageExtensions.ToByteArray(message)); } + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static class __Helper_MessageCache { public static readonly bool IsBufferMessage = global::System.Reflection.IntrospectionExtensions.GetTypeInfo(typeof(global::Google.Protobuf.IBufferMessage)).IsAssignableFrom(typeof(T)); } + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static T __Helper_DeserializeMessage(grpc::DeserializationContext context, global::Google.Protobuf.MessageParser parser) where T : global::Google.Protobuf.IMessage { #if !GRPC_DISABLE_PROTOBUF_BUFFER_SERIALIZATION @@ -59,14 +62,22 @@ namespace Grpc.Testing { return parser.ParseFrom(context.PayloadAsNewBuffer()); } + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static readonly grpc::Marshaller __Marshaller_grpc_testing_ServerArgs = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Grpc.Testing.ServerArgs.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static readonly grpc::Marshaller __Marshaller_grpc_testing_ServerStatus = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Grpc.Testing.ServerStatus.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static readonly grpc::Marshaller __Marshaller_grpc_testing_ClientArgs = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Grpc.Testing.ClientArgs.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static readonly grpc::Marshaller __Marshaller_grpc_testing_ClientStatus = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Grpc.Testing.ClientStatus.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static readonly grpc::Marshaller __Marshaller_grpc_testing_CoreRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Grpc.Testing.CoreRequest.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static readonly grpc::Marshaller __Marshaller_grpc_testing_CoreResponse = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Grpc.Testing.CoreResponse.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static readonly grpc::Marshaller __Marshaller_grpc_testing_Void = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Grpc.Testing.Void.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static readonly grpc::Method __Method_RunServer = new grpc::Method( grpc::MethodType.DuplexStreaming, __ServiceName, @@ -74,6 +85,7 @@ namespace Grpc.Testing { __Marshaller_grpc_testing_ServerArgs, __Marshaller_grpc_testing_ServerStatus); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static readonly grpc::Method __Method_RunClient = new grpc::Method( grpc::MethodType.DuplexStreaming, __ServiceName, @@ -81,6 +93,7 @@ namespace Grpc.Testing { __Marshaller_grpc_testing_ClientArgs, __Marshaller_grpc_testing_ClientStatus); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static readonly grpc::Method __Method_CoreCount = new grpc::Method( grpc::MethodType.Unary, __ServiceName, @@ -88,6 +101,7 @@ namespace Grpc.Testing { __Marshaller_grpc_testing_CoreRequest, __Marshaller_grpc_testing_CoreResponse); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static readonly grpc::Method __Method_QuitWorker = new grpc::Method( grpc::MethodType.Unary, __ServiceName, @@ -117,6 +131,7 @@ namespace Grpc.Testing { /// Used for sending responses back to the client. /// The context of the server-side call handler being invoked. /// A task indicating completion of the handler. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual global::System.Threading.Tasks.Task RunServer(grpc::IAsyncStreamReader requestStream, grpc::IServerStreamWriter responseStream, grpc::ServerCallContext context) { throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); @@ -134,6 +149,7 @@ namespace Grpc.Testing { /// Used for sending responses back to the client. /// The context of the server-side call handler being invoked. /// A task indicating completion of the handler. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual global::System.Threading.Tasks.Task RunClient(grpc::IAsyncStreamReader requestStream, grpc::IServerStreamWriter responseStream, grpc::ServerCallContext context) { throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); @@ -145,6 +161,7 @@ namespace Grpc.Testing { /// The request received from the client. /// The context of the server-side call handler being invoked. /// The response to send back to the client (wrapped by a task). + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual global::System.Threading.Tasks.Task CoreCount(global::Grpc.Testing.CoreRequest request, grpc::ServerCallContext context) { throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); @@ -156,6 +173,7 @@ namespace Grpc.Testing { /// The request received from the client. /// The context of the server-side call handler being invoked. /// The response to send back to the client (wrapped by a task). + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual global::System.Threading.Tasks.Task QuitWorker(global::Grpc.Testing.Void request, grpc::ServerCallContext context) { throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); @@ -168,20 +186,24 @@ namespace Grpc.Testing { { /// Creates a new client for WorkerService /// The channel to use to make remote calls. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public WorkerServiceClient(grpc::ChannelBase channel) : base(channel) { } /// Creates a new client for WorkerService that uses a custom CallInvoker. /// The callInvoker to use to make remote calls. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public WorkerServiceClient(grpc::CallInvoker callInvoker) : base(callInvoker) { } /// Protected parameterless constructor to allow creation of test doubles. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] protected WorkerServiceClient() : base() { } /// Protected constructor to allow creation of configured clients. /// The client configuration. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] protected WorkerServiceClient(ClientBaseConfiguration configuration) : base(configuration) { } @@ -198,6 +220,7 @@ namespace Grpc.Testing { /// An optional deadline for the call. The call will be cancelled if deadline is hit. /// An optional token for canceling the call. /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual grpc::AsyncDuplexStreamingCall RunServer(grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { return RunServer(new grpc::CallOptions(headers, deadline, cancellationToken)); @@ -212,6 +235,7 @@ namespace Grpc.Testing { /// /// The options for the call. /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual grpc::AsyncDuplexStreamingCall RunServer(grpc::CallOptions options) { return CallInvoker.AsyncDuplexStreamingCall(__Method_RunServer, null, options); @@ -228,6 +252,7 @@ namespace Grpc.Testing { /// An optional deadline for the call. The call will be cancelled if deadline is hit. /// An optional token for canceling the call. /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual grpc::AsyncDuplexStreamingCall RunClient(grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { return RunClient(new grpc::CallOptions(headers, deadline, cancellationToken)); @@ -242,6 +267,7 @@ namespace Grpc.Testing { /// /// The options for the call. /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual grpc::AsyncDuplexStreamingCall RunClient(grpc::CallOptions options) { return CallInvoker.AsyncDuplexStreamingCall(__Method_RunClient, null, options); @@ -254,6 +280,7 @@ namespace Grpc.Testing { /// An optional deadline for the call. The call will be cancelled if deadline is hit. /// An optional token for canceling the call. /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual global::Grpc.Testing.CoreResponse CoreCount(global::Grpc.Testing.CoreRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { return CoreCount(request, new grpc::CallOptions(headers, deadline, cancellationToken)); @@ -264,6 +291,7 @@ namespace Grpc.Testing { /// The request to send to the server. /// The options for the call. /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual global::Grpc.Testing.CoreResponse CoreCount(global::Grpc.Testing.CoreRequest request, grpc::CallOptions options) { return CallInvoker.BlockingUnaryCall(__Method_CoreCount, null, options, request); @@ -276,6 +304,7 @@ namespace Grpc.Testing { /// An optional deadline for the call. The call will be cancelled if deadline is hit. /// An optional token for canceling the call. /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual grpc::AsyncUnaryCall CoreCountAsync(global::Grpc.Testing.CoreRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { return CoreCountAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); @@ -286,6 +315,7 @@ namespace Grpc.Testing { /// The request to send to the server. /// The options for the call. /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual grpc::AsyncUnaryCall CoreCountAsync(global::Grpc.Testing.CoreRequest request, grpc::CallOptions options) { return CallInvoker.AsyncUnaryCall(__Method_CoreCount, null, options, request); @@ -298,6 +328,7 @@ namespace Grpc.Testing { /// An optional deadline for the call. The call will be cancelled if deadline is hit. /// An optional token for canceling the call. /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual global::Grpc.Testing.Void QuitWorker(global::Grpc.Testing.Void request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { return QuitWorker(request, new grpc::CallOptions(headers, deadline, cancellationToken)); @@ -308,6 +339,7 @@ namespace Grpc.Testing { /// The request to send to the server. /// The options for the call. /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual global::Grpc.Testing.Void QuitWorker(global::Grpc.Testing.Void request, grpc::CallOptions options) { return CallInvoker.BlockingUnaryCall(__Method_QuitWorker, null, options, request); @@ -320,6 +352,7 @@ namespace Grpc.Testing { /// An optional deadline for the call. The call will be cancelled if deadline is hit. /// An optional token for canceling the call. /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual grpc::AsyncUnaryCall QuitWorkerAsync(global::Grpc.Testing.Void request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { return QuitWorkerAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); @@ -330,11 +363,13 @@ namespace Grpc.Testing { /// The request to send to the server. /// The options for the call. /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual grpc::AsyncUnaryCall QuitWorkerAsync(global::Grpc.Testing.Void request, grpc::CallOptions options) { return CallInvoker.AsyncUnaryCall(__Method_QuitWorker, null, options, request); } /// Creates a new instance of client from given ClientBaseConfiguration. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] protected override WorkerServiceClient NewInstance(ClientBaseConfiguration configuration) { return new WorkerServiceClient(configuration); @@ -343,6 +378,7 @@ namespace Grpc.Testing { /// Creates service definition that can be registered with a server /// An object implementing the server-side handling logic. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public static grpc::ServerServiceDefinition BindService(WorkerServiceBase serviceImpl) { return grpc::ServerServiceDefinition.CreateBuilder() @@ -356,6 +392,7 @@ namespace Grpc.Testing { /// Note: this method is part of an experimental API that can change or be removed without any prior notice. /// Service methods will be bound by calling AddMethod on this object. /// An object implementing the server-side handling logic. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public static void BindService(grpc::ServiceBinderBase serviceBinder, WorkerServiceBase serviceImpl) { serviceBinder.AddMethod(__Method_RunServer, serviceImpl == null ? null : new grpc::DuplexStreamingServerMethod(serviceImpl.RunServer)); diff --git a/src/csharp/Grpc.Reflection/ReflectionGrpc.cs b/src/csharp/Grpc.Reflection/ReflectionGrpc.cs index d5822be354c..2dd819eed5e 100644 --- a/src/csharp/Grpc.Reflection/ReflectionGrpc.cs +++ b/src/csharp/Grpc.Reflection/ReflectionGrpc.cs @@ -29,6 +29,7 @@ namespace Grpc.Reflection.V1Alpha { { static readonly string __ServiceName = "grpc.reflection.v1alpha.ServerReflection"; + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static void __Helper_SerializeMessage(global::Google.Protobuf.IMessage message, grpc::SerializationContext context) { #if !GRPC_DISABLE_PROTOBUF_BUFFER_SERIALIZATION @@ -43,11 +44,13 @@ namespace Grpc.Reflection.V1Alpha { context.Complete(global::Google.Protobuf.MessageExtensions.ToByteArray(message)); } + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static class __Helper_MessageCache { public static readonly bool IsBufferMessage = global::System.Reflection.IntrospectionExtensions.GetTypeInfo(typeof(global::Google.Protobuf.IBufferMessage)).IsAssignableFrom(typeof(T)); } + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static T __Helper_DeserializeMessage(grpc::DeserializationContext context, global::Google.Protobuf.MessageParser parser) where T : global::Google.Protobuf.IMessage { #if !GRPC_DISABLE_PROTOBUF_BUFFER_SERIALIZATION @@ -59,9 +62,12 @@ namespace Grpc.Reflection.V1Alpha { return parser.ParseFrom(context.PayloadAsNewBuffer()); } + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static readonly grpc::Marshaller __Marshaller_grpc_reflection_v1alpha_ServerReflectionRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Grpc.Reflection.V1Alpha.ServerReflectionRequest.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static readonly grpc::Marshaller __Marshaller_grpc_reflection_v1alpha_ServerReflectionResponse = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Grpc.Reflection.V1Alpha.ServerReflectionResponse.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] static readonly grpc::Method __Method_ServerReflectionInfo = new grpc::Method( grpc::MethodType.DuplexStreaming, __ServiceName, @@ -87,6 +93,7 @@ namespace Grpc.Reflection.V1Alpha { /// Used for sending responses back to the client. /// The context of the server-side call handler being invoked. /// A task indicating completion of the handler. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual global::System.Threading.Tasks.Task ServerReflectionInfo(grpc::IAsyncStreamReader requestStream, grpc::IServerStreamWriter responseStream, grpc::ServerCallContext context) { throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); @@ -99,20 +106,24 @@ namespace Grpc.Reflection.V1Alpha { { /// Creates a new client for ServerReflection /// The channel to use to make remote calls. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public ServerReflectionClient(grpc::ChannelBase channel) : base(channel) { } /// Creates a new client for ServerReflection that uses a custom CallInvoker. /// The callInvoker to use to make remote calls. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public ServerReflectionClient(grpc::CallInvoker callInvoker) : base(callInvoker) { } /// Protected parameterless constructor to allow creation of test doubles. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] protected ServerReflectionClient() : base() { } /// Protected constructor to allow creation of configured clients. /// The client configuration. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] protected ServerReflectionClient(ClientBaseConfiguration configuration) : base(configuration) { } @@ -125,6 +136,7 @@ namespace Grpc.Reflection.V1Alpha { /// An optional deadline for the call. The call will be cancelled if deadline is hit. /// An optional token for canceling the call. /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual grpc::AsyncDuplexStreamingCall ServerReflectionInfo(grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { return ServerReflectionInfo(new grpc::CallOptions(headers, deadline, cancellationToken)); @@ -135,11 +147,13 @@ namespace Grpc.Reflection.V1Alpha { /// /// The options for the call. /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual grpc::AsyncDuplexStreamingCall ServerReflectionInfo(grpc::CallOptions options) { return CallInvoker.AsyncDuplexStreamingCall(__Method_ServerReflectionInfo, null, options); } /// Creates a new instance of client from given ClientBaseConfiguration. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] protected override ServerReflectionClient NewInstance(ClientBaseConfiguration configuration) { return new ServerReflectionClient(configuration); @@ -148,6 +162,7 @@ namespace Grpc.Reflection.V1Alpha { /// Creates service definition that can be registered with a server /// An object implementing the server-side handling logic. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public static grpc::ServerServiceDefinition BindService(ServerReflectionBase serviceImpl) { return grpc::ServerServiceDefinition.CreateBuilder() @@ -158,6 +173,7 @@ namespace Grpc.Reflection.V1Alpha { /// Note: this method is part of an experimental API that can change or be removed without any prior notice. /// Service methods will be bound by calling AddMethod on this object. /// An object implementing the server-side handling logic. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public static void BindService(grpc::ServiceBinderBase serviceBinder, ServerReflectionBase serviceImpl) { serviceBinder.AddMethod(__Method_ServerReflectionInfo, serviceImpl == null ? null : new grpc::DuplexStreamingServerMethod(serviceImpl.ServerReflectionInfo));