/// <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, WebhooksBase serviceImpl) { serviceBinder.AddMethod(__Method_ListWebhooks, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Google.Cloud.Dialogflow.Cx.V3.ListWebhooksRequest, global::Google.Cloud.Dialogflow.Cx.V3.ListWebhooksResponse>(serviceImpl.ListWebhooks)); serviceBinder.AddMethod(__Method_GetWebhook, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Google.Cloud.Dialogflow.Cx.V3.GetWebhookRequest, global::Google.Cloud.Dialogflow.Cx.V3.Webhook>(serviceImpl.GetWebhook)); serviceBinder.AddMethod(__Method_CreateWebhook, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Google.Cloud.Dialogflow.Cx.V3.CreateWebhookRequest, global::Google.Cloud.Dialogflow.Cx.V3.Webhook>(serviceImpl.CreateWebhook)); serviceBinder.AddMethod(__Method_UpdateWebhook, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Google.Cloud.Dialogflow.Cx.V3.UpdateWebhookRequest, global::Google.Cloud.Dialogflow.Cx.V3.Webhook>(serviceImpl.UpdateWebhook)); serviceBinder.AddMethod(__Method_DeleteWebhook, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Google.Cloud.Dialogflow.Cx.V3.DeleteWebhookRequest, global::Google.Protobuf.WellKnownTypes.Empty>(serviceImpl.DeleteWebhook)); }
/// <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(WebhooksBase serviceImpl) { return(grpc::ServerServiceDefinition.CreateBuilder() .AddMethod(__Method_ListWebhooks, serviceImpl.ListWebhooks) .AddMethod(__Method_GetWebhook, serviceImpl.GetWebhook) .AddMethod(__Method_CreateWebhook, serviceImpl.CreateWebhook) .AddMethod(__Method_UpdateWebhook, serviceImpl.UpdateWebhook) .AddMethod(__Method_DeleteWebhook, serviceImpl.DeleteWebhook).Build()); }