billbogaiv/hybrid-model-binding

Extend HybridModelBinderApplicationModelConvention to allow CancellationToken

bkaid opened this issue · 0 comments

bkaid commented

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) { }