/// <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, NetshopBase serviceImpl) { serviceBinder.AddMethod(__Method_GetParts, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::SDV701BackEnd.Protos.GetAllRequest, global::SDV701BackEnd.Protos.GetHierarchicalJsonSerializedResponse>(serviceImpl.GetParts)); serviceBinder.AddMethod(__Method_GetPartsByCategoryId, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::SDV701BackEnd.Protos.GetByIdRequest, global::SDV701BackEnd.Protos.GetJsonSerializedResponse>(serviceImpl.GetPartsByCategoryId)); serviceBinder.AddMethod(__Method_GetPartById, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::SDV701BackEnd.Protos.GetByIdRequest, global::SDV701BackEnd.Protos.GetJsonSerializedResponse>(serviceImpl.GetPartById)); serviceBinder.AddMethod(__Method_GetCategories, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::SDV701BackEnd.Protos.GetAllRequest, global::SDV701BackEnd.Protos.GetJsonSerializedResponse>(serviceImpl.GetCategories)); serviceBinder.AddMethod(__Method_GetCategoriesHash, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::SDV701BackEnd.Protos.GetAllRequest, global::SDV701BackEnd.Protos.GetCategoryListHashResponse>(serviceImpl.GetCategoriesHash)); serviceBinder.AddMethod(__Method_GetOrders, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::SDV701BackEnd.Protos.GetAllRequest, global::SDV701BackEnd.Protos.GetJsonSerializedResponse>(serviceImpl.GetOrders)); serviceBinder.AddMethod(__Method_PlaceOrder, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::SDV701BackEnd.Protos.PlaceOrderRequest, global::SDV701BackEnd.Protos.InsertResponse>(serviceImpl.PlaceOrder)); serviceBinder.AddMethod(__Method_Update, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::SDV701BackEnd.Protos.SetRequest, global::SDV701BackEnd.Protos.DeleteUpdateResponse>(serviceImpl.Update)); serviceBinder.AddMethod(__Method_Insert, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::SDV701BackEnd.Protos.SetRequest, global::SDV701BackEnd.Protos.InsertResponse>(serviceImpl.Insert)); serviceBinder.AddMethod(__Method_Delete, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::SDV701BackEnd.Protos.SetRequest, global::SDV701BackEnd.Protos.DeleteUpdateResponse>(serviceImpl.Delete)); }
/// <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(NetshopBase serviceImpl) { return(grpc::ServerServiceDefinition.CreateBuilder() .AddMethod(__Method_GetParts, serviceImpl.GetParts) .AddMethod(__Method_GetPartsByCategoryId, serviceImpl.GetPartsByCategoryId) .AddMethod(__Method_GetPartById, serviceImpl.GetPartById) .AddMethod(__Method_GetCategories, serviceImpl.GetCategories) .AddMethod(__Method_GetCategoriesHash, serviceImpl.GetCategoriesHash) .AddMethod(__Method_GetOrders, serviceImpl.GetOrders) .AddMethod(__Method_PlaceOrder, serviceImpl.PlaceOrder) .AddMethod(__Method_Update, serviceImpl.Update) .AddMethod(__Method_Insert, serviceImpl.Insert) .AddMethod(__Method_Delete, serviceImpl.Delete).Build()); }