/// <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, RecaptchaEnterpriseServiceBase serviceImpl) { serviceBinder.AddMethod(__Method_CreateAssessment, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Google.Cloud.RecaptchaEnterprise.V1.CreateAssessmentRequest, global::Google.Cloud.RecaptchaEnterprise.V1.Assessment>(serviceImpl.CreateAssessment)); serviceBinder.AddMethod(__Method_AnnotateAssessment, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Google.Cloud.RecaptchaEnterprise.V1.AnnotateAssessmentRequest, global::Google.Cloud.RecaptchaEnterprise.V1.AnnotateAssessmentResponse>(serviceImpl.AnnotateAssessment)); serviceBinder.AddMethod(__Method_CreateKey, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Google.Cloud.RecaptchaEnterprise.V1.CreateKeyRequest, global::Google.Cloud.RecaptchaEnterprise.V1.Key>(serviceImpl.CreateKey)); serviceBinder.AddMethod(__Method_ListKeys, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Google.Cloud.RecaptchaEnterprise.V1.ListKeysRequest, global::Google.Cloud.RecaptchaEnterprise.V1.ListKeysResponse>(serviceImpl.ListKeys)); serviceBinder.AddMethod(__Method_GetKey, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Google.Cloud.RecaptchaEnterprise.V1.GetKeyRequest, global::Google.Cloud.RecaptchaEnterprise.V1.Key>(serviceImpl.GetKey)); serviceBinder.AddMethod(__Method_UpdateKey, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Google.Cloud.RecaptchaEnterprise.V1.UpdateKeyRequest, global::Google.Cloud.RecaptchaEnterprise.V1.Key>(serviceImpl.UpdateKey)); serviceBinder.AddMethod(__Method_DeleteKey, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Google.Cloud.RecaptchaEnterprise.V1.DeleteKeyRequest, global::Google.Protobuf.WellKnownTypes.Empty>(serviceImpl.DeleteKey)); }
/// <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(RecaptchaEnterpriseServiceBase serviceImpl) { return(grpc::ServerServiceDefinition.CreateBuilder() .AddMethod(__Method_CreateAssessment, serviceImpl.CreateAssessment) .AddMethod(__Method_AnnotateAssessment, serviceImpl.AnnotateAssessment) .AddMethod(__Method_CreateKey, serviceImpl.CreateKey) .AddMethod(__Method_ListKeys, serviceImpl.ListKeys) .AddMethod(__Method_GetKey, serviceImpl.GetKey) .AddMethod(__Method_UpdateKey, serviceImpl.UpdateKey) .AddMethod(__Method_DeleteKey, serviceImpl.DeleteKey).Build()); }