/// <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, EventarcBase serviceImpl) { serviceBinder.AddMethod(__Method_GetTrigger, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Google.Cloud.Eventarc.V1.GetTriggerRequest, global::Google.Cloud.Eventarc.V1.Trigger>(serviceImpl.GetTrigger)); serviceBinder.AddMethod(__Method_ListTriggers, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Google.Cloud.Eventarc.V1.ListTriggersRequest, global::Google.Cloud.Eventarc.V1.ListTriggersResponse>(serviceImpl.ListTriggers)); serviceBinder.AddMethod(__Method_CreateTrigger, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Google.Cloud.Eventarc.V1.CreateTriggerRequest, global::Google.LongRunning.Operation>(serviceImpl.CreateTrigger)); serviceBinder.AddMethod(__Method_UpdateTrigger, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Google.Cloud.Eventarc.V1.UpdateTriggerRequest, global::Google.LongRunning.Operation>(serviceImpl.UpdateTrigger)); serviceBinder.AddMethod(__Method_DeleteTrigger, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Google.Cloud.Eventarc.V1.DeleteTriggerRequest, global::Google.LongRunning.Operation>(serviceImpl.DeleteTrigger)); }
/// <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(EventarcBase serviceImpl) { return(grpc::ServerServiceDefinition.CreateBuilder() .AddMethod(__Method_GetTrigger, serviceImpl.GetTrigger) .AddMethod(__Method_ListTriggers, serviceImpl.ListTriggers) .AddMethod(__Method_CreateTrigger, serviceImpl.CreateTrigger) .AddMethod(__Method_UpdateTrigger, serviceImpl.UpdateTrigger) .AddMethod(__Method_DeleteTrigger, serviceImpl.DeleteTrigger).Build()); }