/// <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, MruVCharactersServiceBase serviceImpl) { serviceBinder.AddMethod(__Method_CreateCharacter, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Mruv.Characters.CreateCharacterRequest, global::Mruv.Characters.CreateCharacterResponse>(serviceImpl.CreateCharacter)); serviceBinder.AddMethod(__Method_GetCharacter, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Mruv.Characters.GetCharacterRequest, global::Mruv.Characters.GetCharacterResponse>(serviceImpl.GetCharacter)); serviceBinder.AddMethod(__Method_UpdateCharacter, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Mruv.Characters.UpdateCharacterRequest, global::Mruv.Characters.UpdateCharacterResponse>(serviceImpl.UpdateCharacter)); serviceBinder.AddMethod(__Method_DeleteCharacter, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Mruv.Characters.DeleteCharacterRequest, global::Mruv.Characters.DeleteCharacterResponse>(serviceImpl.DeleteCharacter)); serviceBinder.AddMethod(__Method_PermanentCharacterKill, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Mruv.Characters.CharacterID, global::Mruv.Characters.CharacterID>(serviceImpl.PermanentCharacterKill)); serviceBinder.AddMethod(__Method_ChangeClothes, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Mruv.Characters.ChangeClothesRequest, global::Mruv.Characters.ChangeClothesResponse>(serviceImpl.ChangeClothes)); serviceBinder.AddMethod(__Method_DeathsStream, serviceImpl == null ? null : new grpc::ServerStreamingServerMethod <global::Mruv.Characters.DeathStreamRequest, global::Mruv.Characters.DeathStreamResponse>(serviceImpl.DeathsStream)); serviceBinder.AddMethod(__Method_GetServiceStatus, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Mruv.Common.ServiceStatusRequest, global::Mruv.Common.ServiceStatusResponse>(serviceImpl.GetServiceStatus)); serviceBinder.AddMethod(__Method_GetServiceVersion, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Mruv.Common.VersionRequest, global::Mruv.Common.VersionResponse>(serviceImpl.GetServiceVersion)); }
/// <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(MruVCharactersServiceBase serviceImpl) { return(grpc::ServerServiceDefinition.CreateBuilder() .AddMethod(__Method_CreateCharacter, serviceImpl.CreateCharacter) .AddMethod(__Method_GetCharacter, serviceImpl.GetCharacter) .AddMethod(__Method_UpdateCharacter, serviceImpl.UpdateCharacter) .AddMethod(__Method_DeleteCharacter, serviceImpl.DeleteCharacter) .AddMethod(__Method_PermanentCharacterKill, serviceImpl.PermanentCharacterKill) .AddMethod(__Method_ChangeClothes, serviceImpl.ChangeClothes) .AddMethod(__Method_DeathsStream, serviceImpl.DeathsStream) .AddMethod(__Method_GetServiceStatus, serviceImpl.GetServiceStatus) .AddMethod(__Method_GetServiceVersion, serviceImpl.GetServiceVersion).Build()); }