/// <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, GameServerServiceBase serviceImpl) { serviceBinder.AddMethod(__Method_GetConnectionToken, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::P4TLB.MasterServer.ConnectionTokenRequest, global::P4TLB.MasterServer.ConnectionTokenResponse>(serviceImpl.GetConnectionToken)); serviceBinder.AddMethod(__Method_TryConnect, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::P4TLB.MasterServer.ConnectionRequest, global::P4TLB.MasterServer.ConnectionResponse>(serviceImpl.TryConnect)); serviceBinder.AddMethod(__Method_GetPendingConnectionTokens, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::P4TLB.MasterServer.GetPendingConnectionTokenRequest, global::P4TLB.MasterServer.GetPendingConnectionTokenResponse>(serviceImpl.GetPendingConnectionTokens)); serviceBinder.AddMethod(__Method_AcknowledgeToken, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::P4TLB.MasterServer.AcknowledgeTokenRequest, global::P4TLB.MasterServer.AcknowledgeTokenResponse>(serviceImpl.AcknowledgeToken)); serviceBinder.AddMethod(__Method_UpdateServerInformation, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::P4TLB.MasterServer.SetServerInformationRequest, global::P4TLB.MasterServer.SetServerInformationResponse>(serviceImpl.UpdateServerInformation)); serviceBinder.AddMethod(__Method_GetServerList, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::P4TLB.MasterServer.ServerListRequest, global::P4TLB.MasterServer.ServerListResponse>(serviceImpl.GetServerList)); serviceBinder.AddMethod(__Method_GetServerInformation, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::P4TLB.MasterServer.ServerInformationRequest, global::P4TLB.MasterServer.ServerInformationResponse>(serviceImpl.GetServerInformation)); }
/// <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(GameServerServiceBase serviceImpl) { return(grpc::ServerServiceDefinition.CreateBuilder() .AddMethod(__Method_GetConnectionToken, serviceImpl.GetConnectionToken) .AddMethod(__Method_TryConnect, serviceImpl.TryConnect) .AddMethod(__Method_GetPendingConnectionTokens, serviceImpl.GetPendingConnectionTokens) .AddMethod(__Method_AcknowledgeToken, serviceImpl.AcknowledgeToken) .AddMethod(__Method_UpdateServerInformation, serviceImpl.UpdateServerInformation) .AddMethod(__Method_GetServerList, serviceImpl.GetServerList) .AddMethod(__Method_GetServerInformation, serviceImpl.GetServerInformation).Build()); }