You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
411 lines
24 KiB
411 lines
24 KiB
// <auto-generated>
|
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
// source: game.proto
|
|
// </auto-generated>
|
|
#pragma warning disable 0414, 1591
|
|
#region Designer generated code
|
|
|
|
using grpc = global::Grpc.Core;
|
|
|
|
namespace Game {
|
|
/// <summary>
|
|
/// Interface exported by the server.
|
|
/// </summary>
|
|
public static partial class Connection
|
|
{
|
|
static readonly string __ServiceName = "game.Connection";
|
|
|
|
static void __Helper_SerializeMessage(global::Google.Protobuf.IMessage message, grpc::SerializationContext context)
|
|
{
|
|
#if !GRPC_DISABLE_PROTOBUF_BUFFER_SERIALIZATION
|
|
if (message is global::Google.Protobuf.IBufferMessage)
|
|
{
|
|
context.SetPayloadLength(message.CalculateSize());
|
|
global::Google.Protobuf.MessageExtensions.WriteTo(message, context.GetBufferWriter());
|
|
context.Complete();
|
|
return;
|
|
}
|
|
#endif
|
|
context.Complete(global::Google.Protobuf.MessageExtensions.ToByteArray(message));
|
|
}
|
|
|
|
static class __Helper_MessageCache<T>
|
|
{
|
|
public static readonly bool IsBufferMessage = global::System.Reflection.IntrospectionExtensions.GetTypeInfo(typeof(global::Google.Protobuf.IBufferMessage)).IsAssignableFrom(typeof(T));
|
|
}
|
|
|
|
static T __Helper_DeserializeMessage<T>(grpc::DeserializationContext context, global::Google.Protobuf.MessageParser<T> parser) where T : global::Google.Protobuf.IMessage<T>
|
|
{
|
|
#if !GRPC_DISABLE_PROTOBUF_BUFFER_SERIALIZATION
|
|
if (__Helper_MessageCache<T>.IsBufferMessage)
|
|
{
|
|
return parser.ParseFrom(context.PayloadAsReadOnlySequence());
|
|
}
|
|
#endif
|
|
return parser.ParseFrom(context.PayloadAsNewBuffer());
|
|
}
|
|
|
|
static readonly grpc::Marshaller<global::Game.Username> __Marshaller_game_Username = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Game.Username.Parser));
|
|
static readonly grpc::Marshaller<global::Game.UserID> __Marshaller_game_UserID = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Game.UserID.Parser));
|
|
static readonly grpc::Marshaller<global::Game.LobbyCode> __Marshaller_game_LobbyCode = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Game.LobbyCode.Parser));
|
|
static readonly grpc::Marshaller<global::Game.Null> __Marshaller_game_Null = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Game.Null.Parser));
|
|
|
|
static readonly grpc::Method<global::Game.Username, global::Game.UserID> __Method_connect = new grpc::Method<global::Game.Username, global::Game.UserID>(
|
|
grpc::MethodType.Unary,
|
|
__ServiceName,
|
|
"connect",
|
|
__Marshaller_game_Username,
|
|
__Marshaller_game_UserID);
|
|
|
|
static readonly grpc::Method<global::Game.LobbyCode, global::Game.Null> __Method_joinLobbyWithCode = new grpc::Method<global::Game.LobbyCode, global::Game.Null>(
|
|
grpc::MethodType.Unary,
|
|
__ServiceName,
|
|
"joinLobbyWithCode",
|
|
__Marshaller_game_LobbyCode,
|
|
__Marshaller_game_Null);
|
|
|
|
static readonly grpc::Method<global::Game.Null, global::Game.LobbyCode> __Method_joinLobbyWithoutCode = new grpc::Method<global::Game.Null, global::Game.LobbyCode>(
|
|
grpc::MethodType.Unary,
|
|
__ServiceName,
|
|
"joinLobbyWithoutCode",
|
|
__Marshaller_game_Null,
|
|
__Marshaller_game_LobbyCode);
|
|
|
|
/// <summary>Service descriptor</summary>
|
|
public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor
|
|
{
|
|
get { return global::Game.GameReflection.Descriptor.Services[0]; }
|
|
}
|
|
|
|
/// <summary>Base class for server-side implementations of Connection</summary>
|
|
[grpc::BindServiceMethod(typeof(Connection), "BindService")]
|
|
public abstract partial class ConnectionBase
|
|
{
|
|
public virtual global::System.Threading.Tasks.Task<global::Game.UserID> connect(global::Game.Username request, grpc::ServerCallContext context)
|
|
{
|
|
throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
|
|
}
|
|
|
|
public virtual global::System.Threading.Tasks.Task<global::Game.Null> joinLobbyWithCode(global::Game.LobbyCode request, grpc::ServerCallContext context)
|
|
{
|
|
throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
|
|
}
|
|
|
|
public virtual global::System.Threading.Tasks.Task<global::Game.LobbyCode> joinLobbyWithoutCode(global::Game.Null request, grpc::ServerCallContext context)
|
|
{
|
|
throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
|
|
}
|
|
|
|
}
|
|
|
|
/// <summary>Client for Connection</summary>
|
|
public partial class ConnectionClient : grpc::ClientBase<ConnectionClient>
|
|
{
|
|
/// <summary>Creates a new client for Connection</summary>
|
|
/// <param name="channel">The channel to use to make remote calls.</param>
|
|
public ConnectionClient(grpc::ChannelBase channel) : base(channel)
|
|
{
|
|
}
|
|
/// <summary>Creates a new client for Connection that uses a custom <c>CallInvoker</c>.</summary>
|
|
/// <param name="callInvoker">The callInvoker to use to make remote calls.</param>
|
|
public ConnectionClient(grpc::CallInvoker callInvoker) : base(callInvoker)
|
|
{
|
|
}
|
|
/// <summary>Protected parameterless constructor to allow creation of test doubles.</summary>
|
|
protected ConnectionClient() : base()
|
|
{
|
|
}
|
|
/// <summary>Protected constructor to allow creation of configured clients.</summary>
|
|
/// <param name="configuration">The client configuration.</param>
|
|
protected ConnectionClient(ClientBaseConfiguration configuration) : base(configuration)
|
|
{
|
|
}
|
|
|
|
public virtual global::Game.UserID connect(global::Game.Username request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
|
|
{
|
|
return connect(request, new grpc::CallOptions(headers, deadline, cancellationToken));
|
|
}
|
|
public virtual global::Game.UserID connect(global::Game.Username request, grpc::CallOptions options)
|
|
{
|
|
return CallInvoker.BlockingUnaryCall(__Method_connect, null, options, request);
|
|
}
|
|
public virtual grpc::AsyncUnaryCall<global::Game.UserID> connectAsync(global::Game.Username request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
|
|
{
|
|
return connectAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken));
|
|
}
|
|
public virtual grpc::AsyncUnaryCall<global::Game.UserID> connectAsync(global::Game.Username request, grpc::CallOptions options)
|
|
{
|
|
return CallInvoker.AsyncUnaryCall(__Method_connect, null, options, request);
|
|
}
|
|
public virtual global::Game.Null joinLobbyWithCode(global::Game.LobbyCode request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
|
|
{
|
|
return joinLobbyWithCode(request, new grpc::CallOptions(headers, deadline, cancellationToken));
|
|
}
|
|
public virtual global::Game.Null joinLobbyWithCode(global::Game.LobbyCode request, grpc::CallOptions options)
|
|
{
|
|
return CallInvoker.BlockingUnaryCall(__Method_joinLobbyWithCode, null, options, request);
|
|
}
|
|
public virtual grpc::AsyncUnaryCall<global::Game.Null> joinLobbyWithCodeAsync(global::Game.LobbyCode request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
|
|
{
|
|
return joinLobbyWithCodeAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken));
|
|
}
|
|
public virtual grpc::AsyncUnaryCall<global::Game.Null> joinLobbyWithCodeAsync(global::Game.LobbyCode request, grpc::CallOptions options)
|
|
{
|
|
return CallInvoker.AsyncUnaryCall(__Method_joinLobbyWithCode, null, options, request);
|
|
}
|
|
public virtual global::Game.LobbyCode joinLobbyWithoutCode(global::Game.Null request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
|
|
{
|
|
return joinLobbyWithoutCode(request, new grpc::CallOptions(headers, deadline, cancellationToken));
|
|
}
|
|
public virtual global::Game.LobbyCode joinLobbyWithoutCode(global::Game.Null request, grpc::CallOptions options)
|
|
{
|
|
return CallInvoker.BlockingUnaryCall(__Method_joinLobbyWithoutCode, null, options, request);
|
|
}
|
|
public virtual grpc::AsyncUnaryCall<global::Game.LobbyCode> joinLobbyWithoutCodeAsync(global::Game.Null request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
|
|
{
|
|
return joinLobbyWithoutCodeAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken));
|
|
}
|
|
public virtual grpc::AsyncUnaryCall<global::Game.LobbyCode> joinLobbyWithoutCodeAsync(global::Game.Null request, grpc::CallOptions options)
|
|
{
|
|
return CallInvoker.AsyncUnaryCall(__Method_joinLobbyWithoutCode, null, options, request);
|
|
}
|
|
/// <summary>Creates a new instance of client from given <c>ClientBaseConfiguration</c>.</summary>
|
|
protected override ConnectionClient NewInstance(ClientBaseConfiguration configuration)
|
|
{
|
|
return new ConnectionClient(configuration);
|
|
}
|
|
}
|
|
|
|
/// <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(ConnectionBase serviceImpl)
|
|
{
|
|
return grpc::ServerServiceDefinition.CreateBuilder()
|
|
.AddMethod(__Method_connect, serviceImpl.connect)
|
|
.AddMethod(__Method_joinLobbyWithCode, serviceImpl.joinLobbyWithCode)
|
|
.AddMethod(__Method_joinLobbyWithoutCode, serviceImpl.joinLobbyWithoutCode).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, ConnectionBase serviceImpl)
|
|
{
|
|
serviceBinder.AddMethod(__Method_connect, serviceImpl == null ? null : new grpc::UnaryServerMethod<global::Game.Username, global::Game.UserID>(serviceImpl.connect));
|
|
serviceBinder.AddMethod(__Method_joinLobbyWithCode, serviceImpl == null ? null : new grpc::UnaryServerMethod<global::Game.LobbyCode, global::Game.Null>(serviceImpl.joinLobbyWithCode));
|
|
serviceBinder.AddMethod(__Method_joinLobbyWithoutCode, serviceImpl == null ? null : new grpc::UnaryServerMethod<global::Game.Null, global::Game.LobbyCode>(serviceImpl.joinLobbyWithoutCode));
|
|
}
|
|
|
|
}
|
|
public static partial class Lobby
|
|
{
|
|
static readonly string __ServiceName = "game.Lobby";
|
|
|
|
static void __Helper_SerializeMessage(global::Google.Protobuf.IMessage message, grpc::SerializationContext context)
|
|
{
|
|
#if !GRPC_DISABLE_PROTOBUF_BUFFER_SERIALIZATION
|
|
if (message is global::Google.Protobuf.IBufferMessage)
|
|
{
|
|
context.SetPayloadLength(message.CalculateSize());
|
|
global::Google.Protobuf.MessageExtensions.WriteTo(message, context.GetBufferWriter());
|
|
context.Complete();
|
|
return;
|
|
}
|
|
#endif
|
|
context.Complete(global::Google.Protobuf.MessageExtensions.ToByteArray(message));
|
|
}
|
|
|
|
static class __Helper_MessageCache<T>
|
|
{
|
|
public static readonly bool IsBufferMessage = global::System.Reflection.IntrospectionExtensions.GetTypeInfo(typeof(global::Google.Protobuf.IBufferMessage)).IsAssignableFrom(typeof(T));
|
|
}
|
|
|
|
static T __Helper_DeserializeMessage<T>(grpc::DeserializationContext context, global::Google.Protobuf.MessageParser<T> parser) where T : global::Google.Protobuf.IMessage<T>
|
|
{
|
|
#if !GRPC_DISABLE_PROTOBUF_BUFFER_SERIALIZATION
|
|
if (__Helper_MessageCache<T>.IsBufferMessage)
|
|
{
|
|
return parser.ParseFrom(context.PayloadAsReadOnlySequence());
|
|
}
|
|
#endif
|
|
return parser.ParseFrom(context.PayloadAsNewBuffer());
|
|
}
|
|
|
|
static readonly grpc::Marshaller<global::Game.Null> __Marshaller_game_Null = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Game.Null.Parser));
|
|
static readonly grpc::Marshaller<global::Game.Game> __Marshaller_game_Game = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Game.Game.Parser));
|
|
static readonly grpc::Marshaller<global::Game.Vote> __Marshaller_game_Vote = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Game.Vote.Parser));
|
|
static readonly grpc::Marshaller<global::Game.LobbyStatus> __Marshaller_game_LobbyStatus = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Game.LobbyStatus.Parser));
|
|
|
|
static readonly grpc::Method<global::Game.Null, global::Game.Game> __Method_getGames = new grpc::Method<global::Game.Null, global::Game.Game>(
|
|
grpc::MethodType.ServerStreaming,
|
|
__ServiceName,
|
|
"getGames",
|
|
__Marshaller_game_Null,
|
|
__Marshaller_game_Game);
|
|
|
|
static readonly grpc::Method<global::Game.Vote, global::Game.Null> __Method_vote = new grpc::Method<global::Game.Vote, global::Game.Null>(
|
|
grpc::MethodType.Unary,
|
|
__ServiceName,
|
|
"vote",
|
|
__Marshaller_game_Vote,
|
|
__Marshaller_game_Null);
|
|
|
|
static readonly grpc::Method<global::Game.Null, global::Game.Null> __Method_ready = new grpc::Method<global::Game.Null, global::Game.Null>(
|
|
grpc::MethodType.Unary,
|
|
__ServiceName,
|
|
"ready",
|
|
__Marshaller_game_Null,
|
|
__Marshaller_game_Null);
|
|
|
|
static readonly grpc::Method<global::Game.Null, global::Game.LobbyStatus> __Method_status = new grpc::Method<global::Game.Null, global::Game.LobbyStatus>(
|
|
grpc::MethodType.Unary,
|
|
__ServiceName,
|
|
"status",
|
|
__Marshaller_game_Null,
|
|
__Marshaller_game_LobbyStatus);
|
|
|
|
/// <summary>Service descriptor</summary>
|
|
public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor
|
|
{
|
|
get { return global::Game.GameReflection.Descriptor.Services[1]; }
|
|
}
|
|
|
|
/// <summary>Base class for server-side implementations of Lobby</summary>
|
|
[grpc::BindServiceMethod(typeof(Lobby), "BindService")]
|
|
public abstract partial class LobbyBase
|
|
{
|
|
public virtual global::System.Threading.Tasks.Task getGames(global::Game.Null request, grpc::IServerStreamWriter<global::Game.Game> responseStream, grpc::ServerCallContext context)
|
|
{
|
|
throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
|
|
}
|
|
|
|
public virtual global::System.Threading.Tasks.Task<global::Game.Null> vote(global::Game.Vote request, grpc::ServerCallContext context)
|
|
{
|
|
throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
|
|
}
|
|
|
|
public virtual global::System.Threading.Tasks.Task<global::Game.Null> ready(global::Game.Null request, grpc::ServerCallContext context)
|
|
{
|
|
throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
|
|
}
|
|
|
|
public virtual global::System.Threading.Tasks.Task<global::Game.LobbyStatus> status(global::Game.Null request, grpc::ServerCallContext context)
|
|
{
|
|
throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
|
|
}
|
|
|
|
}
|
|
|
|
/// <summary>Client for Lobby</summary>
|
|
public partial class LobbyClient : grpc::ClientBase<LobbyClient>
|
|
{
|
|
/// <summary>Creates a new client for Lobby</summary>
|
|
/// <param name="channel">The channel to use to make remote calls.</param>
|
|
public LobbyClient(grpc::ChannelBase channel) : base(channel)
|
|
{
|
|
}
|
|
/// <summary>Creates a new client for Lobby that uses a custom <c>CallInvoker</c>.</summary>
|
|
/// <param name="callInvoker">The callInvoker to use to make remote calls.</param>
|
|
public LobbyClient(grpc::CallInvoker callInvoker) : base(callInvoker)
|
|
{
|
|
}
|
|
/// <summary>Protected parameterless constructor to allow creation of test doubles.</summary>
|
|
protected LobbyClient() : base()
|
|
{
|
|
}
|
|
/// <summary>Protected constructor to allow creation of configured clients.</summary>
|
|
/// <param name="configuration">The client configuration.</param>
|
|
protected LobbyClient(ClientBaseConfiguration configuration) : base(configuration)
|
|
{
|
|
}
|
|
|
|
public virtual grpc::AsyncServerStreamingCall<global::Game.Game> getGames(global::Game.Null request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
|
|
{
|
|
return getGames(request, new grpc::CallOptions(headers, deadline, cancellationToken));
|
|
}
|
|
public virtual grpc::AsyncServerStreamingCall<global::Game.Game> getGames(global::Game.Null request, grpc::CallOptions options)
|
|
{
|
|
return CallInvoker.AsyncServerStreamingCall(__Method_getGames, null, options, request);
|
|
}
|
|
public virtual global::Game.Null vote(global::Game.Vote request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
|
|
{
|
|
return vote(request, new grpc::CallOptions(headers, deadline, cancellationToken));
|
|
}
|
|
public virtual global::Game.Null vote(global::Game.Vote request, grpc::CallOptions options)
|
|
{
|
|
return CallInvoker.BlockingUnaryCall(__Method_vote, null, options, request);
|
|
}
|
|
public virtual grpc::AsyncUnaryCall<global::Game.Null> voteAsync(global::Game.Vote request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
|
|
{
|
|
return voteAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken));
|
|
}
|
|
public virtual grpc::AsyncUnaryCall<global::Game.Null> voteAsync(global::Game.Vote request, grpc::CallOptions options)
|
|
{
|
|
return CallInvoker.AsyncUnaryCall(__Method_vote, null, options, request);
|
|
}
|
|
public virtual global::Game.Null ready(global::Game.Null request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
|
|
{
|
|
return ready(request, new grpc::CallOptions(headers, deadline, cancellationToken));
|
|
}
|
|
public virtual global::Game.Null ready(global::Game.Null request, grpc::CallOptions options)
|
|
{
|
|
return CallInvoker.BlockingUnaryCall(__Method_ready, null, options, request);
|
|
}
|
|
public virtual grpc::AsyncUnaryCall<global::Game.Null> readyAsync(global::Game.Null request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
|
|
{
|
|
return readyAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken));
|
|
}
|
|
public virtual grpc::AsyncUnaryCall<global::Game.Null> readyAsync(global::Game.Null request, grpc::CallOptions options)
|
|
{
|
|
return CallInvoker.AsyncUnaryCall(__Method_ready, null, options, request);
|
|
}
|
|
public virtual global::Game.LobbyStatus status(global::Game.Null request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
|
|
{
|
|
return status(request, new grpc::CallOptions(headers, deadline, cancellationToken));
|
|
}
|
|
public virtual global::Game.LobbyStatus status(global::Game.Null request, grpc::CallOptions options)
|
|
{
|
|
return CallInvoker.BlockingUnaryCall(__Method_status, null, options, request);
|
|
}
|
|
public virtual grpc::AsyncUnaryCall<global::Game.LobbyStatus> statusAsync(global::Game.Null request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
|
|
{
|
|
return statusAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken));
|
|
}
|
|
public virtual grpc::AsyncUnaryCall<global::Game.LobbyStatus> statusAsync(global::Game.Null request, grpc::CallOptions options)
|
|
{
|
|
return CallInvoker.AsyncUnaryCall(__Method_status, null, options, request);
|
|
}
|
|
/// <summary>Creates a new instance of client from given <c>ClientBaseConfiguration</c>.</summary>
|
|
protected override LobbyClient NewInstance(ClientBaseConfiguration configuration)
|
|
{
|
|
return new LobbyClient(configuration);
|
|
}
|
|
}
|
|
|
|
/// <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(LobbyBase serviceImpl)
|
|
{
|
|
return grpc::ServerServiceDefinition.CreateBuilder()
|
|
.AddMethod(__Method_getGames, serviceImpl.getGames)
|
|
.AddMethod(__Method_vote, serviceImpl.vote)
|
|
.AddMethod(__Method_ready, serviceImpl.ready)
|
|
.AddMethod(__Method_status, serviceImpl.status).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, LobbyBase serviceImpl)
|
|
{
|
|
serviceBinder.AddMethod(__Method_getGames, serviceImpl == null ? null : new grpc::ServerStreamingServerMethod<global::Game.Null, global::Game.Game>(serviceImpl.getGames));
|
|
serviceBinder.AddMethod(__Method_vote, serviceImpl == null ? null : new grpc::UnaryServerMethod<global::Game.Vote, global::Game.Null>(serviceImpl.vote));
|
|
serviceBinder.AddMethod(__Method_ready, serviceImpl == null ? null : new grpc::UnaryServerMethod<global::Game.Null, global::Game.Null>(serviceImpl.ready));
|
|
serviceBinder.AddMethod(__Method_status, serviceImpl == null ? null : new grpc::UnaryServerMethod<global::Game.Null, global::Game.LobbyStatus>(serviceImpl.status));
|
|
}
|
|
|
|
}
|
|
}
|
|
#endregion
|
|
|