Closed srogovtsev closed 8 years ago
I think option 1 sounds like the simplest thing to implement and would avoid that 15-overload-nightmare you mention at the end.
To disambiguate, I'm curious if it should be called something like RunFromContainer<T>
to go along with the UseMiddlewareFromContainer<T>
method we have. I don't feel super strongly about it, just that I could see Microsoft.Owin
adding some sort of simple generic in the future and messing method bindings up.
Okay, I agree with the naming: I thought that way myself, but settled first on the shorter option.
Will try to implement option 1 in a couple of days.
Fixed by merging in PR #8.
Now, after we got rid of one unpleasantry, let's move to another one.
Terminal call.
I want to be able to specify end-of-pipeline delegate (unfortunately, only delegates are allowed) without explicitly resolving the dependencies needed inside.
Option 1
Which should be more or less equivalent to
Option 2
Equivalent to
This one is actually beautiful from the user point of view - if you not take into account the necessity to provide for 15 variants of
Func<Task,IOwinContext,Dependency1,...,DependencyN>
.I could do either - or both - if you deem this appropriate.