-
Notifications
You must be signed in to change notification settings - Fork 22
Open
Labels
enhancementNew feature or requestNew feature or requestinfrastructureInfrastructure featureInfrastructure feature
Description
Now if query and route has 2 parameters with the same type, request handler will try to create arguments from request based on their type only
private async ValueTask<object[]> GetArguments(MethodInfo method, HttpListenerContext context)
{
var parameters = method.GetParameters();
var args = new object[parameters.Length];
for (int i = 0; i < parameters.Length; i++)
{
var parameterType = parameters[i].ParameterType;
if (parameterType == typeof(HttpListenerContext))
{
args[i] = context;
}
else
{
args[i] = null;
}
var content = await GetRequestContentAsync(context.Request, parameterType);
if (content != default)
args[i] = content;
}
return args;
}
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestinfrastructureInfrastructure featureInfrastructure feature