Skip to content

Commit 63f5351

Browse files
Merge pull request #2787 from lassevk/lvk/metadata-debuggerdisplay
Add tagname to debugger visualization for Exif- and Iptc-values, to facilitate easier debugging and discovery
2 parents 98437a0 + c975a1f commit 63f5351

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/ImageSharp/Metadata/Profiles/Exif/Values/ExifValue.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
// Copyright (c) Six Labors.
22
// Licensed under the Six Labors Split License.
33

4+
using System.Diagnostics;
45
using System.Runtime.CompilerServices;
56

67
namespace SixLabors.ImageSharp.Metadata.Profiles.Exif;
78

9+
[DebuggerDisplay("{Tag} = {IsArray?\"[..]\":ToString(),nq} ({GetType().Name,nq})")]
810
internal abstract class ExifValue : IExifValue, IEquatable<ExifTag>
911
{
1012
protected ExifValue(ExifTag tag) => this.Tag = tag;

src/ImageSharp/Metadata/Profiles/IPTC/IptcValue.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
// Copyright (c) Six Labors.
22
// Licensed under the Six Labors Split License.
33

4+
using System.Diagnostics;
45
using System.Text;
56

67
namespace SixLabors.ImageSharp.Metadata.Profiles.Iptc;
78

89
/// <summary>
910
/// Represents a single value of the IPTC profile.
1011
/// </summary>
12+
[DebuggerDisplay("{Tag} = {ToString(),nq} ({GetType().Name,nq})")]
1113
public sealed class IptcValue : IDeepCloneable<IptcValue>
1214
{
1315
private byte[] data = Array.Empty<byte>();

0 commit comments

Comments
 (0)