aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/General/InventoryItemBase.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework/General/InventoryItemBase.cs')
-rw-r--r--OpenSim/Framework/General/InventoryItemBase.cs30
1 files changed, 29 insertions, 1 deletions
diff --git a/OpenSim/Framework/General/InventoryItemBase.cs b/OpenSim/Framework/General/InventoryItemBase.cs
index 45700ae..f782913 100644
--- a/OpenSim/Framework/General/InventoryItemBase.cs
+++ b/OpenSim/Framework/General/InventoryItemBase.cs
@@ -25,6 +25,9 @@
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System;
29using System.Xml.Serialization;
30using System.Collections;
28using System.Collections.Generic; 31using System.Collections.Generic;
29using libsecondlife; 32using libsecondlife;
30 33
@@ -242,4 +245,29 @@ namespace OpenSim.Framework
242 /// <param name="folder">The id of the folder</param> 245 /// <param name="folder">The id of the folder</param>
243 void deleteInventoryFolder(LLUUID folder); 246 void deleteInventoryFolder(LLUUID folder);
244 } 247 }
245} \ No newline at end of file 248
249 /*
250 * .Net has some issues, serializing a dictionary, so we cannot reuse the InventoryFolder
251 * class defined in Communications.Framework.Communications.Caches. So we serialize/deserialize
252 * into this simpler class, and then use that.
253 */
254 [XmlRoot(ElementName = "inventory", IsNullable = true)]
255 public class SerializableInventory
256 {
257 [XmlRoot(ElementName = "folder", IsNullable = true)]
258 public class SerializableFolder : InventoryFolderBase
259 {
260 [XmlArray(ElementName = "folders", IsNullable = true)]
261 [XmlArrayItem(ElementName = "folder", IsNullable = true, Type = typeof(SerializableFolder))]
262 public ArrayList SubFolders;
263
264 [XmlArray(ElementName = "items", IsNullable = true)]
265 [XmlArrayItem(ElementName = "item", IsNullable = true, Type = typeof(InventoryItemBase))]
266 public ArrayList Items;
267 }
268
269 [XmlElement(ElementName = "folder", IsNullable = true)]
270 public SerializableFolder root;
271 }
272
273}