// // Generated by the protocol buffer compiler. DO NOT EDIT! // source: connection.proto // #pragma warning disable 0414, 1591 #region Designer generated code using grpc = global::Grpc.Core; namespace ConnectionService { /// /// Connection utilities to get a client_id /// public static partial class Connection { static readonly string __ServiceName = "connection_service.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_google_protobuf_Empty = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Protobuf.WellKnownTypes.Empty.Parser)); static readonly grpc::Marshaller __Marshaller_common_Name = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Common.Name.Parser)); static readonly grpc::Marshaller __Marshaller_connection_service_UserID = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::ConnectionService.UserID.Parser)); static readonly grpc::Marshaller __Marshaller_connection_service_LobbyCode = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::ConnectionService.LobbyCode.Parser)); static readonly grpc::Marshaller __Marshaller_connection_service_LobbyConfig = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::ConnectionService.LobbyConfig.Parser)); static readonly grpc::Marshaller __Marshaller_connection_service_Game = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::ConnectionService.Game.Parser)); static readonly grpc::Method __Method_name = new grpc::Method( grpc::MethodType.Unary, __ServiceName, "name", __Marshaller_google_protobuf_Empty, __Marshaller_common_Name); static readonly grpc::Method __Method_connect = new grpc::Method( grpc::MethodType.Unary, __ServiceName, "connect", __Marshaller_common_Name, __Marshaller_connection_service_UserID); static readonly grpc::Method __Method_joinLobbyWithCode = new grpc::Method( grpc::MethodType.Unary, __ServiceName, "joinLobbyWithCode", __Marshaller_connection_service_LobbyCode, __Marshaller_google_protobuf_Empty); static readonly grpc::Method __Method_createLobby = new grpc::Method( grpc::MethodType.Unary, __ServiceName, "createLobby", __Marshaller_connection_service_LobbyConfig, __Marshaller_connection_service_LobbyCode); static readonly grpc::Method __Method_getGames = new grpc::Method( grpc::MethodType.ServerStreaming, __ServiceName, "getGames", __Marshaller_google_protobuf_Empty, __Marshaller_connection_service_Game); static readonly grpc::Method __Method_getPublicLobbies = new grpc::Method( grpc::MethodType.ServerStreaming, __ServiceName, "getPublicLobbies", __Marshaller_google_protobuf_Empty, __Marshaller_connection_service_LobbyCode); static readonly grpc::Method __Method_disconnect = new grpc::Method( grpc::MethodType.Unary, __ServiceName, "disconnect", __Marshaller_google_protobuf_Empty, __Marshaller_google_protobuf_Empty); /// Service descriptor public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor { get { return global::ConnectionService.ConnectionReflection.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 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 connect(global::Common.Name request, grpc::ServerCallContext context) { throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); } public virtual global::System.Threading.Tasks.Task joinLobbyWithCode(global::ConnectionService.LobbyCode request, grpc::ServerCallContext context) { throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); } public virtual global::System.Threading.Tasks.Task createLobby(global::ConnectionService.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 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 responseStream, grpc::ServerCallContext context) { throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); } public virtual global::System.Threading.Tasks.Task disconnect(global::Google.Protobuf.WellKnownTypes.Empty 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::Common.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::Common.Name name(global::Google.Protobuf.WellKnownTypes.Empty request, grpc::CallOptions options) { return CallInvoker.BlockingUnaryCall(__Method_name, null, options, request); } public virtual grpc::AsyncUnaryCall 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 nameAsync(global::Google.Protobuf.WellKnownTypes.Empty request, grpc::CallOptions options) { return CallInvoker.AsyncUnaryCall(__Method_name, null, options, request); } public virtual global::ConnectionService.UserID connect(global::Common.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::ConnectionService.UserID connect(global::Common.Name request, grpc::CallOptions options) { return CallInvoker.BlockingUnaryCall(__Method_connect, null, options, request); } public virtual grpc::AsyncUnaryCall connectAsync(global::Common.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 connectAsync(global::Common.Name request, grpc::CallOptions options) { return CallInvoker.AsyncUnaryCall(__Method_connect, null, options, request); } public virtual global::Google.Protobuf.WellKnownTypes.Empty joinLobbyWithCode(global::ConnectionService.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::ConnectionService.LobbyCode request, grpc::CallOptions options) { return CallInvoker.BlockingUnaryCall(__Method_joinLobbyWithCode, null, options, request); } public virtual grpc::AsyncUnaryCall joinLobbyWithCodeAsync(global::ConnectionService.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::ConnectionService.LobbyCode request, grpc::CallOptions options) { return CallInvoker.AsyncUnaryCall(__Method_joinLobbyWithCode, null, options, request); } public virtual global::ConnectionService.LobbyCode createLobby(global::ConnectionService.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::ConnectionService.LobbyCode createLobby(global::ConnectionService.LobbyConfig request, grpc::CallOptions options) { return CallInvoker.BlockingUnaryCall(__Method_createLobby, null, options, request); } public virtual grpc::AsyncUnaryCall createLobbyAsync(global::ConnectionService.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 createLobbyAsync(global::ConnectionService.LobbyConfig request, grpc::CallOptions options) { return CallInvoker.AsyncUnaryCall(__Method_createLobby, null, options, request); } public virtual grpc::AsyncServerStreamingCall 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 getGames(global::Google.Protobuf.WellKnownTypes.Empty request, grpc::CallOptions options) { return CallInvoker.AsyncServerStreamingCall(__Method_getGames, null, options, request); } public virtual grpc::AsyncServerStreamingCall 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 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 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 disconnectAsync(global::Google.Protobuf.WellKnownTypes.Empty request, grpc::CallOptions options) { return CallInvoker.AsyncUnaryCall(__Method_disconnect, 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_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(); } /// 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_name, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.name)); 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_createLobby, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.createLobby)); serviceBinder.AddMethod(__Method_getGames, serviceImpl == null ? null : new grpc::ServerStreamingServerMethod(serviceImpl.getGames)); serviceBinder.AddMethod(__Method_getPublicLobbies, serviceImpl == null ? null : new grpc::ServerStreamingServerMethod(serviceImpl.getPublicLobbies)); serviceBinder.AddMethod(__Method_disconnect, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.disconnect)); } } } #endregion