aspnetcore icon indicating copy to clipboard operation
aspnetcore copied to clipboard

Simplify and optimize async parameters in RequestDelegateFactory

Open halter73 opened this issue 3 years ago • 1 comments

  • Avoid object[] allocation for single BindAsync call
  • Remove redundant state and logic
  • Cleanup some names and nullability annotations
  • Split RequestDelegateFactory.Log class into its own RequestDelegateFactory.Log.cs file

halter73 avatar Jul 06 '22 01:07 halter73

As you're taking the big refactor-hammer to things as it is, I wonder if maybe it's also worth moving the other nested types into their own partial files too to get the main file down to under 2k LoC?

martincostello avatar Jul 08 '22 13:07 martincostello

@halter73 Thoughts on this PR? If I recall, it still needs a hearty rebase to get it in an up-to-date state.

There's also some goodness in here that is probably better to split up into a separate PR like:

Cleanup some names and nullability annotations Split RequestDelegateFactory.Log class into its own RequestDelegateFactory.Log.cs file

captainsafia avatar Apr 24 '23 17:04 captainsafia

Thanks for the reminder. I'll work on rebasing this after I update my MapIdentityApi<TUser>() PR (#47414) in response to API review.

halter73 avatar Apr 24 '23 20:04 halter73