From 7b0507e98bad1fad4ec78434b932b7b282801f74 Mon Sep 17 00:00:00 2001 From: Alexandre Mutel Date: Tue, 11 Aug 2015 19:55:51 +0900 Subject: Add DebuggerDisplay attribute to TreeEntry --- LibGit2Sharp/TreeEntry.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/LibGit2Sharp/TreeEntry.cs b/LibGit2Sharp/TreeEntry.cs index dd264755..30ced73c 100644 --- a/LibGit2Sharp/TreeEntry.cs +++ b/LibGit2Sharp/TreeEntry.cs @@ -1,4 +1,5 @@ using System; +using System.Diagnostics; using System.Globalization; using System.Runtime.InteropServices; using LibGit2Sharp.Core; @@ -8,6 +9,7 @@ namespace LibGit2Sharp /// /// Representation of an entry in a . /// + [DebuggerDisplay("{DebuggerDisplay,nq}")] public class TreeEntry : IEquatable { private readonly ObjectId parentTreeId; @@ -140,5 +142,16 @@ namespace LibGit2Sharp { return !Equals(left, right); } + + private string DebuggerDisplay + { + get + { + return string.Format(CultureInfo.InvariantCulture, + "TreeEntry: {0} => {1}", + Path, + TargetId); + } + } } } -- cgit v1.2.3