Skip to content

Commit

Permalink
Merge pull request #25 from MegaPiggy/yukieiji
Browse files Browse the repository at this point in the history
Add FlattenHierarchy to find special case of singletons
  • Loading branch information
yukieiji authored Oct 5, 2024
2 parents 21c1e2e + 165cc95 commit ba5c8f5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ObjectExplorer/SearchProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ internal static List<object> InstanceSearch(string input)
return instances;
}

BindingFlags flags = BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static;
BindingFlags flags = BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.FlattenHierarchy;

foreach (Assembly asm in AppDomain.CurrentDomain.GetAssemblies())
{
Expand All @@ -196,6 +196,6 @@ internal static List<object> InstanceSearch(string input)
}
}

return instances;
return instances.Distinct().ToList();
}
}

0 comments on commit ba5c8f5

Please sign in to comment.