//
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: game.proto
//
#pragma warning disable 0414, 1591
#region Designer generated code
using grpc = global::Grpc.Core;
namespace Game {
///
/// Interface exported by the server.
///
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
{
public static readonly bool IsBufferMessage = global::System.Reflection.IntrospectionExtensions.GetTypeInfo(typeof(global::Google.Protobuf.IBufferMessage)).IsAssignableFrom(typeof(T));
}
static T __Helper_DeserializeMessage(grpc::DeserializationContext context, global::Google.Protobuf.MessageParser parser) where T : global::Google.Protobuf.IMessage
{
#if !GRPC_DISABLE_PROTOBUF_BUFFER_SERIALIZATION
if (__Helper_MessageCache.IsBufferMessage)
{
return parser.ParseFrom(context.PayloadAsReadOnlySequence());
}
#endif
return parser.ParseFrom(context.PayloadAsNewBuffer());
}
static readonly grpc::Marshaller __Marshaller_game_Username = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Game.Username.Parser));
static readonly grpc::Marshaller __Marshaller_game_UserID = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Game.UserID.Parser));
static readonly grpc::Marshaller __Marshaller_game_LobbyCode = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Game.LobbyCode.Parser));
static readonly grpc::Marshaller __Marshaller_game_Null = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Game.Null.Parser));
static readonly grpc::Method __Method_connect = new grpc::Method(
grpc::MethodType.Unary,
__ServiceName,
"connect",
__Marshaller_game_Username,
__Marshaller_game_UserID);
static readonly grpc::Method __Method_joinLobbyWithCode = new grpc::Method(
grpc::MethodType.Unary,
__ServiceName,
"joinLobbyWithCode",
__Marshaller_game_LobbyCode,
__Marshaller_game_Null);
static readonly grpc::Method __Method_joinLobbyWithoutCode = new grpc::Method(
grpc::MethodType.Unary,
__ServiceName,
"joinLobbyWithoutCode",
__Marshaller_game_Null,
__Marshaller_game_LobbyCode);
/// Service descriptor
public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor
{
get { return global::Game.GameReflection.Descriptor.Services[0]; }
}
/// Base class for server-side implementations of Connection
[grpc::BindServiceMethod(typeof(Connection), "BindService")]
public abstract partial class ConnectionBase
{
public virtual global::System.Threading.Tasks.Task 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 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 joinLobbyWithoutCode(global::Game.Null request, grpc::ServerCallContext context)
{
throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
}
}
/// Client for Connection
public partial class ConnectionClient : grpc::ClientBase
{
/// Creates a new client for Connection
/// The channel to use to make remote calls.
public ConnectionClient(grpc::ChannelBase channel) : base(channel)
{
}
/// Creates a new client for Connection that uses a custom CallInvoker.
/// The callInvoker to use to make remote calls.
public ConnectionClient(grpc::CallInvoker callInvoker) : base(callInvoker)
{
}
/// Protected parameterless constructor to allow creation of test doubles.
protected ConnectionClient() : base()
{
}
/// Protected constructor to allow creation of configured clients.
/// The client configuration.
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 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 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 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 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 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 joinLobbyWithoutCodeAsync(global::Game.Null request, grpc::CallOptions options)
{
return CallInvoker.AsyncUnaryCall(__Method_joinLobbyWithoutCode, null, options, request);
}
/// Creates a new instance of client from given ClientBaseConfiguration.
protected override ConnectionClient NewInstance(ClientBaseConfiguration configuration)
{
return new ConnectionClient(configuration);
}
}
/// Creates service definition that can be registered with a server
/// An object implementing the server-side handling logic.
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();
}
/// 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.
/// Service methods will be bound by calling AddMethod on this object.
/// An object implementing the server-side handling logic.
public static void BindService(grpc::ServiceBinderBase serviceBinder, ConnectionBase serviceImpl)
{
serviceBinder.AddMethod(__Method_connect, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.connect));
serviceBinder.AddMethod(__Method_joinLobbyWithCode, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.joinLobbyWithCode));
serviceBinder.AddMethod(__Method_joinLobbyWithoutCode, serviceImpl == null ? null : new grpc::UnaryServerMethod(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
{
public static readonly bool IsBufferMessage = global::System.Reflection.IntrospectionExtensions.GetTypeInfo(typeof(global::Google.Protobuf.IBufferMessage)).IsAssignableFrom(typeof(T));
}
static T __Helper_DeserializeMessage(grpc::DeserializationContext context, global::Google.Protobuf.MessageParser parser) where T : global::Google.Protobuf.IMessage
{
#if !GRPC_DISABLE_PROTOBUF_BUFFER_SERIALIZATION
if (__Helper_MessageCache.IsBufferMessage)
{
return parser.ParseFrom(context.PayloadAsReadOnlySequence());
}
#endif
return parser.ParseFrom(context.PayloadAsNewBuffer());
}
static readonly grpc::Marshaller __Marshaller_game_Null = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Game.Null.Parser));
static readonly grpc::Marshaller __Marshaller_game_Game = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Game.Game.Parser));
static readonly grpc::Marshaller __Marshaller_game_Vote = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Game.Vote.Parser));
static readonly grpc::Marshaller __Marshaller_game_LobbyStatus = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Game.LobbyStatus.Parser));
static readonly grpc::Method __Method_getGames = new grpc::Method(
grpc::MethodType.ServerStreaming,
__ServiceName,
"getGames",
__Marshaller_game_Null,
__Marshaller_game_Game);
static readonly grpc::Method __Method_vote = new grpc::Method(
grpc::MethodType.Unary,
__ServiceName,
"vote",
__Marshaller_game_Vote,
__Marshaller_game_Null);
static readonly grpc::Method __Method_ready = new grpc::Method(
grpc::MethodType.Unary,
__ServiceName,
"ready",
__Marshaller_game_Null,
__Marshaller_game_Null);
static readonly grpc::Method __Method_status = new grpc::Method(
grpc::MethodType.Unary,
__ServiceName,
"status",
__Marshaller_game_Null,
__Marshaller_game_LobbyStatus);
/// Service descriptor
public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor
{
get { return global::Game.GameReflection.Descriptor.Services[1]; }
}
/// Base class for server-side implementations of Lobby
[grpc::BindServiceMethod(typeof(Lobby), "BindService")]
public abstract partial class LobbyBase
{
public virtual global::System.Threading.Tasks.Task getGames(global::Game.Null request, grpc::IServerStreamWriter responseStream, grpc::ServerCallContext context)
{
throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
}
public virtual global::System.Threading.Tasks.Task 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 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 status(global::Game.Null request, grpc::ServerCallContext context)
{
throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
}
}
/// Client for Lobby
public partial class LobbyClient : grpc::ClientBase
{
/// Creates a new client for Lobby
/// The channel to use to make remote calls.
public LobbyClient(grpc::ChannelBase channel) : base(channel)
{
}
/// Creates a new client for Lobby that uses a custom CallInvoker.
/// The callInvoker to use to make remote calls.
public LobbyClient(grpc::CallInvoker callInvoker) : base(callInvoker)
{
}
/// Protected parameterless constructor to allow creation of test doubles.
protected LobbyClient() : base()
{
}
/// Protected constructor to allow creation of configured clients.
/// The client configuration.
protected LobbyClient(ClientBaseConfiguration configuration) : base(configuration)
{
}
public virtual grpc::AsyncServerStreamingCall 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 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 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 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 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 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 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 statusAsync(global::Game.Null request, grpc::CallOptions options)
{
return CallInvoker.AsyncUnaryCall(__Method_status, null, options, request);
}
/// Creates a new instance of client from given ClientBaseConfiguration.
protected override LobbyClient NewInstance(ClientBaseConfiguration configuration)
{
return new LobbyClient(configuration);
}
}
/// Creates service definition that can be registered with a server
/// An object implementing the server-side handling logic.
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();
}
/// 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.
/// Service methods will be bound by calling AddMethod on this object.
/// An object implementing the server-side handling logic.
public static void BindService(grpc::ServiceBinderBase serviceBinder, LobbyBase serviceImpl)
{
serviceBinder.AddMethod(__Method_getGames, serviceImpl == null ? null : new grpc::ServerStreamingServerMethod(serviceImpl.getGames));
serviceBinder.AddMethod(__Method_vote, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.vote));
serviceBinder.AddMethod(__Method_ready, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.ready));
serviceBinder.AddMethod(__Method_status, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.status));
}
}
}
#endregion