/// <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, GRPCServiceBase serviceImpl) { serviceBinder.AddMethod(__Method_Status, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::ModelAnalyzer.Client.StatusRequest, global::ModelAnalyzer.Client.StatusResponse>(serviceImpl.Status)); serviceBinder.AddMethod(__Method_Health, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::ModelAnalyzer.Client.HealthRequest, global::ModelAnalyzer.Client.HealthResponse>(serviceImpl.Health)); serviceBinder.AddMethod(__Method_Infer, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::ModelAnalyzer.Client.InferRequest, global::ModelAnalyzer.Client.InferResponse>(serviceImpl.Infer)); serviceBinder.AddMethod(__Method_StreamInfer, serviceImpl == null ? null : new grpc::DuplexStreamingServerMethod <global::ModelAnalyzer.Client.InferRequest, global::ModelAnalyzer.Client.InferResponse>(serviceImpl.StreamInfer)); serviceBinder.AddMethod(__Method_ModelControl, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::ModelAnalyzer.Client.ModelControlRequest, global::ModelAnalyzer.Client.ModelControlResponse>(serviceImpl.ModelControl)); serviceBinder.AddMethod(__Method_SharedMemoryControl, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::ModelAnalyzer.Client.SharedMemoryControlRequest, global::ModelAnalyzer.Client.SharedMemoryControlResponse>(serviceImpl.SharedMemoryControl)); serviceBinder.AddMethod(__Method_Repository, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::ModelAnalyzer.Client.RepositoryRequest, global::ModelAnalyzer.Client.RepositoryResponse>(serviceImpl.Repository)); }
/// <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(GRPCServiceBase serviceImpl) { return(grpc::ServerServiceDefinition.CreateBuilder() .AddMethod(__Method_Status, serviceImpl.Status) .AddMethod(__Method_Health, serviceImpl.Health) .AddMethod(__Method_Infer, serviceImpl.Infer) .AddMethod(__Method_StreamInfer, serviceImpl.StreamInfer) .AddMethod(__Method_ModelControl, serviceImpl.ModelControl) .AddMethod(__Method_SharedMemoryControl, serviceImpl.SharedMemoryControl) .AddMethod(__Method_Repository, serviceImpl.Repository).Build()); }