Esempio n. 1
0
        public async Task RemoveResponse(RemoveResponseCommand command, Contexts contexts)
        {
            var messageService = this._messagesServiceFactory.Create(contexts);
            var response       = await this._responsesService.GetResponseByOnEvent(command.OnEvent, contexts.Server.Id);

            if (response == null)
            {
                await messageService.SendResponse(x => x.ResponseNotFound(contexts, command.OnEvent));

                return;
            }
            await this._responsesService.RemoveResponse(command.OnEvent, contexts.Server.Id);

            await messageService.SendResponse(x => x.ResponseHasBeenRemoved(contexts, command.OnEvent));
        }
Esempio n. 2
0
        public async Task RemoveResponse(string onEvent, ulong serverId)
        {
            var command = new RemoveResponseCommand(onEvent, serverId);

            await this._commandBus.ExecuteAsync(command);
        }