Exemplo n.º 1
0
        public async Task Delete(int numToDelete)
        {
            DeleteMessageService deleteservice = new DeleteMessageService();

            IEnumerable <IMessage> messages;

            messages = await deleteservice.DownloadMessagesAsync(Context, numToDelete);

            await deleteservice.DeleteMessages(Context, messages);
        }
Exemplo n.º 2
0
        public async Task Delete(int numToDelete, [Remainder] string stringIn)
        {
            DeleteMessageService deleteservice = new DeleteMessageService();

            IEnumerable <IMessage> messages;

            await deleteservice.ParseDeleteCommandAsync(Context, stringIn);

            if (await deleteservice.CheckParamConflict())
            {
                await ReplyAsync("error: parameter conflict");

                return;
            }

            else
            {
                messages = await deleteservice.DownloadMessagesAsync(Context, numToDelete);
            }

            await deleteservice.DeleteMessages(Context, messages);
        } // end delete