-
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 cancellation tokens #21
Conversation
fa92445
to
a979ef0
Compare
All merged. |
.AddCancellable<RoudCornersCancellableAsyncMiddleware>() | ||
.Add<AddTransparencyAsyncMiddleware>() // You can mix both kinds of asynchronous middleware | ||
.AddCancellable<AddWatermarkCancellableAsyncMiddleware>(); |
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.
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 |
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.
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.
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.
Don't do that please. 2.1 is kind of uncommon. And it doesn't work on netframework
at all.
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.
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.
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.
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
.
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.
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?
The PR for #20.