private IEnumerable<Pair<String, Object>> ExploreImpl(Object obj) { if (obj != null) { if (!LeafCriterion(obj) && ShowTypeInProps) { yield return new Pair<string, object>( "$Type", SafeGet(() => obj.GetExplorableTypeInfo())); } if (!LeafCriterion(obj) && ShowToStringInProps) { yield return new Pair<string, object>( "$ToString", SafeGet(() => obj.ToString())); } if (ExplorePropsCriterion(obj)) { foreach (var pair in SafeExploreProps(obj)) { yield return pair; } } if (ExploreElementsCriterion(obj)) { foreach (var pair in SafeExploreElements(obj)) { yield return pair; } } } }