Skip to content

Add support for BindAsync without ParameterInfo#36505

Merged
BrennanConroy merged 4 commits into
mainfrom
brecon/bindasync
Sep 16, 2021
Merged

Add support for BindAsync without ParameterInfo#36505
BrennanConroy merged 4 commits into
mainfrom
brecon/bindasync

Conversation

@BrennanConroy
Copy link
Copy Markdown
Member

Fixes #36415

Prefers BindAsync(HttpContext, ParameterInfo) over BindAsync(HttpContext).

@BrennanConroy BrennanConroy added the old-area-web-frameworks-do-not-use *DEPRECATED* This label is deprecated in favor of the area-mvc and area-minimal labels label Sep 14, 2021
Comment thread src/Shared/ParameterBindingMethodCache.cs Outdated
Co-authored-by: David Fowler <davidfowl@gmail.com>
Comment thread src/Shared/ParameterBindingMethodCache.cs
Comment thread src/Shared/ParameterBindingMethodCache.cs Outdated
Comment thread src/Shared/ParameterBindingMethodCache.cs Outdated
}

public Expression? FindBindAsyncMethod(ParameterInfo parameter)
public (Expression?, int) FindBindAsyncMethod(ParameterInfo parameter)
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
public (Expression?, int) FindBindAsyncMethod(ParameterInfo parameter)
public (Expression? Expression, int ParamCount) FindBindAsyncMethod(ParameterInfo parameter)

Would this be better @davidfowl ?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this changed much but it's fine

Copy link
Copy Markdown
Member

@halter73 halter73 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice test coverage!

@BrennanConroy
Copy link
Copy Markdown
Member Author

/backport to release/6.0

@github-actions
Copy link
Copy Markdown
Contributor

Started backporting to release/6.0: https://github.com/dotnet/aspnetcore/actions/runs/1239549193

@BrennanConroy BrennanConroy merged commit f6efa13 into main Sep 16, 2021
@BrennanConroy BrennanConroy deleted the brecon/bindasync branch September 16, 2021 03:31
@ghost ghost added this to the 7.0-preview1 milestone Sep 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

old-area-web-frameworks-do-not-use *DEPRECATED* This label is deprecated in favor of the area-mvc and area-minimal labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support BindAsync() without ParameterInfo for Minimal APIs

3 participants