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

Add ServiceCollectionExtensions and ServiceProviderMiddlewareResolver #19

Merged
merged 7 commits into from
Oct 13, 2024

Conversation

mariusz96
Copy link
Contributor

@mariusz96 mariusz96 commented Aug 6, 2024

The PR for #24.

@mariusz96 mariusz96 closed this Aug 7, 2024
@mariusz96 mariusz96 changed the title add proper DI, FinallyThrow and improve the documentation add DI, FinallyThrow and improve the documentation Aug 7, 2024
@mariusz96 mariusz96 reopened this Aug 7, 2024
@mariusz96 mariusz96 changed the title add DI, FinallyThrow and improve the documentation add DI and improve the documentation Aug 7, 2024
@mariusz96 mariusz96 changed the title add DI and improve the documentation Add ServiceProviderMiddlewareResolver and assembly scanning Aug 9, 2024
@mariusz96 mariusz96 closed this Aug 9, 2024
@mariusz96 mariusz96 changed the title Add ServiceProviderMiddlewareResolver and assembly scanning Add ServiceCollectionExtensions with assembly scanning and ServiceProviderMiddlewareResolver Aug 9, 2024
@mariusz96 mariusz96 reopened this Aug 9, 2024
@mariusz96 mariusz96 closed this Aug 9, 2024
@mariusz96 mariusz96 changed the title Add ServiceCollectionExtensions with assembly scanning and ServiceProviderMiddlewareResolver Add assembly scanning ServiceCollectionExtensions and ServiceProviderMiddlewareResolver Aug 9, 2024
@mariusz96 mariusz96 reopened this Aug 9, 2024
@mariusz96 mariusz96 closed this Aug 9, 2024
@mariusz96 mariusz96 reopened this Aug 9, 2024
@mariusz96 mariusz96 closed this Aug 13, 2024
@mariusz96 mariusz96 reopened this Aug 13, 2024

var openGenericTypes = new List<Type>()
{
typeof(IMiddleware<>),
Copy link
Contributor Author

@mariusz96 mariusz96 Aug 20, 2024

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.

Copy link
Contributor Author

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<,>.

@mariusz96 mariusz96 changed the title Add assembly scanning ServiceCollectionExtensions and ServiceProviderMiddlewareResolver Add ServiceCollectionExtensions and ServiceProviderMiddlewareResolver Aug 21, 2024
/// 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; }
Copy link
Owner

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.

Copy link
Contributor Author

@mariusz96 mariusz96 Oct 21, 2024

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.

@ipvalverde ipvalverde merged commit 6d93751 into ipvalverde:master Oct 13, 2024
1 check passed
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

Successfully merging this pull request may close these issues.

2 participants