Fixing ObjectDumper duplicated attributes

--HG--
branch : dev
This commit is contained in:
Sebastien Ros 2011-02-11 18:14:00 -08:00
parent da189c2427
commit 526aa949bf

View File

@ -68,20 +68,15 @@ namespace Orchard.DesignerTools.Services {
}
private void DumpObject(object o, string name) {
if (_parents.Count >= _levels) {
_node.Add(
new XElement("div", new XAttribute("class", "name"), name),
new XElement("div", new XAttribute("class", "object last"), o)
);
return;
}
_node.Add(
new XElement("div", new XAttribute("class", "name"), name),
new XElement("div", new XAttribute("class", "type"), FormatType(o.GetType()))
);
if (_parents.Count >= _levels) {
return;
}
if (o is IDictionary) {
DumpDictionary((IDictionary)o);
}