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 cancellation tokens #21

Merged
merged 4 commits into from
Oct 26, 2024
Merged

Add cancellation tokens #21

merged 4 commits into from
Oct 26, 2024

Conversation

mariusz96
Copy link
Contributor

The PR for #20.

@mariusz96 mariusz96 closed this Aug 9, 2024
@mariusz96 mariusz96 reopened this Aug 9, 2024
@mariusz96 mariusz96 changed the title add cancellation tokens Add Cancellation Tokens Aug 9, 2024
@mariusz96 mariusz96 changed the title Add Cancellation Tokens Add cancellation tokens Aug 9, 2024
@mariusz96 mariusz96 closed this 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 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 9, 2024
@mariusz96 mariusz96 reopened this Aug 9, 2024
@mariusz96 mariusz96 closed this Aug 13, 2024
@mariusz96 mariusz96 reopened this Aug 13, 2024
@mariusz96 mariusz96 closed this Aug 13, 2024
@mariusz96 mariusz96 reopened this Aug 13, 2024
@mariusz96 mariusz96 closed this Aug 14, 2024
@mariusz96 mariusz96 reopened this Aug 14, 2024
@mariusz96 mariusz96 closed this Aug 22, 2024
@mariusz96
Copy link
Contributor Author

All merged.

Comment on lines +233 to +235
.AddCancellable<RoudCornersCancellableAsyncMiddleware>()
.Add<AddTransparencyAsyncMiddleware>() // You can mix both kinds of asynchronous middleware
.AddCancellable<AddWatermarkCancellableAsyncMiddleware>();
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really like this approach!

throw new InvalidOperationException($"'{MiddlewareResolver.GetType()}' failed to resolve middleware of type '{type}'.");
}

if (resolverResult.IsDisposable && !(resolverResult.Middleware is IDisposable
#if NETSTANDARD2_1_OR_GREATER
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll create a PR to drop support for net standard < 2.1 for the version 1.0.0 of the package. This will help to simplify the code.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't do that please. 2.1 is kind of uncommon. And it doesn't work on netframework at all.

Copy link
Owner

@ipvalverde ipvalverde Oct 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I thought the 2.1 was the one that was also used by .net framework, just saw it is the 2.0 😞
It's a shame that the full framework still has no end of life support.

Ok, we can at least bump it to 2.0, although that wouldn't change anything in terms of code.

Copy link
Contributor Author

@mariusz96 mariusz96 Oct 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why would you do that then? It would only break libraries that target 1.1-1.6.

PipelineNet.ServiceProvider needs to be at least 2.0 though because it has a dependency on Microsoft.Extensions.DependencyInjection.Abstractions.2.1.0.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The recommendation from Microsoft is to have the netstandard 2.0 as the lowest version for packages unless there's a good use case to have for supporting old ones.

Do you need it for older Net Framework versions?

@ipvalverde ipvalverde merged commit 5499b21 into ipvalverde:master Oct 26, 2024
2 checks 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