Пример #1
0
 public static void BindService(grpc::ServiceBinderBase serviceBinder, ForwardingSourceTestServiceBase serviceImpl)
 {
     serviceBinder.AddMethod(__Method_Method1, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Google.Api.Gax.Grpc.IntegrationTests.ForwardingSourceMethod1Request, global::Google.Api.Gax.Grpc.IntegrationTests.ForwardingSourceMethod1Response>(serviceImpl.Method1));
     serviceBinder.AddMethod(__Method_Method2, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Google.Api.Gax.Grpc.IntegrationTests.ForwardingSourceMethod2Request, global::Google.Api.Gax.Grpc.IntegrationTests.ForwardingSourceMethod2Response>(serviceImpl.Method2));
     serviceBinder.AddMethod(__Method_ServerStreamingMethod, serviceImpl == null ? null : new grpc::ServerStreamingServerMethod <global::Google.Api.Gax.Grpc.IntegrationTests.Irrelevant, global::Google.Api.Gax.Grpc.IntegrationTests.Irrelevant>(serviceImpl.ServerStreamingMethod));
     serviceBinder.AddMethod(__Method_ClientStreamingMethod, serviceImpl == null ? null : new grpc::ClientStreamingServerMethod <global::Google.Api.Gax.Grpc.IntegrationTests.Irrelevant, global::Google.Api.Gax.Grpc.IntegrationTests.Irrelevant>(serviceImpl.ClientStreamingMethod));
     serviceBinder.AddMethod(__Method_BidiStreamingMethod, serviceImpl == null ? null : new grpc::DuplexStreamingServerMethod <global::Google.Api.Gax.Grpc.IntegrationTests.Irrelevant, global::Google.Api.Gax.Grpc.IntegrationTests.Irrelevant>(serviceImpl.BidiStreamingMethod));
 }
Пример #2
0
 public static grpc::ServerServiceDefinition BindService(ForwardingSourceTestServiceBase serviceImpl)
 {
     return(grpc::ServerServiceDefinition.CreateBuilder()
            .AddMethod(__Method_Method1, serviceImpl.Method1)
            .AddMethod(__Method_Method2, serviceImpl.Method2)
            .AddMethod(__Method_ServerStreamingMethod, serviceImpl.ServerStreamingMethod)
            .AddMethod(__Method_ClientStreamingMethod, serviceImpl.ClientStreamingMethod)
            .AddMethod(__Method_BidiStreamingMethod, serviceImpl.BidiStreamingMethod).Build());
 }