From 4a21d926684f013aaaa1c349d3d1c11f3d614381 Mon Sep 17 00:00:00 2001 From: Mike Mazur Date: Fri, 13 Mar 2009 05:58:32 +0000 Subject: Mark AssetBase.Metadata with [XmlIgnore] --- OpenSim/Framework/AssetBase.cs | 14 +++++--------- .../Plugins/OpenSim/OpenSimAssetStoragePlugin.cs | 2 +- .../Plugins/Simple/SimpleAssetStoragePlugin.cs | 4 ++-- 3 files changed, 8 insertions(+), 12 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Framework/AssetBase.cs b/OpenSim/Framework/AssetBase.cs index f3dd70a..5c311c0 100644 --- a/OpenSim/Framework/AssetBase.cs +++ b/OpenSim/Framework/AssetBase.cs @@ -26,6 +26,7 @@ */ using System; +using System.Xml.Serialization; using OpenMetaverse; namespace OpenSim.Framework @@ -96,16 +97,11 @@ namespace OpenSim.Framework set { m_metadata.Temporary = value; } } - // We have methods here because properties are serialized, and we don't - // want that. - public virtual AssetMetadata getMetadata() + [XmlIgnore] + public AssetMetadata Metadata { - return m_metadata; - } - - public virtual void setMetadata(AssetMetadata metadata) - { - m_metadata = metadata; + get { return m_metadata; } + set { m_metadata = value; } } } diff --git a/OpenSim/Grid/AssetInventoryServer/Plugins/OpenSim/OpenSimAssetStoragePlugin.cs b/OpenSim/Grid/AssetInventoryServer/Plugins/OpenSim/OpenSimAssetStoragePlugin.cs index 4b0dd7f..0631ee7 100644 --- a/OpenSim/Grid/AssetInventoryServer/Plugins/OpenSim/OpenSimAssetStoragePlugin.cs +++ b/OpenSim/Grid/AssetInventoryServer/Plugins/OpenSim/OpenSimAssetStoragePlugin.cs @@ -62,7 +62,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim if (asset == null) ret = BackendResponse.NotFound; else { - metadata = asset.getMetadata(); + metadata = asset.Metadata; ret = BackendResponse.Success; } diff --git a/OpenSim/Grid/AssetInventoryServer/Plugins/Simple/SimpleAssetStoragePlugin.cs b/OpenSim/Grid/AssetInventoryServer/Plugins/Simple/SimpleAssetStoragePlugin.cs index 890a6a0..4ec2d96 100644 --- a/OpenSim/Grid/AssetInventoryServer/Plugins/Simple/SimpleAssetStoragePlugin.cs +++ b/OpenSim/Grid/AssetInventoryServer/Plugins/Simple/SimpleAssetStoragePlugin.cs @@ -97,7 +97,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.Simple public BackendResponse TryFetchDataMetadata(UUID assetID, out AssetBase asset) { asset = new AssetBase(); - AssetMetadata metadata = asset.getMetadata(); + AssetMetadata metadata = asset.Metadata; string filename; BackendResponse ret; @@ -139,7 +139,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.Simple public BackendResponse TryCreateAsset(AssetBase asset) { BackendResponse ret; - AssetMetadata metadata = asset.getMetadata(); + AssetMetadata metadata = asset.Metadata; string path; string filename = String.Format("{0}.{1}", asset.FullID, Utils.ContentTypeToExtension(metadata.ContentType)); -- cgit v1.1