Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend HybridModelBinderApplicationModelConvention to allow CancellationToken #25

Open
bkaid opened this issue Jan 22, 2019 · 0 comments

Comments

@bkaid
Copy link

bkaid commented Jan 22, 2019

From #20

When using .AddHybridModelBinder(), this adds a Convention to look for controller-actions which have one complex parameter (i.e. not a string or int) and no currently-assigned BindingSource and assign it with a BindingSource == "Hybrid".

It would be handy for the HybridModelBinderApplicationModel convention to also allow a second parameter to be a CancellationToken to allow the FromHybrid to be removed in this scenario:

public async Task<IActionResult> MyAction([FromHybrid] MyModel myModel, CancellationToken cancellationToken) { }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant