Example #1
0
 /// <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, GameServerConfigsServiceBase serviceImpl)
 {
     serviceBinder.AddMethod(__Method_ListGameServerConfigs, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Google.Cloud.Gaming.V1Beta.ListGameServerConfigsRequest, global::Google.Cloud.Gaming.V1Beta.ListGameServerConfigsResponse>(serviceImpl.ListGameServerConfigs));
     serviceBinder.AddMethod(__Method_GetGameServerConfig, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Google.Cloud.Gaming.V1Beta.GetGameServerConfigRequest, global::Google.Cloud.Gaming.V1Beta.GameServerConfig>(serviceImpl.GetGameServerConfig));
     serviceBinder.AddMethod(__Method_CreateGameServerConfig, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Google.Cloud.Gaming.V1Beta.CreateGameServerConfigRequest, global::Google.LongRunning.Operation>(serviceImpl.CreateGameServerConfig));
     serviceBinder.AddMethod(__Method_DeleteGameServerConfig, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Google.Cloud.Gaming.V1Beta.DeleteGameServerConfigRequest, global::Google.LongRunning.Operation>(serviceImpl.DeleteGameServerConfig));
 }
Example #2
0
 /// <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(GameServerConfigsServiceBase serviceImpl)
 {
     return(grpc::ServerServiceDefinition.CreateBuilder()
            .AddMethod(__Method_ListGameServerConfigs, serviceImpl.ListGameServerConfigs)
            .AddMethod(__Method_GetGameServerConfig, serviceImpl.GetGameServerConfig)
            .AddMethod(__Method_CreateGameServerConfig, serviceImpl.CreateGameServerConfig)
            .AddMethod(__Method_DeleteGameServerConfig, serviceImpl.DeleteGameServerConfig).Build());
 }