示例#1
0
 /// <summary>Creates service definition that can be registered with a server</summary>
 /// <param name="serviceImpl">An object implementing the server-side handling logic.</param>
 public static grpc::ServerServiceDefinition BindService(HelloServiceBase serviceImpl)
 {
     return(grpc::ServerServiceDefinition.CreateBuilder()
            .AddMethod(__Method_SayHello, serviceImpl.SayHello)
            .AddMethod(__Method_SayHelloWithDetails, serviceImpl.SayHelloWithDetails)
            .AddMethod(__Method_SayHelloList, serviceImpl.SayHelloList)
            .AddMethod(__Method_SayHelloListStream, serviceImpl.SayHelloListStream).Build());
 }
示例#2
0
 /// <summary>Creates service definition that can be registered with a server</summary>
 /// <param name="serviceImpl">An object implementing the server-side handling logic.</param>
 public static grpc::ServerServiceDefinition BindService(HelloServiceBase serviceImpl)
 {
     return(grpc::ServerServiceDefinition.CreateBuilder()
            .AddMethod(__Method_CallNameVoid, serviceImpl.CallNameVoid)
            .AddMethod(__Method_CallName, serviceImpl.CallName)
            .AddMethod(__Method_CallVoid, serviceImpl.CallVoid)
            .AddMethod(__Method_Hello, serviceImpl.Hello)
            .AddMethod(__Method_SayHello, serviceImpl.SayHello)
            .AddMethod(__Method_ShowHello, serviceImpl.ShowHello).Build());
 }
 /// <summary>Creates service definition that can be registered with a server</summary>
 /// <param name="serviceImpl">An object implementing the server-side handling logic.</param>
 public static grpc::ServerServiceDefinition BindService(HelloServiceBase serviceImpl)
 {
     return(grpc::ServerServiceDefinition.CreateBuilder()
            .AddMethod(__Method_SayHello, serviceImpl.SayHello).Build());
 }
 /// <summary>Register service method with a service binder with or without implementation. Useful when customizing the  service binding logic.
 /// Note: this method is part of an experimental API that can change or be removed without any prior notice.</summary>
 /// <param name="serviceBinder">Service methods will be bound by calling <c>AddMethod</c> on this object.</param>
 /// <param name="serviceImpl">An object implementing the server-side handling logic.</param>
 public static void BindService(grpc::ServiceBinderBase serviceBinder, HelloServiceBase serviceImpl)
 {
     serviceBinder.AddMethod(__Method_SayHello, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Proto.Messages.HelloMessage, global::Proto.Messages.HelloMessage>(serviceImpl.SayHello));
 }
示例#5
0
 /// <summary>Register service method with a service binder with or without implementation. Useful when customizing the  service binding logic.
 /// Note: this method is part of an experimental API that can change or be removed without any prior notice.</summary>
 /// <param name="serviceBinder">Service methods will be bound by calling <c>AddMethod</c> on this object.</param>
 /// <param name="serviceImpl">An object implementing the server-side handling logic.</param>
 public static void BindService(grpc::ServiceBinderBase serviceBinder, HelloServiceBase serviceImpl)
 {
     serviceBinder.AddMethod(__Method_GetSum, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::GrpcLibrary.GetMsgNumRequest, global::GrpcLibrary.GetMsgSumReply>(serviceImpl.GetSum));
     serviceBinder.AddMethod(__Method_test, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::GrpcLibrary.GetLotID, global::GrpcLibrary.GetLotAll>(serviceImpl.test));
 }
示例#6
0
 /// <summary>Creates service definition that can be registered with a server</summary>
 /// <param name="serviceImpl">An object implementing the server-side handling logic.</param>
 public static grpc::ServerServiceDefinition BindService(HelloServiceBase serviceImpl)
 {
     return(grpc::ServerServiceDefinition.CreateBuilder()
            .AddMethod(__Method_GetSum, serviceImpl.GetSum)
            .AddMethod(__Method_test, serviceImpl.test).Build());
 }
示例#7
0
 /// <summary>Register service method with a service binder with or without implementation. Useful when customizing the  service binding logic.
 /// Note: this method is part of an experimental API that can change or be removed without any prior notice.</summary>
 /// <param name="serviceBinder">Service methods will be bound by calling <c>AddMethod</c> on this object.</param>
 /// <param name="serviceImpl">An object implementing the server-side handling logic.</param>
 public static void BindService(grpc::ServiceBinderBase serviceBinder, HelloServiceBase serviceImpl)
 {
     serviceBinder.AddMethod(__Method_SayHello, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::EComm.Web.API.gRPC.HelloRequest, global::EComm.Web.API.gRPC.HelloResponse>(serviceImpl.SayHello));
 }
 /// <summary>Register service method with a service binder with or without implementation. Useful when customizing the  service binding logic.
 /// Note: this method is part of an experimental API that can change or be removed without any prior notice.</summary>
 /// <param name="serviceBinder">Service methods will be bound by calling <c>AddMethod</c> on this object.</param>
 /// <param name="serviceImpl">An object implementing the server-side handling logic.</param>
 public static void BindService(grpc::ServiceBinderBase serviceBinder, HelloServiceBase serviceImpl)
 {
     serviceBinder.AddMethod(__Method_SayHello, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::HelloRequest, global::HelloReply>(serviceImpl.SayHello));
 }