|
10 | 10 | using static ExpressionToString.FormatterNames; |
11 | 11 | using System.Collections; |
12 | 12 | using System.Runtime.CompilerServices; |
13 | | -using ExpressionTreeVisualizer.Util; |
14 | 13 | using static ExpressionToString.Globals; |
15 | 14 | using System.Reflection; |
16 | 15 | using System.Diagnostics; |
| 16 | +using System.Diagnostics.CodeAnalysis; |
17 | 17 |
|
18 | 18 | namespace ExpressionTreeVisualizer { |
19 | 19 | [Serializable] |
@@ -284,8 +284,8 @@ internal ExpressionNodeData(object o, (string aggregatePath, string pathFromPare |
284 | 284 | return new[] { (prp.Name, prp.GetValue(o), prp) }; |
285 | 285 | } |
286 | 286 | }) |
287 | | - .Where(x => x.Item2 != null) |
288 | | - .Select(x => new ExpressionNodeData(x.Item2, (FullPath ?? "", x.Item1), visualizerData, false, x.Item3, WatchExpressionFormatString)) |
| 287 | + .Where(x => x.x != null) |
| 288 | + .SelectT((relativePath, o1, prp) => new ExpressionNodeData(o1, (FullPath ?? "", relativePath), visualizerData, false, prp, WatchExpressionFormatString)) |
289 | 289 | .ToList(); |
290 | 290 |
|
291 | 291 | // populate URLs |
@@ -350,11 +350,29 @@ public void ClearSelection() { |
350 | 350 | } |
351 | 351 |
|
352 | 352 | [Serializable] |
| 353 | + [SuppressMessage("", "IDE0032", Justification = "https://github.com/dotnet/core/issues/2981")] |
353 | 354 | public struct EndNodeData { |
354 | | - public string Closure { get; set; } |
355 | | - public string Name { get; set; } |
356 | | - public string Type { get; set; } |
357 | | - public string Value { get; set; } |
| 355 | + private string _closure; |
| 356 | + private string _name; |
| 357 | + private string _type; |
| 358 | + private string _value; |
| 359 | + |
| 360 | + public string Closure { |
| 361 | + get => _closure; |
| 362 | + set => _closure = value; |
| 363 | + } |
| 364 | + public string Name { |
| 365 | + get => _name; |
| 366 | + set => _name = value; |
| 367 | + } |
| 368 | + public string Type { |
| 369 | + get => _type; |
| 370 | + set => _type = value; |
| 371 | + } |
| 372 | + public string Value { |
| 373 | + get => _value; |
| 374 | + set => _value = value; |
| 375 | + } |
358 | 376 | } |
359 | 377 |
|
360 | 378 | public enum EndNodeTypes { |
|
0 commit comments