You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently in ASP.NET Core, writing a generic IModelBinderProvider is difficult, because there is no way to generically constrain that T has GetAllTypes or GetType static methods. These two helper methods allow the caller to understand all the possible supported types and get a type from a passed enum respectively.
Proposal: Declare and a known interface with GetAllTypes and GetTypes then have each polymorpyhic class inherit that interface
The text was updated successfully, but these errors were encountered:
Currently in ASP.NET Core, writing a generic IModelBinderProvider is difficult, because there is no way to generically constrain that T has
GetAllTypes
orGetType
static methods. These two helper methods allow the caller to understand all the possible supported types and get a type from a passed enum respectively.Proposal: Declare and a known interface with
GetAllTypes
andGetType
s then have each polymorpyhic class inherit that interfaceThe text was updated successfully, but these errors were encountered: