/// <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, ExperimentsBase serviceImpl) { serviceBinder.AddMethod(__Method_ListExperiments, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Google.Cloud.Dialogflow.Cx.V3.ListExperimentsRequest, global::Google.Cloud.Dialogflow.Cx.V3.ListExperimentsResponse>(serviceImpl.ListExperiments)); serviceBinder.AddMethod(__Method_GetExperiment, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Google.Cloud.Dialogflow.Cx.V3.GetExperimentRequest, global::Google.Cloud.Dialogflow.Cx.V3.Experiment>(serviceImpl.GetExperiment)); serviceBinder.AddMethod(__Method_CreateExperiment, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Google.Cloud.Dialogflow.Cx.V3.CreateExperimentRequest, global::Google.Cloud.Dialogflow.Cx.V3.Experiment>(serviceImpl.CreateExperiment)); serviceBinder.AddMethod(__Method_UpdateExperiment, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Google.Cloud.Dialogflow.Cx.V3.UpdateExperimentRequest, global::Google.Cloud.Dialogflow.Cx.V3.Experiment>(serviceImpl.UpdateExperiment)); serviceBinder.AddMethod(__Method_DeleteExperiment, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Google.Cloud.Dialogflow.Cx.V3.DeleteExperimentRequest, global::Google.Protobuf.WellKnownTypes.Empty>(serviceImpl.DeleteExperiment)); serviceBinder.AddMethod(__Method_StartExperiment, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Google.Cloud.Dialogflow.Cx.V3.StartExperimentRequest, global::Google.Cloud.Dialogflow.Cx.V3.Experiment>(serviceImpl.StartExperiment)); serviceBinder.AddMethod(__Method_StopExperiment, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Google.Cloud.Dialogflow.Cx.V3.StopExperimentRequest, global::Google.Cloud.Dialogflow.Cx.V3.Experiment>(serviceImpl.StopExperiment)); }
/// <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(ExperimentsBase serviceImpl) { return(grpc::ServerServiceDefinition.CreateBuilder() .AddMethod(__Method_ListExperiments, serviceImpl.ListExperiments) .AddMethod(__Method_GetExperiment, serviceImpl.GetExperiment) .AddMethod(__Method_CreateExperiment, serviceImpl.CreateExperiment) .AddMethod(__Method_UpdateExperiment, serviceImpl.UpdateExperiment) .AddMethod(__Method_DeleteExperiment, serviceImpl.DeleteExperiment) .AddMethod(__Method_StartExperiment, serviceImpl.StartExperiment) .AddMethod(__Method_StopExperiment, serviceImpl.StopExperiment).Build()); }