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

Fix bugs in IProgress<T> handling #374

Merged
merged 1 commit into from
Nov 25, 2019
Merged

Conversation

AArnott
Copy link
Member

@AArnott AArnott commented Nov 24, 2019

  • Fixes Multiple IProgress<T> parameters in a single method signature doesn't work #371: Missing support for multiple IProgress<T> parameters on a single method
  • Fix issues with IProgress handling in the MessagePackFormatter, including around storing and reusing a buffer after it has been recycled by making a copy of the token we need to use later.
  • Fixes MessagePackFormatter serialization of IProgress<T> instances when the concrete type is known statically due to being a member on a data contract class.

Also extract some general helper methods to another class so we can reuse it in IAsyncEnumerable support.

@AArnott AArnott added this to the v2.3 milestone Nov 24, 2019
@AArnott AArnott requested a review from milopezc November 24, 2019 03:23
@AArnott AArnott self-assigned this Nov 24, 2019
@codecov-io
Copy link

codecov-io commented Nov 24, 2019

Codecov Report

Merging #374 into master will decrease coverage by 0.05%.
The diff coverage is 85.48%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #374      +/-   ##
==========================================
- Coverage   90.04%   89.98%   -0.06%     
==========================================
  Files          40       41       +1     
  Lines        3084     3116      +32     
==========================================
+ Hits         2777     2804      +27     
- Misses        307      312       +5
Impacted Files Coverage Δ
src/StreamJsonRpc/JsonMessageFormatter.cs 93.05% <ø> (ø) ⬆️
...nRpc/Reflection/MessageFormatterProgressTracker.cs 95.16% <100%> (+1.82%) ⬆️
src/StreamJsonRpc/MessagePackFormatter.cs 92.72% <76.92%> (-0.39%) ⬇️
src/StreamJsonRpc/Reflection/TrackerHelpers.cs 78.57% <78.57%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e60bb33...c4456fa. Read the comment docs.

Fix issues with IProgress<T> handling in the MessagePackFormatter.

Also extract some general helper methods to another class so we can reuse it in IAsyncEnumerable<T> support.

Fixes microsoft#371
@AArnott AArnott merged commit 8c63dda into microsoft:master Nov 25, 2019
@AArnott AArnott deleted the fixProgress branch November 25, 2019 17:13
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.

Multiple IProgress<T> parameters in a single method signature doesn't work
3 participants