Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the MIT license. See License.txt in the project root for license information.

using System.Collections.Generic;
using System.Collections.Immutable;
using System.Linq;
using Microsoft.CodeAnalysis;

Expand Down Expand Up @@ -44,7 +43,7 @@ public static IEnumerable<IMethodSymbol> GetMethodOverloadsWithDesiredParameterA
{
return methods.Where(candidateMethod =>
{
if (!System.Collections.Immutable.ImmutableArrayExtensions.HasExactly(candidateMethod.Parameters, selectedOverload.Parameters.Count() + 1))
if (!System.Collections.Immutable.ImmutableArrayExtensions.HasExactly(candidateMethod.Parameters, selectedOverload.Parameters.Length + 1))
{
return false;
}
Expand All @@ -70,7 +69,7 @@ public static IEnumerable<IMethodSymbol> GetMethodOverloadsWithDesiredParameterA
}
}

for (int i = 0; i < selectedOverload.Parameters.Count(); i++, j++)
for (int i = 0; i < selectedOverload.Parameters.Length; i++, j++)
{
if (!selectedOverload.Parameters[i].Type.Equals(candidateMethod.Parameters[j].Type) ||
selectedOverload.Parameters[i].IsParams != candidateMethod.Parameters[j].IsParams ||
Expand Down Expand Up @@ -140,7 +139,7 @@ public static IEnumerable<IMethodSymbol> GetMethodOverloadsWithDesiredParameterA
var expectedParameterCount = expectedParameterTypesInOrder.Length;
return members?.FirstOrDefault(member =>
{
if (member.Parameters.Count() != expectedParameterCount)
if (member.Parameters.Length != expectedParameterCount)
{
return false;
}
Expand Down