Replace concrete collection types with interfaces in public API surface (#1326)

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>
This commit is contained in:
Copilot 2026-02-19 19:48:45 -08:00 • committed by GitHub
commit 5c35ea9207
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -462,7 +462,7 @@ public abstract partial class McpServer : McpSession
var taskResults = await ListTasksAsync(requestParams, cancellationToken).ConfigureAwait(false);
if (tasks is null)
{
tasks = new List<McpTask>(taskResults.Tasks.Length);
tasks = new List<McpTask>(taskResults.Tasks.Count);
}
foreach (var mcpTask in taskResults.Tasks)