/// <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(TextToSpeechBase serviceImpl) { return(grpc::ServerServiceDefinition.CreateBuilder() .AddMethod(__Method_ListVoices, serviceImpl.ListVoices) .AddMethod(__Method_Synthesize, serviceImpl.Synthesize) .AddMethod(__Method_StreamingSynthesize, serviceImpl.StreamingSynthesize).Build()); }
/// <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, TextToSpeechBase serviceImpl) { serviceBinder.AddMethod(__Method_ListVoices, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Google.Cloud.TextToSpeech.V1.ListVoicesRequest, global::Google.Cloud.TextToSpeech.V1.ListVoicesResponse>(serviceImpl.ListVoices)); serviceBinder.AddMethod(__Method_SynthesizeSpeech, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Google.Cloud.TextToSpeech.V1.SynthesizeSpeechRequest, global::Google.Cloud.TextToSpeech.V1.SynthesizeSpeechResponse>(serviceImpl.SynthesizeSpeech)); }
/// <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, TextToSpeechBase serviceImpl) { serviceBinder.AddMethod(__Method_ListVoices, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Tinkoff.Cloud.Tts.V1.ListVoicesRequest, global::Tinkoff.Cloud.Tts.V1.ListVoicesResponses>(serviceImpl.ListVoices)); serviceBinder.AddMethod(__Method_Synthesize, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Tinkoff.Cloud.Tts.V1.SynthesizeSpeechRequest, global::Tinkoff.Cloud.Tts.V1.SynthesizeSpeechResponse>(serviceImpl.Synthesize)); serviceBinder.AddMethod(__Method_StreamingSynthesize, serviceImpl == null ? null : new grpc::ServerStreamingServerMethod <global::Tinkoff.Cloud.Tts.V1.SynthesizeSpeechRequest, global::Tinkoff.Cloud.Tts.V1.StreamingSynthesizeSpeechResponse>(serviceImpl.StreamingSynthesize)); }