Skip to content

Commit

Permalink
Fix critical bug in 4.1.0 (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
Shane32 authored Nov 8, 2021
1 parent 1f39ada commit fa1a320
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions src/GraphQL.DI/DIObjectGraphType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -158,18 +158,6 @@ protected virtual IEnumerable<MethodInfo> GetMethodsToProcess()
return methods;
}

/// <summary>
/// Returns the list of parameters for the specified method.
/// Sorts the list if specified by <see cref="SortMembers"/>.
/// </summary>
protected IEnumerable<ParameterInfo> GetMethodParameters(MethodInfo methodInfo)
{
var parameters = methodInfo.GetParameters().AsEnumerable();
if (SortMembers)
parameters = parameters.OrderBy(x => x.Name, StringComparer.InvariantCultureIgnoreCase);
return parameters;
}

/// <summary>
/// Converts a specified method (<see cref="MethodInfo"/> instance) into a field definition.
/// </summary>
Expand Down Expand Up @@ -200,7 +188,7 @@ protected IEnumerable<ParameterInfo> GetMethodParameters(MethodInfo methodInfo)
{
var resolveFieldContextParameter = Expression.Parameter(typeof(IResolveFieldContext));
var executeParams = new List<Expression>();
foreach (var param in GetMethodParameters(method)) {
foreach (var param in method.GetParameters()) {
var queryArgument = ProcessParameter(method, param, resolveFieldContextParameter, out bool isService, out Expression expr);
anyParamsUseServices |= isService;
if (queryArgument != null)
Expand Down

0 comments on commit fa1a320

Please sign in to comment.