2006-07-18 22:24:42 +00:00
|
|
|
using System;
|
|
|
|
|
|
|
|
|
|
using libsecondlife;
|
|
|
|
|
using libsecondlife.AssetSystem;
|
|
|
|
|
|
|
|
|
|
namespace libsecondlife.InventorySystem
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Summary description for Class1.
|
|
|
|
|
/// </summary>
|
|
|
|
|
abstract public class InventoryBase
|
|
|
|
|
{
|
|
|
|
|
protected InventoryManager iManager;
|
|
|
|
|
|
|
|
|
|
internal string _Name;
|
|
|
|
|
|
|
|
|
|
internal InventoryBase(InventoryManager manager)
|
|
|
|
|
{
|
|
|
|
|
if( manager == null )
|
|
|
|
|
{
|
|
|
|
|
throw new Exception( "Inventory Manager cannot be null" );
|
|
|
|
|
}
|
|
|
|
|
iManager = manager;
|
|
|
|
|
}
|
|
|
|
|
|
2006-08-10 19:44:02 +00:00
|
|
|
abstract public string toXML( bool outputAssets );
|
2006-07-18 22:24:42 +00:00
|
|
|
|
|
|
|
|
protected string xmlSafe ( string str )
|
|
|
|
|
{
|
|
|
|
|
if( str != null )
|
|
|
|
|
{
|
|
|
|
|
string clean = str.Replace("&","&");
|
|
|
|
|
clean = clean.Replace("<","<");
|
|
|
|
|
clean = clean.Replace(">",">");
|
|
|
|
|
clean = clean.Replace("'","'");
|
|
|
|
|
clean = clean.Replace("\"",""");
|
|
|
|
|
return clean;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
return "";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|