-
Notifications
You must be signed in to change notification settings - Fork 26
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
Add ServiceCollectionExtensions and ServiceProviderMiddlewareResolver #19
Conversation
…MiddlewareResolver
|
||
var openGenericTypes = new List<Type>() | ||
{ | ||
typeof(IMiddleware<>), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ICancelalbleAsyncMiddleware<>
and ICancelalbleAsyncMiddleware<,>
should be added here when the other PR is merged.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also IFinally<,>
, IAsyncFinally<,>
and ICancellableAsyncFinally<,>
.
c4b2c5b
to
62dbd4b
Compare
76020a0
to
2a3982c
Compare
30eaa54
to
f75ed23
Compare
/// Set this to <see langword="true"/> if the middleware is IDisposable or | ||
/// IAsyncDisposable (requires .NET Standard 2.1 or greater) | ||
/// and was not created by a dependency injection container. | ||
/// and is not disposed by a dependency injection container. | ||
/// </summary> | ||
public bool IsDisposable { get; set; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before we get to the next breaking change, this property should be renamed to add more clarity. Maybe something like DisposeAfterUsage
or just Dispose
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dispose
sounds good.
I will also remove the 'if the middleware is IDisposable or IAsyncDisposable' from MiddlewareResolverResult
and IMiddlewareResolver
. It is enough to check this in BaseMiddlewareFlow
.
The PR for #24.