/// <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, ScheduleServiceBase serviceImpl) { serviceBinder.AddMethod(__Method_AddHoliday, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::QuoteResearch.Service.ScheduleService.EditHolidayRequest, global::QuoteResearch.Service.ScheduleService.EditHolidayResponse>(serviceImpl.AddHoliday)); serviceBinder.AddMethod(__Method_RemoveHoliday, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::QuoteResearch.Service.ScheduleService.EditHolidayRequest, global::QuoteResearch.Service.ScheduleService.EditHolidayResponse>(serviceImpl.RemoveHoliday)); serviceBinder.AddMethod(__Method_AddSchedule, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::QuoteResearch.Service.ScheduleService.EditQuoteScheduleRequest, global::QuoteResearch.Service.ScheduleService.EditQuoteScheduleResponse>(serviceImpl.AddSchedule)); serviceBinder.AddMethod(__Method_RemoveSchedule, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::QuoteResearch.Service.ScheduleService.EditQuoteScheduleRequest, global::QuoteResearch.Service.ScheduleService.EditQuoteScheduleResponse>(serviceImpl.RemoveSchedule)); serviceBinder.AddMethod(__Method_UpdateSchedule, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::QuoteResearch.Service.ScheduleService.EditQuoteScheduleRequest, global::QuoteResearch.Service.ScheduleService.EditQuoteScheduleResponse>(serviceImpl.UpdateSchedule)); serviceBinder.AddMethod(__Method_GetSchedule, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::QuoteResearch.Service.ScheduleService.GetScheduleRequest, global::QuoteResearch.Service.ScheduleService.GetScheduleResponse>(serviceImpl.GetSchedule)); serviceBinder.AddMethod(__Method_GetScheduleUpdateTime, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::QuoteResearch.Service.Share.Type.EmptyRequest, global::Google.Protobuf.WellKnownTypes.Timestamp>(serviceImpl.GetScheduleUpdateTime)); serviceBinder.AddMethod(__Method_GetScheduleList, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::QuoteResearch.Service.Share.Type.EmptyRequest, global::QuoteResearch.Service.ScheduleService.GetQuoteScheduleListResponse>(serviceImpl.GetScheduleList)); }
/// <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(ScheduleServiceBase serviceImpl) { return(grpc::ServerServiceDefinition.CreateBuilder() .AddMethod(__Method_AddHoliday, serviceImpl.AddHoliday) .AddMethod(__Method_RemoveHoliday, serviceImpl.RemoveHoliday) .AddMethod(__Method_AddSchedule, serviceImpl.AddSchedule) .AddMethod(__Method_RemoveSchedule, serviceImpl.RemoveSchedule) .AddMethod(__Method_UpdateSchedule, serviceImpl.UpdateSchedule) .AddMethod(__Method_GetSchedule, serviceImpl.GetSchedule) .AddMethod(__Method_GetScheduleUpdateTime, serviceImpl.GetScheduleUpdateTime) .AddMethod(__Method_GetScheduleList, serviceImpl.GetScheduleList).Build()); }