Browse Source

Fixed a bug in ObjectGraphBuilder caused by recently added "Properties first, then fields" sorting.

pull/15/head
mkonicek 15 years ago
parent
commit
af0f9cbdd5
  1. 3
      src/AddIns/Debugger/Debugger.AddIn/Visualizers/Graph/ObjectGraph/ObjectGraphBuilder.cs

3
src/AddIns/Debugger/Debugger.AddIn/Visualizers/Graph/ObjectGraph/ObjectGraphBuilder.cs

@ -178,11 +178,12 @@ namespace Debugger.AddIn.Visualizers.Graph
{ {
thisObject = thisObject.CastToIList(); thisObject = thisObject.CastToIList();
int listCount = thisObject.GetIListCount(); int listCount = thisObject.GetIListCount();
PropertyInfo indexerProp = iListType.GetProperty("Item");
for (int i = 0; i < listCount; i++) { for (int i = 0; i < listCount; i++) {
Expression itemExpr = thisObject.AppendIndexer(i); Expression itemExpr = thisObject.AppendIndexer(i);
PropertyNode itemNode = new PropertyNode( PropertyNode itemNode = new PropertyNode(
new ObjectGraphProperty { Name = "[" + i + "]", Expression = itemExpr, Value = "", IsAtomic = true, TargetNode = null }); new ObjectGraphProperty { Name = "[" + i + "]", MemberInfo = indexerProp, Expression = itemExpr, Value = "", IsAtomic = true, TargetNode = null });
node.AddChild(itemNode); node.AddChild(itemNode);
} }
} }

Loading…
Cancel
Save