protected async Task EndWithResultAsync( IImapMessageChannel channel, CommandResult result, TagMessageData tags, string text, CancellationToken cancellationToken) { if (result == CommandResult.Ok && text == null) { text = CommandName + " completed"; } if (tags == null) { await channel.CommandCompletedAsync(GetResultMessage(result, new ServerMessageData(text)), this, cancellationToken); } else { await channel.CommandCompletedAsync( GetResultMessage(result, tags, new ServerMessageData(text)), this, cancellationToken); } }