Throw for invalid TryParse and BindAsync methods #36523
Labels
area-minimal
Includes minimal APIs, endpoint filters, parameter binding, request delegate generator etc
feature-minimal-actions
Controller-like actions for endpoint routing
old-area-web-frameworks-do-not-use
*DEPRECATED* This label is deprecated in favor of the area-mvc and area-minimal labels
Milestone
If your
TryParse
method has a nullable out parameter and is a struct it fails to find the TryParse method and will throw:System.InvalidOperationException : No public static bool MyBindAsyncRecord.TryParse(string, out MyBindAsyncRecord) method found for myBindAsyncRecord.
This is because the method parameter type is
Nullable`1[[MyBindAsyncRecord]]&
and we passMyBindAsyncRecord&
aspnetcore/src/Shared/ParameterBindingMethodCache.cs
Line 107 in de27715
The text was updated successfully, but these errors were encountered: