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 tagname to debugger visualization for Exif- and Iptc-values, to facilitate easier debugging and discovery #2787

Merged

Conversation

lassevk
Copy link
Contributor

@lassevk lassevk commented Aug 1, 2024

Prerequisites

  • I have written a descriptive pull-request title
  • I have verified that there are no overlapping pull-requests open
  • I have verified that I am following the existing coding patterns and practice as demonstrated in the repository. These follow strict Stylecop rules 👮.
  • [ ] I have provided test coverage for my change (where applicable)

Description

The base class for ExifValue and IptcValue has been adorned with a DebuggerDisplayAttribute, so that looking at the collection of metadata values in the debugger is easier to understand. Instead of just the value being displayed, the tag for the value is also displayed, making it easier to see what the values mean, find the right one, and discover what is available.

The change does not impact runtime, as these attributes are only discovered and used by the various debuggers, as such there are no tests. Tests would be difficult to implement as well, considering one would have to mimick a debugger to evaluate and verify that the displayed format is working as intended, both now and into the future.

@JimBobSquarePants
Copy link
Member

Thanks @lassevk I'll pull this down and review ASAP

@lassevk
Copy link
Contributor Author

lassevk commented Aug 1, 2024

To test, you can check the original discussion for the two test methods I used, just put a breakpoint inside and check the in-scope image and review the metadata collections to see how it looks.

@JimBobSquarePants
Copy link
Member

@lassevk I finally got the time to test this. It's a great addition. Thanks!!

@JimBobSquarePants JimBobSquarePants merged commit 63f5351 into SixLabors:main Aug 12, 2024
9 checks passed
@lassevk lassevk deleted the lvk/metadata-debuggerdisplay branch August 15, 2024 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants