/// <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(AccountTaskBase serviceImpl) { return(grpc::ServerServiceDefinition.CreateBuilder() .AddMethod(__Method_Account, serviceImpl.Account) .AddMethod(__Method_AccountUnlock, serviceImpl.AccountUnlock) .AddMethod(__Method_CreateAccount, serviceImpl.CreateAccount).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, AccountTaskBase serviceImpl) { serviceBinder.AddMethod(__Method_Account, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Pb.AccountRequest, global::Pb.AccountResponse>(serviceImpl.Account)); serviceBinder.AddMethod(__Method_AccountUnlock, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Pb.AccountUnlockRequest, global::Pb.AccountUnlockResponse>(serviceImpl.AccountUnlock)); serviceBinder.AddMethod(__Method_CreateAccount, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Pb.CreateAccountRequest, global::Pb.CreateAccountResponse>(serviceImpl.CreateAccount)); }