-
Notifications
You must be signed in to change notification settings - Fork 631
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
Apply fallbackencoding of DicomServices to the DicomDatasets that are sent through this DicomService #1780
base: development
Are you sure you want to change the base?
Conversation
… DicomDatasets of the messages sent through this DicomService
…t the fallbackencoding is applied to the messages only if explicitly set by a user
FO-DICOM.Core/DicomDataset.cs
Outdated
@@ -24,7 +24,7 @@ public partial class DicomDataset : IEnumerable<DicomItem>, IEquatable<DicomData | |||
private readonly IDictionary<DicomTag, DicomItem> _items; | |||
|
|||
private DicomTransferSyntax _syntax; | |||
private Encoding[] _fallbackEncodings = DicomEncoding.DefaultArray; | |||
internal Encoding[] _fallbackEncodings = DicomEncoding.DefaultArray; |
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.
Instead of making this internal, wouldn't it make more sense to move the Clone method back to DicomDataset? If you look at how records are implemented in C#, they are also responsible for their own cloning, this is not implemented externally.
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.
Doesn't necessarily make more sense. Records play a certain role in .net, they are short syntactic sugar where the compiler generates a lot of stuff around.
With the internal method SetFallbackEncoding, the fallbackencoding has to be changeable internally anyway. so if the internal field bothers you, then I will make a internal property from that. Then the internal function SetFallbackEncoding can be removed.
One minor consideration related to cloning, but other than that a nice improvement! 👍 |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## development #1780 +/- ##
===============================================
- Coverage 76.42% 76.35% -0.07%
===============================================
Files 275 275
Lines 25410 25417 +7
Branches 3043 3046 +3
===============================================
- Hits 19419 19407 -12
- Misses 5062 5075 +13
- Partials 929 935 +6 ☔ View full report in Codecov by Sentry. |
Fixes #1642 .
Checklist
Changes proposed in this pull request: