Skip to content

Commit ca503ce

Browse files
committed
DebuggerDisplay improvements
1 parent a246b68 commit ca503ce

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+57
-184
lines changed

src/redmine-net-api/Types/Attachment.cs

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -256,16 +256,7 @@ public override int GetHashCode()
256256
}
257257
#endregion
258258

259-
private string DebuggerDisplay =>
260-
$@"[{nameof(Attachment)}:
261-
{ToString()},
262-
FileName={FileName},
263-
FileSize={FileSize.ToString(CultureInfo.InvariantCulture)},
264-
ContentType={ContentType},
265-
Description={Description},
266-
ContentUrl={ContentUrl},
267-
Author={Author},
268-
CreatedOn={CreatedOn?.ToString("u", CultureInfo.InvariantCulture)}]";
259+
private string DebuggerDisplay =>$"[Attachment: Id={Id.ToInvariantString()}, FileName={FileName}, FileSize={FileSize.ToInvariantString()}]";
269260

270261
/// <summary>
271262
///

src/redmine-net-api/Types/ChangeSet.cs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -232,12 +232,7 @@ public override int GetHashCode()
232232
///
233233
/// </summary>
234234
/// <returns></returns>
235-
private string DebuggerDisplay =>
236-
$@"[{nameof(ChangeSet)}:
237-
Revision={Revision.ToString(CultureInfo.InvariantCulture)},
238-
User='{User}',
239-
CommittedOn={CommittedOn?.ToString("u", CultureInfo.InvariantCulture)},
240-
Comments='{Comments}']";
235+
private string DebuggerDisplay => $" ChangeSet: Revision={Revision}, CommittedOn={CommittedOn?.ToString("u", CultureInfo.InvariantCulture)}]";
241236

242237
}
243238
}

src/redmine-net-api/Types/CustomField.cs

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -290,22 +290,6 @@ public override int GetHashCode()
290290
}
291291
#endregion
292292

293-
private string DebuggerDisplay =>
294-
$@"[{nameof(CustomField)}: {ToString()}
295-
, CustomizedType={CustomizedType}
296-
, Description={Description}
297-
, FieldFormat={FieldFormat}
298-
, Regexp={Regexp}
299-
, MinLength={MinLength?.ToString(CultureInfo.InvariantCulture)}
300-
, MaxLength={MaxLength?.ToString(CultureInfo.InvariantCulture)}
301-
, IsRequired={IsRequired.ToString(CultureInfo.InvariantCulture)}
302-
, IsFilter={IsFilter.ToString(CultureInfo.InvariantCulture)}
303-
, Searchable={Searchable.ToString(CultureInfo.InvariantCulture)}
304-
, Multiple={Multiple.ToString(CultureInfo.InvariantCulture)}
305-
, DefaultValue={DefaultValue}
306-
, Visible={Visible.ToString(CultureInfo.InvariantCulture)}
307-
, PossibleValues={PossibleValues.Dump()}
308-
, Trackers={Trackers.Dump()}
309-
, Roles={Roles.Dump()}]";
293+
private string DebuggerDisplay => $"[CustomField: Id={Id.ToInvariantString()}, Name={Name}]";
310294
}
311295
}

src/redmine-net-api/Types/CustomFieldPossibleValue.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ public override int GetHashCode()
192192
///
193193
/// </summary>
194194
/// <returns></returns>
195-
private string DebuggerDisplay => $"[{nameof(CustomFieldPossibleValue)}: Label:{Label}, Value:{Value}]";
195+
private string DebuggerDisplay => $"[CustomFieldPossibleValue: Label:{Label}, Value:{Value}]";
196196

197197
}
198198
}

src/redmine-net-api/Types/CustomFieldRole.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ limitations under the License.
1616

1717
using System.Diagnostics;
1818
using System.Xml.Serialization;
19+
using Redmine.Net.Api.Extensions;
1920

2021
namespace Redmine.Net.Api.Types
2122
{
@@ -41,7 +42,7 @@ internal CustomFieldRole(int id, string name)
4142
///
4243
/// </summary>
4344
/// <returns></returns>
44-
private string DebuggerDisplay => $"[{nameof(CustomFieldRole)}: {ToString()}]";
45+
private string DebuggerDisplay => $"[CustomFieldRole: Id={Id.ToInvariantString()}, Name={Name}]";
4546

4647
}
4748
}

src/redmine-net-api/Types/CustomFieldValue.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,6 @@ public CustomFieldValue Clone(bool resetId)
217217
///
218218
/// </summary>
219219
/// <returns></returns>
220-
private string DebuggerDisplay => $"[{nameof(CustomFieldValue)}: {Info}]";
220+
private string DebuggerDisplay => $"[CustomFieldValue: {Info}]";
221221
}
222222
}

src/redmine-net-api/Types/Detail.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ public override int GetHashCode()
251251
///
252252
/// </summary>
253253
/// <returns></returns>
254-
private string DebuggerDisplay => $"[{nameof(Detail)}: Property={Property}, Name={Name}, OldValue={OldValue}, NewValue={NewValue}]";
254+
private string DebuggerDisplay => $"[Detail: Property={Property}, Name={Name}, OldValue={OldValue}, NewValue={NewValue}]";
255255

256256
}
257257
}

src/redmine-net-api/Types/DocumentCategory.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ public override int GetHashCode()
193193
///
194194
/// </summary>
195195
/// <returns></returns>
196-
private string DebuggerDisplay => $"[{nameof(DocumentCategory)}, IsDefault={IsDefault.ToString(CultureInfo.InvariantCulture)}, IsActive={IsActive.ToString(CultureInfo.InvariantCulture)}]";
196+
private string DebuggerDisplay => $"[DocumentCategory: Id={Id.ToInvariantString()}, Name={Name}, IsDefault={IsDefault.ToInvariantString()}, IsActive={IsActive.ToInvariantString()}]";
197197

198198
}
199199
}

src/redmine-net-api/Types/Error.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ public override int GetHashCode()
176176
///
177177
/// </summary>
178178
/// <returns></returns>
179-
private string DebuggerDisplay => $"[{nameof(Error)}: {Info}]";
179+
private string DebuggerDisplay => $"[Error: {Info}]";
180180

181181
}
182182
}

src/redmine-net-api/Types/File.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ public override int GetHashCode()
283283
///
284284
/// </summary>
285285
/// <returns></returns>
286-
private string DebuggerDisplay => $"[{nameof(File)}: {ToString()}, Name={Filename}]";
286+
private string DebuggerDisplay => $"[File: {Id.ToInvariantString()}, Name={Filename}]";
287287

288288
}
289289
}

0 commit comments

Comments
 (0)