Skip to content

Commit 4060f1b

Browse files
committed
oops
1 parent 7b50d32 commit 4060f1b

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

src/Http/Http.Extensions/src/RequestDelegateFactory.cs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public static RequestDelegate Create(Delegate action)
8484

8585
/// <summary>
8686
/// Creates a <see cref="RequestDelegate"/> implementation for <paramref name="methodInfo"/>.
87-
/// </summary>Microsoft.AspNetCore.Routing.MapAction"
87+
/// </summary>
8888
/// <param name="methodInfo">A static request handler with any number of custom parameters that often produces a response with its return value.</param>
8989
/// <returns>The <see cref="RequestDelegate"/>.</returns>
9090
public static RequestDelegate Create(MethodInfo methodInfo)
@@ -253,11 +253,7 @@ private static Expression CreateArgument(ParameterInfo parameter, FactoryContext
253253
{
254254
return RequestAbortedExpr;
255255
}
256-
else if (parameter.ParameterType == typeof(string))
257-
{
258-
return BindParameterFromRouteValueOrQueryString(parameter, parameter.Name, factoryContext);
259-
}
260-
else if (HasTryParseMethod(parameter))
256+
else if (parameter.ParameterType == typeof(string) || HasTryParseMethod(parameter))
261257
{
262258
return BindParameterFromRouteValueOrQueryString(parameter, parameter.Name, factoryContext);
263259
}
@@ -296,7 +292,7 @@ private static Expression CreateTryParseCheckingResponseWritingMethodCall(Method
296292
// if (!int.TryParse(tempSourceString, out parsedValue))
297293
// {
298294
// wasTryParseFailureVariable = true;
299-
// Log.ParameterBindingFailed(httpContext, "Int32", "id", sourceValue)
295+
// Log.ParameterBindingFailed(httpContext, "Int32", "id", tempSourceString)
300296
// }
301297
//
302298
// return parsedValue;
@@ -635,7 +631,7 @@ private static Expression BindParameterFromValue(ParameterInfo parameter, Expres
635631
// if (!int.TryParse(tempSourceString, out parsedValue))
636632
// {
637633
// wasTryParseFailureVariable = true;
638-
// Log.ParameterBindingFailed(httpContext, "Int32", "id", sourceValue)
634+
// Log.ParameterBindingFailed(httpContext, "Int32", "id", tempSourceString)
639635
// }
640636
//
641637
// return parsedValue;

0 commit comments

Comments
 (0)