/// <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, PartyServiceBase serviceImpl) { serviceBinder.AddMethod(__Method_CreateParty, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Improbable.OnlineServices.Proto.Party.CreatePartyRequest, global::Improbable.OnlineServices.Proto.Party.CreatePartyResponse>(serviceImpl.CreateParty)); serviceBinder.AddMethod(__Method_GetPartyByPlayerId, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Improbable.OnlineServices.Proto.Party.GetPartyByPlayerIdRequest, global::Improbable.OnlineServices.Proto.Party.GetPartyByPlayerIdResponse>(serviceImpl.GetPartyByPlayerId)); serviceBinder.AddMethod(__Method_DeleteParty, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Improbable.OnlineServices.Proto.Party.DeletePartyRequest, global::Improbable.OnlineServices.Proto.Party.DeletePartyResponse>(serviceImpl.DeleteParty)); serviceBinder.AddMethod(__Method_JoinParty, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Improbable.OnlineServices.Proto.Party.JoinPartyRequest, global::Improbable.OnlineServices.Proto.Party.JoinPartyResponse>(serviceImpl.JoinParty)); serviceBinder.AddMethod(__Method_LeaveParty, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Improbable.OnlineServices.Proto.Party.LeavePartyRequest, global::Improbable.OnlineServices.Proto.Party.LeavePartyResponse>(serviceImpl.LeaveParty)); serviceBinder.AddMethod(__Method_KickOutPlayer, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Improbable.OnlineServices.Proto.Party.KickOutPlayerRequest, global::Improbable.OnlineServices.Proto.Party.KickOutPlayerResponse>(serviceImpl.KickOutPlayer)); serviceBinder.AddMethod(__Method_UpdateParty, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Improbable.OnlineServices.Proto.Party.UpdatePartyRequest, global::Improbable.OnlineServices.Proto.Party.UpdatePartyResponse>(serviceImpl.UpdateParty)); }
/// <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(PartyServiceBase serviceImpl) { return(grpc::ServerServiceDefinition.CreateBuilder() .AddMethod(__Method_CreateParty, serviceImpl.CreateParty) .AddMethod(__Method_GetPartyByPlayerId, serviceImpl.GetPartyByPlayerId) .AddMethod(__Method_DeleteParty, serviceImpl.DeleteParty) .AddMethod(__Method_JoinParty, serviceImpl.JoinParty) .AddMethod(__Method_LeaveParty, serviceImpl.LeaveParty) .AddMethod(__Method_KickOutPlayer, serviceImpl.KickOutPlayer) .AddMethod(__Method_UpdateParty, serviceImpl.UpdateParty).Build()); }