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.
 
 
 
 
 

614 lines
41 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>
/// Connection utilities to get a client_id
/// </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::Google.Protobuf.WellKnownTypes.Empty> __Marshaller_google_protobuf_Empty = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Protobuf.WellKnownTypes.Empty.Parser));
static readonly grpc::Marshaller<global::Game.Name> __Marshaller_game_Name = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Game.Name.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.LobbyConfig> __Marshaller_game_LobbyConfig = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Game.LobbyConfig.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::Method<global::Google.Protobuf.WellKnownTypes.Empty, global::Game.Name> __Method_name = new grpc::Method<global::Google.Protobuf.WellKnownTypes.Empty, global::Game.Name>(
grpc::MethodType.Unary,
__ServiceName,
"name",
__Marshaller_google_protobuf_Empty,
__Marshaller_game_Name);
static readonly grpc::Method<global::Game.Name, global::Game.UserID> __Method_connect = new grpc::Method<global::Game.Name, global::Game.UserID>(
grpc::MethodType.Unary,
__ServiceName,
"connect",
__Marshaller_game_Name,
__Marshaller_game_UserID);
static readonly grpc::Method<global::Game.LobbyCode, global::Google.Protobuf.WellKnownTypes.Empty> __Method_joinLobbyWithCode = new grpc::Method<global::Game.LobbyCode, global::Google.Protobuf.WellKnownTypes.Empty>(
grpc::MethodType.Unary,
__ServiceName,
"joinLobbyWithCode",
__Marshaller_game_LobbyCode,
__Marshaller_google_protobuf_Empty);
static readonly grpc::Method<global::Game.LobbyConfig, global::Game.LobbyCode> __Method_createLobby = new grpc::Method<global::Game.LobbyConfig, global::Game.LobbyCode>(
grpc::MethodType.Unary,
__ServiceName,
"createLobby",
__Marshaller_game_LobbyConfig,
__Marshaller_game_LobbyCode);
static readonly grpc::Method<global::Google.Protobuf.WellKnownTypes.Empty, global::Game.Game> __Method_getGames = new grpc::Method<global::Google.Protobuf.WellKnownTypes.Empty, global::Game.Game>(
grpc::MethodType.ServerStreaming,
__ServiceName,
"getGames",
__Marshaller_google_protobuf_Empty,
__Marshaller_game_Game);
static readonly grpc::Method<global::Google.Protobuf.WellKnownTypes.Empty, global::Game.LobbyCode> __Method_getPublicLobbies = new grpc::Method<global::Google.Protobuf.WellKnownTypes.Empty, global::Game.LobbyCode>(
grpc::MethodType.ServerStreaming,
__ServiceName,
"getPublicLobbies",
__Marshaller_google_protobuf_Empty,
__Marshaller_game_LobbyCode);
static readonly grpc::Method<global::Google.Protobuf.WellKnownTypes.Empty, global::Google.Protobuf.WellKnownTypes.Empty> __Method_disconnect = new grpc::Method<global::Google.Protobuf.WellKnownTypes.Empty, global::Google.Protobuf.WellKnownTypes.Empty>(
grpc::MethodType.Unary,
__ServiceName,
"disconnect",
__Marshaller_google_protobuf_Empty,
__Marshaller_google_protobuf_Empty);
/// <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.Name> name(global::Google.Protobuf.WellKnownTypes.Empty request, grpc::ServerCallContext context)
{
throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
}
public virtual global::System.Threading.Tasks.Task<global::Game.UserID> connect(global::Game.Name request, grpc::ServerCallContext context)
{
throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
}
public virtual global::System.Threading.Tasks.Task<global::Google.Protobuf.WellKnownTypes.Empty> 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> createLobby(global::Game.LobbyConfig request, grpc::ServerCallContext context)
{
throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
}
public virtual global::System.Threading.Tasks.Task getGames(global::Google.Protobuf.WellKnownTypes.Empty 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 getPublicLobbies(global::Google.Protobuf.WellKnownTypes.Empty request, grpc::IServerStreamWriter<global::Game.LobbyCode> responseStream, grpc::ServerCallContext context)
{
throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
}
public virtual global::System.Threading.Tasks.Task<global::Google.Protobuf.WellKnownTypes.Empty> disconnect(global::Google.Protobuf.WellKnownTypes.Empty 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.Name name(global::Google.Protobuf.WellKnownTypes.Empty request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
{
return name(request, new grpc::CallOptions(headers, deadline, cancellationToken));
}
public virtual global::Game.Name name(global::Google.Protobuf.WellKnownTypes.Empty request, grpc::CallOptions options)
{
return CallInvoker.BlockingUnaryCall(__Method_name, null, options, request);
}
public virtual grpc::AsyncUnaryCall<global::Game.Name> nameAsync(global::Google.Protobuf.WellKnownTypes.Empty request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
{
return nameAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken));
}
public virtual grpc::AsyncUnaryCall<global::Game.Name> nameAsync(global::Google.Protobuf.WellKnownTypes.Empty request, grpc::CallOptions options)
{
return CallInvoker.AsyncUnaryCall(__Method_name, null, options, request);
}
public virtual global::Game.UserID connect(global::Game.Name 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.Name request, grpc::CallOptions options)
{
return CallInvoker.BlockingUnaryCall(__Method_connect, null, options, request);
}
public virtual grpc::AsyncUnaryCall<global::Game.UserID> connectAsync(global::Game.Name 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.Name request, grpc::CallOptions options)
{
return CallInvoker.AsyncUnaryCall(__Method_connect, null, options, request);
}
public virtual global::Google.Protobuf.WellKnownTypes.Empty 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::Google.Protobuf.WellKnownTypes.Empty joinLobbyWithCode(global::Game.LobbyCode request, grpc::CallOptions options)
{
return CallInvoker.BlockingUnaryCall(__Method_joinLobbyWithCode, null, options, request);
}
public virtual grpc::AsyncUnaryCall<global::Google.Protobuf.WellKnownTypes.Empty> 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::Google.Protobuf.WellKnownTypes.Empty> joinLobbyWithCodeAsync(global::Game.LobbyCode request, grpc::CallOptions options)
{
return CallInvoker.AsyncUnaryCall(__Method_joinLobbyWithCode, null, options, request);
}
public virtual global::Game.LobbyCode createLobby(global::Game.LobbyConfig request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
{
return createLobby(request, new grpc::CallOptions(headers, deadline, cancellationToken));
}
public virtual global::Game.LobbyCode createLobby(global::Game.LobbyConfig request, grpc::CallOptions options)
{
return CallInvoker.BlockingUnaryCall(__Method_createLobby, null, options, request);
}
public virtual grpc::AsyncUnaryCall<global::Game.LobbyCode> createLobbyAsync(global::Game.LobbyConfig request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
{
return createLobbyAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken));
}
public virtual grpc::AsyncUnaryCall<global::Game.LobbyCode> createLobbyAsync(global::Game.LobbyConfig request, grpc::CallOptions options)
{
return CallInvoker.AsyncUnaryCall(__Method_createLobby, null, options, request);
}
public virtual grpc::AsyncServerStreamingCall<global::Game.Game> getGames(global::Google.Protobuf.WellKnownTypes.Empty 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::Google.Protobuf.WellKnownTypes.Empty request, grpc::CallOptions options)
{
return CallInvoker.AsyncServerStreamingCall(__Method_getGames, null, options, request);
}
public virtual grpc::AsyncServerStreamingCall<global::Game.LobbyCode> getPublicLobbies(global::Google.Protobuf.WellKnownTypes.Empty request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
{
return getPublicLobbies(request, new grpc::CallOptions(headers, deadline, cancellationToken));
}
public virtual grpc::AsyncServerStreamingCall<global::Game.LobbyCode> getPublicLobbies(global::Google.Protobuf.WellKnownTypes.Empty request, grpc::CallOptions options)
{
return CallInvoker.AsyncServerStreamingCall(__Method_getPublicLobbies, null, options, request);
}
public virtual global::Google.Protobuf.WellKnownTypes.Empty disconnect(global::Google.Protobuf.WellKnownTypes.Empty request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
{
return disconnect(request, new grpc::CallOptions(headers, deadline, cancellationToken));
}
public virtual global::Google.Protobuf.WellKnownTypes.Empty disconnect(global::Google.Protobuf.WellKnownTypes.Empty request, grpc::CallOptions options)
{
return CallInvoker.BlockingUnaryCall(__Method_disconnect, null, options, request);
}
public virtual grpc::AsyncUnaryCall<global::Google.Protobuf.WellKnownTypes.Empty> disconnectAsync(global::Google.Protobuf.WellKnownTypes.Empty request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
{
return disconnectAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken));
}
public virtual grpc::AsyncUnaryCall<global::Google.Protobuf.WellKnownTypes.Empty> disconnectAsync(global::Google.Protobuf.WellKnownTypes.Empty request, grpc::CallOptions options)
{
return CallInvoker.AsyncUnaryCall(__Method_disconnect, 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_name, serviceImpl.name)
.AddMethod(__Method_connect, serviceImpl.connect)
.AddMethod(__Method_joinLobbyWithCode, serviceImpl.joinLobbyWithCode)
.AddMethod(__Method_createLobby, serviceImpl.createLobby)
.AddMethod(__Method_getGames, serviceImpl.getGames)
.AddMethod(__Method_getPublicLobbies, serviceImpl.getPublicLobbies)
.AddMethod(__Method_disconnect, serviceImpl.disconnect).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_name, serviceImpl == null ? null : new grpc::UnaryServerMethod<global::Google.Protobuf.WellKnownTypes.Empty, global::Game.Name>(serviceImpl.name));
serviceBinder.AddMethod(__Method_connect, serviceImpl == null ? null : new grpc::UnaryServerMethod<global::Game.Name, global::Game.UserID>(serviceImpl.connect));
serviceBinder.AddMethod(__Method_joinLobbyWithCode, serviceImpl == null ? null : new grpc::UnaryServerMethod<global::Game.LobbyCode, global::Google.Protobuf.WellKnownTypes.Empty>(serviceImpl.joinLobbyWithCode));
serviceBinder.AddMethod(__Method_createLobby, serviceImpl == null ? null : new grpc::UnaryServerMethod<global::Game.LobbyConfig, global::Game.LobbyCode>(serviceImpl.createLobby));
serviceBinder.AddMethod(__Method_getGames, serviceImpl == null ? null : new grpc::ServerStreamingServerMethod<global::Google.Protobuf.WellKnownTypes.Empty, global::Game.Game>(serviceImpl.getGames));
serviceBinder.AddMethod(__Method_getPublicLobbies, serviceImpl == null ? null : new grpc::ServerStreamingServerMethod<global::Google.Protobuf.WellKnownTypes.Empty, global::Game.LobbyCode>(serviceImpl.getPublicLobbies));
serviceBinder.AddMethod(__Method_disconnect, serviceImpl == null ? null : new grpc::UnaryServerMethod<global::Google.Protobuf.WellKnownTypes.Empty, global::Google.Protobuf.WellKnownTypes.Empty>(serviceImpl.disconnect));
}
}
/// <summary>
/// Lobby functionality (client_id required for most of them)
/// </summary>
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.CardID> __Marshaller_game_CardID = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Game.CardID.Parser));
static readonly grpc::Marshaller<global::Game.Image> __Marshaller_game_Image = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Game.Image.Parser));
static readonly grpc::Marshaller<global::Google.Protobuf.WellKnownTypes.Empty> __Marshaller_google_protobuf_Empty = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Protobuf.WellKnownTypes.Empty.Parser));
static readonly grpc::Marshaller<global::Game.Name> __Marshaller_game_Name = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Game.Name.Parser));
static readonly grpc::Marshaller<global::Game.SingleVote> __Marshaller_game_SingleVote = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Game.SingleVote.Parser));
static readonly grpc::Marshaller<global::Game.LastStatusTimestamp> __Marshaller_game_LastStatusTimestamp = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Game.LastStatusTimestamp.Parser));
static readonly grpc::Marshaller<global::Game.HasNewStatus> __Marshaller_game_HasNewStatus = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Game.HasNewStatus.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.CardID, global::Game.Image> __Method_getCardImage = new grpc::Method<global::Game.CardID, global::Game.Image>(
grpc::MethodType.Unary,
__ServiceName,
"getCardImage",
__Marshaller_game_CardID,
__Marshaller_game_Image);
static readonly grpc::Method<global::Google.Protobuf.WellKnownTypes.Empty, global::Game.Name> __Method_users = new grpc::Method<global::Google.Protobuf.WellKnownTypes.Empty, global::Game.Name>(
grpc::MethodType.ServerStreaming,
__ServiceName,
"users",
__Marshaller_google_protobuf_Empty,
__Marshaller_game_Name);
static readonly grpc::Method<global::Game.SingleVote, global::Google.Protobuf.WellKnownTypes.Empty> __Method_vote = new grpc::Method<global::Game.SingleVote, global::Google.Protobuf.WellKnownTypes.Empty>(
grpc::MethodType.Unary,
__ServiceName,
"vote",
__Marshaller_game_SingleVote,
__Marshaller_google_protobuf_Empty);
static readonly grpc::Method<global::Google.Protobuf.WellKnownTypes.Empty, global::Google.Protobuf.WellKnownTypes.Empty> __Method_ready = new grpc::Method<global::Google.Protobuf.WellKnownTypes.Empty, global::Google.Protobuf.WellKnownTypes.Empty>(
grpc::MethodType.Unary,
__ServiceName,
"ready",
__Marshaller_google_protobuf_Empty,
__Marshaller_google_protobuf_Empty);
static readonly grpc::Method<global::Game.LastStatusTimestamp, global::Game.HasNewStatus> __Method_hasNewStatus = new grpc::Method<global::Game.LastStatusTimestamp, global::Game.HasNewStatus>(
grpc::MethodType.Unary,
__ServiceName,
"hasNewStatus",
__Marshaller_game_LastStatusTimestamp,
__Marshaller_game_HasNewStatus);
static readonly grpc::Method<global::Google.Protobuf.WellKnownTypes.Empty, global::Game.LobbyStatus> __Method_getStatus = new grpc::Method<global::Google.Protobuf.WellKnownTypes.Empty, global::Game.LobbyStatus>(
grpc::MethodType.Unary,
__ServiceName,
"getStatus",
__Marshaller_google_protobuf_Empty,
__Marshaller_game_LobbyStatus);
static readonly grpc::Method<global::Google.Protobuf.WellKnownTypes.Empty, global::Google.Protobuf.WellKnownTypes.Empty> __Method_leave = new grpc::Method<global::Google.Protobuf.WellKnownTypes.Empty, global::Google.Protobuf.WellKnownTypes.Empty>(
grpc::MethodType.Unary,
__ServiceName,
"leave",
__Marshaller_google_protobuf_Empty,
__Marshaller_google_protobuf_Empty);
/// <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<global::Game.Image> getCardImage(global::Game.CardID request, grpc::ServerCallContext context)
{
throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
}
public virtual global::System.Threading.Tasks.Task users(global::Google.Protobuf.WellKnownTypes.Empty request, grpc::IServerStreamWriter<global::Game.Name> responseStream, grpc::ServerCallContext context)
{
throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
}
public virtual global::System.Threading.Tasks.Task<global::Google.Protobuf.WellKnownTypes.Empty> vote(global::Game.SingleVote request, grpc::ServerCallContext context)
{
throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
}
public virtual global::System.Threading.Tasks.Task<global::Google.Protobuf.WellKnownTypes.Empty> ready(global::Google.Protobuf.WellKnownTypes.Empty request, grpc::ServerCallContext context)
{
throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
}
public virtual global::System.Threading.Tasks.Task<global::Game.HasNewStatus> hasNewStatus(global::Game.LastStatusTimestamp request, grpc::ServerCallContext context)
{
throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
}
public virtual global::System.Threading.Tasks.Task<global::Game.LobbyStatus> getStatus(global::Google.Protobuf.WellKnownTypes.Empty request, grpc::ServerCallContext context)
{
throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
}
public virtual global::System.Threading.Tasks.Task<global::Google.Protobuf.WellKnownTypes.Empty> leave(global::Google.Protobuf.WellKnownTypes.Empty 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 global::Game.Image getCardImage(global::Game.CardID request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
{
return getCardImage(request, new grpc::CallOptions(headers, deadline, cancellationToken));
}
public virtual global::Game.Image getCardImage(global::Game.CardID request, grpc::CallOptions options)
{
return CallInvoker.BlockingUnaryCall(__Method_getCardImage, null, options, request);
}
public virtual grpc::AsyncUnaryCall<global::Game.Image> getCardImageAsync(global::Game.CardID request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
{
return getCardImageAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken));
}
public virtual grpc::AsyncUnaryCall<global::Game.Image> getCardImageAsync(global::Game.CardID request, grpc::CallOptions options)
{
return CallInvoker.AsyncUnaryCall(__Method_getCardImage, null, options, request);
}
public virtual grpc::AsyncServerStreamingCall<global::Game.Name> users(global::Google.Protobuf.WellKnownTypes.Empty request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
{
return users(request, new grpc::CallOptions(headers, deadline, cancellationToken));
}
public virtual grpc::AsyncServerStreamingCall<global::Game.Name> users(global::Google.Protobuf.WellKnownTypes.Empty request, grpc::CallOptions options)
{
return CallInvoker.AsyncServerStreamingCall(__Method_users, null, options, request);
}
public virtual global::Google.Protobuf.WellKnownTypes.Empty vote(global::Game.SingleVote 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::Google.Protobuf.WellKnownTypes.Empty vote(global::Game.SingleVote request, grpc::CallOptions options)
{
return CallInvoker.BlockingUnaryCall(__Method_vote, null, options, request);
}
public virtual grpc::AsyncUnaryCall<global::Google.Protobuf.WellKnownTypes.Empty> voteAsync(global::Game.SingleVote 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::Google.Protobuf.WellKnownTypes.Empty> voteAsync(global::Game.SingleVote request, grpc::CallOptions options)
{
return CallInvoker.AsyncUnaryCall(__Method_vote, null, options, request);
}
public virtual global::Google.Protobuf.WellKnownTypes.Empty ready(global::Google.Protobuf.WellKnownTypes.Empty 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::Google.Protobuf.WellKnownTypes.Empty ready(global::Google.Protobuf.WellKnownTypes.Empty request, grpc::CallOptions options)
{
return CallInvoker.BlockingUnaryCall(__Method_ready, null, options, request);
}
public virtual grpc::AsyncUnaryCall<global::Google.Protobuf.WellKnownTypes.Empty> readyAsync(global::Google.Protobuf.WellKnownTypes.Empty 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::Google.Protobuf.WellKnownTypes.Empty> readyAsync(global::Google.Protobuf.WellKnownTypes.Empty request, grpc::CallOptions options)
{
return CallInvoker.AsyncUnaryCall(__Method_ready, null, options, request);
}
public virtual global::Game.HasNewStatus hasNewStatus(global::Game.LastStatusTimestamp request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
{
return hasNewStatus(request, new grpc::CallOptions(headers, deadline, cancellationToken));
}
public virtual global::Game.HasNewStatus hasNewStatus(global::Game.LastStatusTimestamp request, grpc::CallOptions options)
{
return CallInvoker.BlockingUnaryCall(__Method_hasNewStatus, null, options, request);
}
public virtual grpc::AsyncUnaryCall<global::Game.HasNewStatus> hasNewStatusAsync(global::Game.LastStatusTimestamp request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
{
return hasNewStatusAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken));
}
public virtual grpc::AsyncUnaryCall<global::Game.HasNewStatus> hasNewStatusAsync(global::Game.LastStatusTimestamp request, grpc::CallOptions options)
{
return CallInvoker.AsyncUnaryCall(__Method_hasNewStatus, null, options, request);
}
public virtual global::Game.LobbyStatus getStatus(global::Google.Protobuf.WellKnownTypes.Empty request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
{
return getStatus(request, new grpc::CallOptions(headers, deadline, cancellationToken));
}
public virtual global::Game.LobbyStatus getStatus(global::Google.Protobuf.WellKnownTypes.Empty request, grpc::CallOptions options)
{
return CallInvoker.BlockingUnaryCall(__Method_getStatus, null, options, request);
}
public virtual grpc::AsyncUnaryCall<global::Game.LobbyStatus> getStatusAsync(global::Google.Protobuf.WellKnownTypes.Empty request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
{
return getStatusAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken));
}
public virtual grpc::AsyncUnaryCall<global::Game.LobbyStatus> getStatusAsync(global::Google.Protobuf.WellKnownTypes.Empty request, grpc::CallOptions options)
{
return CallInvoker.AsyncUnaryCall(__Method_getStatus, null, options, request);
}
public virtual global::Google.Protobuf.WellKnownTypes.Empty leave(global::Google.Protobuf.WellKnownTypes.Empty request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
{
return leave(request, new grpc::CallOptions(headers, deadline, cancellationToken));
}
public virtual global::Google.Protobuf.WellKnownTypes.Empty leave(global::Google.Protobuf.WellKnownTypes.Empty request, grpc::CallOptions options)
{
return CallInvoker.BlockingUnaryCall(__Method_leave, null, options, request);
}
public virtual grpc::AsyncUnaryCall<global::Google.Protobuf.WellKnownTypes.Empty> leaveAsync(global::Google.Protobuf.WellKnownTypes.Empty request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
{
return leaveAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken));
}
public virtual grpc::AsyncUnaryCall<global::Google.Protobuf.WellKnownTypes.Empty> leaveAsync(global::Google.Protobuf.WellKnownTypes.Empty request, grpc::CallOptions options)
{
return CallInvoker.AsyncUnaryCall(__Method_leave, 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_getCardImage, serviceImpl.getCardImage)
.AddMethod(__Method_users, serviceImpl.users)
.AddMethod(__Method_vote, serviceImpl.vote)
.AddMethod(__Method_ready, serviceImpl.ready)
.AddMethod(__Method_hasNewStatus, serviceImpl.hasNewStatus)
.AddMethod(__Method_getStatus, serviceImpl.getStatus)
.AddMethod(__Method_leave, serviceImpl.leave).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_getCardImage, serviceImpl == null ? null : new grpc::UnaryServerMethod<global::Game.CardID, global::Game.Image>(serviceImpl.getCardImage));
serviceBinder.AddMethod(__Method_users, serviceImpl == null ? null : new grpc::ServerStreamingServerMethod<global::Google.Protobuf.WellKnownTypes.Empty, global::Game.Name>(serviceImpl.users));
serviceBinder.AddMethod(__Method_vote, serviceImpl == null ? null : new grpc::UnaryServerMethod<global::Game.SingleVote, global::Google.Protobuf.WellKnownTypes.Empty>(serviceImpl.vote));
serviceBinder.AddMethod(__Method_ready, serviceImpl == null ? null : new grpc::UnaryServerMethod<global::Google.Protobuf.WellKnownTypes.Empty, global::Google.Protobuf.WellKnownTypes.Empty>(serviceImpl.ready));
serviceBinder.AddMethod(__Method_hasNewStatus, serviceImpl == null ? null : new grpc::UnaryServerMethod<global::Game.LastStatusTimestamp, global::Game.HasNewStatus>(serviceImpl.hasNewStatus));
serviceBinder.AddMethod(__Method_getStatus, serviceImpl == null ? null : new grpc::UnaryServerMethod<global::Google.Protobuf.WellKnownTypes.Empty, global::Game.LobbyStatus>(serviceImpl.getStatus));
serviceBinder.AddMethod(__Method_leave, serviceImpl == null ? null : new grpc::UnaryServerMethod<global::Google.Protobuf.WellKnownTypes.Empty, global::Google.Protobuf.WellKnownTypes.Empty>(serviceImpl.leave));
}
}
}
#endregion