diff options
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r-- | OpenSim/Framework/TaskInventoryItem.cs | 44 |
1 files changed, 17 insertions, 27 deletions
diff --git a/OpenSim/Framework/TaskInventoryItem.cs b/OpenSim/Framework/TaskInventoryItem.cs index 91c952d..c9c8054 100644 --- a/OpenSim/Framework/TaskInventoryItem.cs +++ b/OpenSim/Framework/TaskInventoryItem.cs | |||
@@ -67,41 +67,31 @@ namespace OpenSim.Framework | |||
67 | // see IXmlSerializable | 67 | // see IXmlSerializable |
68 | public void ReadXml(XmlReader reader) | 68 | public void ReadXml(XmlReader reader) |
69 | { | 69 | { |
70 | m_log.DebugFormat( | 70 | m_log.DebugFormat("[TASK INVENTORY]: ReadXml current node before actions, {0}", reader.Name); |
71 | "[TASK INVENTORY]: Initial task inventory deserialization CanDeserialize() call was {0}", | 71 | |
72 | tiiSerializer.CanDeserialize(reader)); | 72 | if (!reader.IsEmptyElement) |
73 | |||
74 | reader.Read(); | ||
75 | while (tiiSerializer.CanDeserialize(reader)) | ||
76 | { | 73 | { |
77 | TaskInventoryItem item = (TaskInventoryItem)tiiSerializer.Deserialize(reader); | 74 | reader.Read(); |
78 | Add(item.ItemID, item); | 75 | while (tiiSerializer.CanDeserialize(reader)) |
76 | { | ||
77 | TaskInventoryItem item = (TaskInventoryItem)tiiSerializer.Deserialize(reader); | ||
78 | Add(item.ItemID, item); | ||
79 | |||
80 | m_log.DebugFormat("[TASK INVENTORY]: Instanted prim item {0}, {1} from xml", item.Name, item.ItemID); | ||
81 | } | ||
79 | 82 | ||
80 | // m_log.DebugFormat("[TASK INVENTORY]: Instanted prim item {0}, {1} from xml", item.Name, item.ItemID); | 83 | m_log.DebugFormat("[TASK INVENTORY]: Instantiated {0} prim items in total from xml", Count); |
84 | } | ||
85 | else | ||
86 | { | ||
87 | m_log.DebugFormat("[TASK INVENTORY]: Skipping empty element {0}", reader.Name); | ||
81 | } | 88 | } |
82 | |||
83 | // m_log.DebugFormat("[TASK INVENTORY]: Instantiated {0} prim items in total from xml", Count); | ||
84 | 89 | ||
85 | // For some .net implementations, this last read is necessary so that we advance beyond the end tag | 90 | // For some .net implementations, this last read is necessary so that we advance beyond the end tag |
86 | // of the element wrapping this object so that the rest of the serialization can complete normally. | 91 | // of the element wrapping this object so that the rest of the serialization can complete normally. |
87 | reader.Read(); | 92 | reader.Read(); |
88 | 93 | ||
89 | // m_log.DebugFormat("[TASK INVENTORY]: Current node {0}", reader.Name); | 94 | m_log.DebugFormat("[TASK INVENTORY]: ReadXml Current node after actions, {0}", reader.Name); |
90 | |||
91 | // reader.Read(); | ||
92 | // while (reader.Name.Equals("TaskInventoryItem")) | ||
93 | // { | ||
94 | // TaskInventoryItem item = (TaskInventoryItem)tiiSerializer.Deserialize(reader); | ||
95 | // Add(item.ItemID, item); | ||
96 | // } | ||
97 | |||
98 | // ICollection<TaskInventoryItem> items | ||
99 | // = (ICollection<TaskInventoryItem>)tiiSerializer.Deserialize(reader); | ||
100 | // | ||
101 | // foreach (TaskInventoryItem item in items) | ||
102 | // { | ||
103 | // Add(item.ItemID, item); | ||
104 | // } | ||
105 | } | 95 | } |
106 | 96 | ||
107 | // see IXmlSerializable | 97 | // see IXmlSerializable |