Mark AssetBase.Metadata with [XmlIgnore]

0.6.5-rc1
Mike Mazur 2009-03-13 05:58:32 +00:00
parent bd41639a68
commit 4a21d92668
3 changed files with 8 additions and 12 deletions

View File

@ -26,6 +26,7 @@
*/ */
using System; using System;
using System.Xml.Serialization;
using OpenMetaverse; using OpenMetaverse;
namespace OpenSim.Framework namespace OpenSim.Framework
@ -96,16 +97,11 @@ namespace OpenSim.Framework
set { m_metadata.Temporary = value; } set { m_metadata.Temporary = value; }
} }
// We have methods here because properties are serialized, and we don't [XmlIgnore]
// want that. public AssetMetadata Metadata
public virtual AssetMetadata getMetadata()
{ {
return m_metadata; get { return m_metadata; }
} set { m_metadata = value; }
public virtual void setMetadata(AssetMetadata metadata)
{
m_metadata = metadata;
} }
} }

View File

@ -62,7 +62,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim
if (asset == null) ret = BackendResponse.NotFound; if (asset == null) ret = BackendResponse.NotFound;
else else
{ {
metadata = asset.getMetadata(); metadata = asset.Metadata;
ret = BackendResponse.Success; ret = BackendResponse.Success;
} }

View File

@ -97,7 +97,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.Simple
public BackendResponse TryFetchDataMetadata(UUID assetID, out AssetBase asset) public BackendResponse TryFetchDataMetadata(UUID assetID, out AssetBase asset)
{ {
asset = new AssetBase(); asset = new AssetBase();
AssetMetadata metadata = asset.getMetadata(); AssetMetadata metadata = asset.Metadata;
string filename; string filename;
BackendResponse ret; BackendResponse ret;
@ -139,7 +139,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.Simple
public BackendResponse TryCreateAsset(AssetBase asset) public BackendResponse TryCreateAsset(AssetBase asset)
{ {
BackendResponse ret; BackendResponse ret;
AssetMetadata metadata = asset.getMetadata(); AssetMetadata metadata = asset.Metadata;
string path; string path;
string filename = String.Format("{0}.{1}", asset.FullID, Utils.ContentTypeToExtension(metadata.ContentType)); string filename = String.Format("{0}.{1}", asset.FullID, Utils.ContentTypeToExtension(metadata.ContentType));