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

CA1068: CancellationToken parameters must come last #772

Merged
merged 1 commit into from
Sep 30, 2022
Merged

CA1068: CancellationToken parameters must come last #772

merged 1 commit into from
Sep 30, 2022

Conversation

panosru
Copy link
Contributor

@panosru panosru commented Aug 7, 2022

The code has been modified to follow the CA1068 rule, which indicates that the CancellationToken parameter must come last, while in some of MediatR methods the rule was followed, in many others it wasn't.

https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1068

The tests are also modified accordingly:

image

Handle and Publish now taking the next as a second param and the cancelationToken as the last param.

Although this pull request isn't backwards compatible, the modification isn't hard to implement, all it needs is to switch places between next and cancelationToken arguments.

@jbogard jbogard merged commit 89c7b6d into jbogard:master Sep 30, 2022
@panosru panosru deleted the CA1068 branch September 30, 2022 14:34
@jeparrish jeparrish mentioned this pull request Oct 20, 2022
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