//
// 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 {
///
/// Service to use when user's in a running game
///
public static partial class Game
{
static readonly string __ServiceName = "game.Game";
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_CardKind = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Game.CardKind.Parser));
static readonly grpc::Marshaller __Marshaller_game_Image = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Game.Image.Parser));
static readonly grpc::Marshaller __Marshaller_game_CardId = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Game.CardId.Parser));
static readonly grpc::Marshaller __Marshaller_google_protobuf_Empty = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Protobuf.WellKnownTypes.Empty.Parser));
static readonly grpc::Marshaller __Marshaller_game_MessageStatus = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Game.MessageStatus.Parser));
static readonly grpc::Marshaller __Marshaller_common_LastStatusTimestamp = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Common.LastStatusTimestamp.Parser));
static readonly grpc::Marshaller __Marshaller_common_HasNewStatus = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Common.HasNewStatus.Parser));
static readonly grpc::Method __Method_getCardImage = new grpc::Method(
grpc::MethodType.Unary,
__ServiceName,
"getCardImage",
__Marshaller_game_CardKind,
__Marshaller_game_Image);
static readonly grpc::Method __Method_onClick = new grpc::Method(
grpc::MethodType.Unary,
__ServiceName,
"onClick",
__Marshaller_game_CardId,
__Marshaller_google_protobuf_Empty);
static readonly grpc::Method __Method_status = new grpc::Method(
grpc::MethodType.Unary,
__ServiceName,
"status",
__Marshaller_google_protobuf_Empty,
__Marshaller_game_MessageStatus);
static readonly grpc::Method __Method_pollStatus = new grpc::Method(
grpc::MethodType.Unary,
__ServiceName,
"pollStatus",
__Marshaller_common_LastStatusTimestamp,
__Marshaller_common_HasNewStatus);
/// 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 Game
[grpc::BindServiceMethod(typeof(Game), "BindService")]
public abstract partial class GameBase
{
public virtual global::System.Threading.Tasks.Task getCardImage(global::Game.CardKind request, grpc::ServerCallContext context)
{
throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
}
public virtual global::System.Threading.Tasks.Task onClick(global::Game.CardId request, grpc::ServerCallContext context)
{
throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
}
public virtual global::System.Threading.Tasks.Task status(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 pollStatus(global::Common.LastStatusTimestamp request, grpc::ServerCallContext context)
{
throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
}
}
/// Client for Game
public partial class GameClient : grpc::ClientBase
{
/// Creates a new client for Game
/// The channel to use to make remote calls.
public GameClient(grpc::ChannelBase channel) : base(channel)
{
}
/// Creates a new client for Game that uses a custom CallInvoker.
/// The callInvoker to use to make remote calls.
public GameClient(grpc::CallInvoker callInvoker) : base(callInvoker)
{
}
/// Protected parameterless constructor to allow creation of test doubles.
protected GameClient() : base()
{
}
/// Protected constructor to allow creation of configured clients.
/// The client configuration.
protected GameClient(ClientBaseConfiguration configuration) : base(configuration)
{
}
public virtual global::Game.Image getCardImage(global::Game.CardKind 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.CardKind request, grpc::CallOptions options)
{
return CallInvoker.BlockingUnaryCall(__Method_getCardImage, null, options, request);
}
public virtual grpc::AsyncUnaryCall getCardImageAsync(global::Game.CardKind 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 getCardImageAsync(global::Game.CardKind request, grpc::CallOptions options)
{
return CallInvoker.AsyncUnaryCall(__Method_getCardImage, null, options, request);
}
public virtual global::Google.Protobuf.WellKnownTypes.Empty onClick(global::Game.CardId request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
{
return onClick(request, new grpc::CallOptions(headers, deadline, cancellationToken));
}
public virtual global::Google.Protobuf.WellKnownTypes.Empty onClick(global::Game.CardId request, grpc::CallOptions options)
{
return CallInvoker.BlockingUnaryCall(__Method_onClick, null, options, request);
}
public virtual grpc::AsyncUnaryCall onClickAsync(global::Game.CardId request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
{
return onClickAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken));
}
public virtual grpc::AsyncUnaryCall onClickAsync(global::Game.CardId request, grpc::CallOptions options)
{
return CallInvoker.AsyncUnaryCall(__Method_onClick, null, options, request);
}
public virtual global::Game.MessageStatus status(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 status(request, new grpc::CallOptions(headers, deadline, cancellationToken));
}
public virtual global::Game.MessageStatus status(global::Google.Protobuf.WellKnownTypes.Empty request, grpc::CallOptions options)
{
return CallInvoker.BlockingUnaryCall(__Method_status, null, options, request);
}
public virtual grpc::AsyncUnaryCall statusAsync(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 statusAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken));
}
public virtual grpc::AsyncUnaryCall statusAsync(global::Google.Protobuf.WellKnownTypes.Empty request, grpc::CallOptions options)
{
return CallInvoker.AsyncUnaryCall(__Method_status, null, options, request);
}
public virtual global::Common.HasNewStatus pollStatus(global::Common.LastStatusTimestamp request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
{
return pollStatus(request, new grpc::CallOptions(headers, deadline, cancellationToken));
}
public virtual global::Common.HasNewStatus pollStatus(global::Common.LastStatusTimestamp request, grpc::CallOptions options)
{
return CallInvoker.BlockingUnaryCall(__Method_pollStatus, null, options, request);
}
public virtual grpc::AsyncUnaryCall pollStatusAsync(global::Common.LastStatusTimestamp request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
{
return pollStatusAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken));
}
public virtual grpc::AsyncUnaryCall pollStatusAsync(global::Common.LastStatusTimestamp request, grpc::CallOptions options)
{
return CallInvoker.AsyncUnaryCall(__Method_pollStatus, null, options, request);
}
/// Creates a new instance of client from given ClientBaseConfiguration.
protected override GameClient NewInstance(ClientBaseConfiguration configuration)
{
return new GameClient(configuration);
}
}
/// Creates service definition that can be registered with a server
/// An object implementing the server-side handling logic.
public static grpc::ServerServiceDefinition BindService(GameBase serviceImpl)
{
return grpc::ServerServiceDefinition.CreateBuilder()
.AddMethod(__Method_getCardImage, serviceImpl.getCardImage)
.AddMethod(__Method_onClick, serviceImpl.onClick)
.AddMethod(__Method_status, serviceImpl.status)
.AddMethod(__Method_pollStatus, serviceImpl.pollStatus).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, GameBase serviceImpl)
{
serviceBinder.AddMethod(__Method_getCardImage, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.getCardImage));
serviceBinder.AddMethod(__Method_onClick, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.onClick));
serviceBinder.AddMethod(__Method_status, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.status));
serviceBinder.AddMethod(__Method_pollStatus, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.pollStatus));
}
}
}
#endregion