Skip to content

Commit 144d56e

Browse files
committed
Use List<Type> directly for method
1 parent c063ce5 commit 144d56e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Http/Http.Abstractions/src/Validation/TypeExtensions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public static bool TryGetRequiredAttribute(this ValidationAttribute[] attributes
8989
/// </summary>
9090
/// <param name="type">The type to analyze.</param>
9191
/// <returns>A collection containing all implemented interfaces and all base types of the given type.</returns>
92-
public static Type[] GetAllImplementedTypes([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.Interfaces)] this Type type)
92+
public static List<Type> GetAllImplementedTypes([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.Interfaces)] this Type type)
9393
{
9494
ArgumentNullException.ThrowIfNull(type);
9595

@@ -109,7 +109,7 @@ public static Type[] GetAllImplementedTypes([DynamicallyAccessedMembers(Dynamica
109109
baseType = baseType.BaseType;
110110
}
111111

112-
return [.. implementedTypes];
112+
return implementedTypes;
113113
}
114114

115115
/// <summary>

src/Http/Http.Abstractions/src/Validation/ValidatableTypeInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ namespace Microsoft.AspNetCore.Http.Validation;
1414
public abstract class ValidatableTypeInfo : IValidatableInfo
1515
{
1616
private readonly int _membersCount;
17-
private readonly Type[] _subTypes;
17+
private readonly List<Type> _subTypes;
1818

1919
/// <summary>
2020
/// Creates a new instance of <see cref="ValidatableTypeInfo"/>.

0 commit comments

Comments
 (0)