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:
parent
539481f999
commit
5c35ea9207
5 changed files with 25 additions and 25 deletions
|
|
@ -23,7 +23,7 @@ public sealed class DynamicClientRegistrationResponse
|
|||
/// Gets or initializes the redirect URIs for the client.
|
||||
/// </summary>
|
||||
[JsonPropertyName("redirect_uris")]
|
||||
public string[]? RedirectUris { get; init; }
|
||||
public IList<string>? RedirectUris { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or initializes the token endpoint authentication method.
|
||||
|
|
@ -35,13 +35,13 @@ public sealed class DynamicClientRegistrationResponse
|
|||
/// Gets or initializes the grant types that the client will use.
|
||||
/// </summary>
|
||||
[JsonPropertyName("grant_types")]
|
||||
public string[]? GrantTypes { get; init; }
|
||||
public IList<string>? GrantTypes { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or initializes the response types that the client will use.
|
||||
/// </summary>
|
||||
[JsonPropertyName("response_types")]
|
||||
public string[]? ResponseTypes { get; init; }
|
||||
public IList<string>? ResponseTypes { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or initializes the timestamp at which the client ID was issued.
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ public sealed class ProtectedResourceMetadata
|
|||
/// OPTIONAL.
|
||||
/// </remarks>
|
||||
[JsonPropertyName("authorization_servers")]
|
||||
public List<string> AuthorizationServers { get; set; } = [];
|
||||
public IList<string> AuthorizationServers { get; set; } = [];
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the supported bearer token methods.
|
||||
|
|
@ -48,7 +48,7 @@ public sealed class ProtectedResourceMetadata
|
|||
/// OPTIONAL.
|
||||
/// </remarks>
|
||||
[JsonPropertyName("bearer_methods_supported")]
|
||||
public List<string> BearerMethodsSupported { get; set; } = ["header"];
|
||||
public IList<string> BearerMethodsSupported { get; set; } = ["header"];
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the supported scopes.
|
||||
|
|
@ -61,7 +61,7 @@ public sealed class ProtectedResourceMetadata
|
|||
/// RECOMMENDED.
|
||||
/// </remarks>
|
||||
[JsonPropertyName("scopes_supported")]
|
||||
public List<string> ScopesSupported { get; set; } = [];
|
||||
public IList<string> ScopesSupported { get; set; } = [];
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the URL of the protected resource's JSON Web Key (JWK) Set document.
|
||||
|
|
@ -85,7 +85,7 @@ public sealed class ProtectedResourceMetadata
|
|||
/// OPTIONAL. No default algorithms are implied if this entry is omitted. The value "none" MUST NOT be used.
|
||||
/// </remarks>
|
||||
[JsonPropertyName("resource_signing_alg_values_supported")]
|
||||
public List<string>? ResourceSigningAlgValuesSupported { get; set; }
|
||||
public IList<string>? ResourceSigningAlgValuesSupported { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the human-readable name of the protected resource intended for display to the end user.
|
||||
|
|
@ -157,7 +157,7 @@ public sealed class ProtectedResourceMetadata
|
|||
/// OPTIONAL.
|
||||
/// </remarks>
|
||||
[JsonPropertyName("authorization_details_types_supported")]
|
||||
public List<string>? AuthorizationDetailsTypesSupported { get; set; }
|
||||
public IList<string>? AuthorizationDetailsTypesSupported { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the list of the JWS algorithm values supported by the resource server for validating DPoP proof JWTs.
|
||||
|
|
@ -170,7 +170,7 @@ public sealed class ProtectedResourceMetadata
|
|||
/// OPTIONAL.
|
||||
/// </remarks>
|
||||
[JsonPropertyName("dpop_signing_alg_values_supported")]
|
||||
public List<string>? DpopSigningAlgValuesSupported { get; set; }
|
||||
public IList<string>? DpopSigningAlgValuesSupported { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether the protected resource always requires the use of DPoP-bound access tokens.
|
||||
|
|
|
|||
|
|
@ -753,7 +753,7 @@ public sealed class ToolResultContentBlock : ContentBlock
|
|||
/// audio, resource links, and embedded resources.
|
||||
/// </remarks>
|
||||
[JsonPropertyName("content")]
|
||||
public required List<ContentBlock> Content { get; set; }
|
||||
public required IList<ContentBlock> Content { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets an optional structured result object.
|
||||
|
|
|
|||
|
|
@ -30,5 +30,5 @@ public sealed class ListTasksResult : PaginatedResult
|
|||
/// Gets or sets the list of tasks.
|
||||
/// </summary>
|
||||
[JsonPropertyName("tasks")]
|
||||
public required McpTask[] Tasks { get; set; }
|
||||
public required IList<McpTask> Tasks { get; set; }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue