/// <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, DocumentsBase serviceImpl) { serviceBinder.AddMethod(__Method_ListDocuments, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Google.Cloud.Dialogflow.V2.ListDocumentsRequest, global::Google.Cloud.Dialogflow.V2.ListDocumentsResponse>(serviceImpl.ListDocuments)); serviceBinder.AddMethod(__Method_GetDocument, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Google.Cloud.Dialogflow.V2.GetDocumentRequest, global::Google.Cloud.Dialogflow.V2.Document>(serviceImpl.GetDocument)); serviceBinder.AddMethod(__Method_CreateDocument, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Google.Cloud.Dialogflow.V2.CreateDocumentRequest, global::Google.LongRunning.Operation>(serviceImpl.CreateDocument)); serviceBinder.AddMethod(__Method_DeleteDocument, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Google.Cloud.Dialogflow.V2.DeleteDocumentRequest, global::Google.LongRunning.Operation>(serviceImpl.DeleteDocument)); serviceBinder.AddMethod(__Method_UpdateDocument, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Google.Cloud.Dialogflow.V2.UpdateDocumentRequest, global::Google.LongRunning.Operation>(serviceImpl.UpdateDocument)); serviceBinder.AddMethod(__Method_ReloadDocument, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Google.Cloud.Dialogflow.V2.ReloadDocumentRequest, global::Google.LongRunning.Operation>(serviceImpl.ReloadDocument)); }
/// <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(DocumentsBase serviceImpl) { return(grpc::ServerServiceDefinition.CreateBuilder() .AddMethod(__Method_ListDocuments, serviceImpl.ListDocuments) .AddMethod(__Method_GetDocument, serviceImpl.GetDocument) .AddMethod(__Method_CreateDocument, serviceImpl.CreateDocument) .AddMethod(__Method_DeleteDocument, serviceImpl.DeleteDocument) .AddMethod(__Method_UpdateDocument, serviceImpl.UpdateDocument) .AddMethod(__Method_ReloadDocument, serviceImpl.ReloadDocument).Build()); }