@@ -84,7 +84,7 @@ public static RequestDelegate Create(Delegate action)
84
84
85
85
/// <summary>
86
86
/// Creates a <see cref="RequestDelegate"/> implementation for <paramref name="methodInfo"/>.
87
- /// </summary>Microsoft.AspNetCore.Routing.MapAction"
87
+ /// </summary>
88
88
/// <param name="methodInfo">A static request handler with any number of custom parameters that often produces a response with its return value.</param>
89
89
/// <returns>The <see cref="RequestDelegate"/>.</returns>
90
90
public static RequestDelegate Create ( MethodInfo methodInfo )
@@ -253,11 +253,7 @@ private static Expression CreateArgument(ParameterInfo parameter, FactoryContext
253
253
{
254
254
return RequestAbortedExpr ;
255
255
}
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 ) )
261
257
{
262
258
return BindParameterFromRouteValueOrQueryString ( parameter , parameter . Name , factoryContext ) ;
263
259
}
@@ -296,7 +292,7 @@ private static Expression CreateTryParseCheckingResponseWritingMethodCall(Method
296
292
// if (!int.TryParse(tempSourceString, out parsedValue))
297
293
// {
298
294
// wasTryParseFailureVariable = true;
299
- // Log.ParameterBindingFailed(httpContext, "Int32", "id", sourceValue )
295
+ // Log.ParameterBindingFailed(httpContext, "Int32", "id", tempSourceString )
300
296
// }
301
297
//
302
298
// return parsedValue;
@@ -635,7 +631,7 @@ private static Expression BindParameterFromValue(ParameterInfo parameter, Expres
635
631
// if (!int.TryParse(tempSourceString, out parsedValue))
636
632
// {
637
633
// wasTryParseFailureVariable = true;
638
- // Log.ParameterBindingFailed(httpContext, "Int32", "id", sourceValue )
634
+ // Log.ParameterBindingFailed(httpContext, "Int32", "id", tempSourceString )
639
635
// }
640
636
//
641
637
// return parsedValue;
0 commit comments