/// <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, ParticipantsBase serviceImpl) { serviceBinder.AddMethod(__Method_CreateParticipant, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Google.Cloud.Dialogflow.V2.CreateParticipantRequest, global::Google.Cloud.Dialogflow.V2.Participant>(serviceImpl.CreateParticipant)); serviceBinder.AddMethod(__Method_GetParticipant, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Google.Cloud.Dialogflow.V2.GetParticipantRequest, global::Google.Cloud.Dialogflow.V2.Participant>(serviceImpl.GetParticipant)); serviceBinder.AddMethod(__Method_ListParticipants, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Google.Cloud.Dialogflow.V2.ListParticipantsRequest, global::Google.Cloud.Dialogflow.V2.ListParticipantsResponse>(serviceImpl.ListParticipants)); serviceBinder.AddMethod(__Method_UpdateParticipant, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Google.Cloud.Dialogflow.V2.UpdateParticipantRequest, global::Google.Cloud.Dialogflow.V2.Participant>(serviceImpl.UpdateParticipant)); serviceBinder.AddMethod(__Method_AnalyzeContent, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Google.Cloud.Dialogflow.V2.AnalyzeContentRequest, global::Google.Cloud.Dialogflow.V2.AnalyzeContentResponse>(serviceImpl.AnalyzeContent)); serviceBinder.AddMethod(__Method_SuggestArticles, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Google.Cloud.Dialogflow.V2.SuggestArticlesRequest, global::Google.Cloud.Dialogflow.V2.SuggestArticlesResponse>(serviceImpl.SuggestArticles)); serviceBinder.AddMethod(__Method_SuggestFaqAnswers, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Google.Cloud.Dialogflow.V2.SuggestFaqAnswersRequest, global::Google.Cloud.Dialogflow.V2.SuggestFaqAnswersResponse>(serviceImpl.SuggestFaqAnswers)); }
/// <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(ParticipantsBase serviceImpl) { return(grpc::ServerServiceDefinition.CreateBuilder() .AddMethod(__Method_CreateParticipant, serviceImpl.CreateParticipant) .AddMethod(__Method_GetParticipant, serviceImpl.GetParticipant) .AddMethod(__Method_ListParticipants, serviceImpl.ListParticipants) .AddMethod(__Method_UpdateParticipant, serviceImpl.UpdateParticipant) .AddMethod(__Method_AnalyzeContent, serviceImpl.AnalyzeContent) .AddMethod(__Method_SuggestArticles, serviceImpl.SuggestArticles) .AddMethod(__Method_SuggestFaqAnswers, serviceImpl.SuggestFaqAnswers).Build()); }