diff options
author | nulltoken <emeric.fermas@gmail.com> | 2015-08-15 16:44:06 +0300 |
---|---|---|
committer | nulltoken <emeric.fermas@gmail.com> | 2015-08-15 16:44:06 +0300 |
commit | 4d5cbbb5da757e2c618b49770b45bcb5129adeda (patch) | |
tree | 8ec665d1e1a62fb8e928851ea9c0a8f4d1bf82e3 | |
parent | f4a60014642ae4d050bf2db46a03b862ef7e8040 (diff) | |
parent | 7b0507e98bad1fad4ec78434b932b7b282801f74 (diff) |
Merge pull request #1167 from xoofx/add_debug_display_tree_entry
Add DebuggerDisplay attribute to TreeEntry
-rw-r--r-- | LibGit2Sharp/TreeEntry.cs | 13 |
1 files changed, 13 insertions, 0 deletions
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 /// <summary> /// Representation of an entry in a <see cref="Tree"/>. /// </summary> + [DebuggerDisplay("{DebuggerDisplay,nq}")] public class TreeEntry : IEquatable<TreeEntry> { 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); + } + } } } |