/// <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, SeriesGrpcBase serviceImpl) { serviceBinder.AddMethod(__Method_GetAllSeries, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::EvaluationSeries.Grpc.SeriesEmpty, global::EvaluationSeries.Grpc.GetSeriesResponse>(serviceImpl.GetAllSeries)); serviceBinder.AddMethod(__Method_PostSeries, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::EvaluationSeries.Grpc.SeriesFull, global::EvaluationSeries.Grpc.SeriesMessageResponse>(serviceImpl.PostSeries)); serviceBinder.AddMethod(__Method_PutSeries, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::EvaluationSeries.Grpc.SeriesFull, global::EvaluationSeries.Grpc.SeriesMessageResponse>(serviceImpl.PutSeries)); serviceBinder.AddMethod(__Method_DeleteSeries, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::EvaluationSeries.Grpc.SeriesId, global::EvaluationSeries.Grpc.SeriesMessageResponse>(serviceImpl.DeleteSeries)); serviceBinder.AddMethod(__Method_GetSeriesById, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::EvaluationSeries.Grpc.SeriesId, global::EvaluationSeries.Grpc.GetSeriesByIdResponse>(serviceImpl.GetSeriesById)); serviceBinder.AddMethod(__Method_GerRolesSeries, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::EvaluationSeries.Grpc.SeriesId, global::EvaluationSeries.Grpc.GetRolesResponse>(serviceImpl.GerRolesSeries)); serviceBinder.AddMethod(__Method_PostRole, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::EvaluationSeries.Grpc.RoleAdd, global::EvaluationSeries.Grpc.SeriesMessageResponse>(serviceImpl.PostRole)); serviceBinder.AddMethod(__Method_DeleteRole, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::EvaluationSeries.Grpc.SeriesRoleId, global::EvaluationSeries.Grpc.SeriesMessageResponse>(serviceImpl.DeleteRole)); serviceBinder.AddMethod(__Method_PostActorSeries, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::EvaluationSeries.Grpc.ActorSeries, global::EvaluationSeries.Grpc.SeriesMessageResponse>(serviceImpl.PostActorSeries)); serviceBinder.AddMethod(__Method_PutActorSeries, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::EvaluationSeries.Grpc.ActorSeriesUpdate, global::EvaluationSeries.Grpc.SeriesMessageResponse>(serviceImpl.PutActorSeries)); serviceBinder.AddMethod(__Method_DeleteActorSeries, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::EvaluationSeries.Grpc.ActorSeries, global::EvaluationSeries.Grpc.SeriesMessageResponse>(serviceImpl.DeleteActorSeries)); serviceBinder.AddMethod(__Method_GetAllGenre, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::EvaluationSeries.Grpc.SeriesEmpty, global::EvaluationSeries.Grpc.GetGenresResponse>(serviceImpl.GetAllGenre)); serviceBinder.AddMethod(__Method_GetAllCountry, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::EvaluationSeries.Grpc.SeriesEmpty, global::EvaluationSeries.Grpc.GetCountryResponse>(serviceImpl.GetAllCountry)); serviceBinder.AddMethod(__Method_GetAllRoles, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::EvaluationSeries.Grpc.SeriesEmpty, global::EvaluationSeries.Grpc.GetRolesResponse>(serviceImpl.GetAllRoles)); }
/// <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(SeriesGrpcBase serviceImpl) { return(grpc::ServerServiceDefinition.CreateBuilder() .AddMethod(__Method_GetAllSeries, serviceImpl.GetAllSeries) .AddMethod(__Method_PostSeries, serviceImpl.PostSeries) .AddMethod(__Method_PutSeries, serviceImpl.PutSeries) .AddMethod(__Method_DeleteSeries, serviceImpl.DeleteSeries) .AddMethod(__Method_GetSeriesById, serviceImpl.GetSeriesById) .AddMethod(__Method_GerRolesSeries, serviceImpl.GerRolesSeries) .AddMethod(__Method_PostRole, serviceImpl.PostRole) .AddMethod(__Method_DeleteRole, serviceImpl.DeleteRole) .AddMethod(__Method_PostActorSeries, serviceImpl.PostActorSeries) .AddMethod(__Method_PutActorSeries, serviceImpl.PutActorSeries) .AddMethod(__Method_DeleteActorSeries, serviceImpl.DeleteActorSeries) .AddMethod(__Method_GetAllGenre, serviceImpl.GetAllGenre) .AddMethod(__Method_GetAllCountry, serviceImpl.GetAllCountry) .AddMethod(__Method_GetAllRoles, serviceImpl.GetAllRoles).Build()); }