Refine ReadLinesAsync: pattern matching, rename, cancellation token

Agent-Logs-Url: https://github.com/Tyrrrz/DiscordChatExporter/sessions/e4a61491-645a-418c-91cd-74e835baaf44

Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-04-03 22:26:56 +00:00
committed by GitHub
parent 316e8c6ea8
commit f656234c38
2 changed files with 8 additions and 4 deletions

View File

@@ -34,7 +34,7 @@ public partial class ExportChannelsCommand : ExportCommandBase
var channelIds = new List<Snowflake>(ChannelIds);
if (channelIds.Count == 0 && console.IsInputRedirected)
{
await foreach (var line in console.Input.ReadAllLinesAsync())
await foreach (var line in console.Input.ReadLinesAsync(cancellationToken))
channelIds.Add(Snowflake.Parse(line));
}