From f010d398cfedded42441c28489aaaf8f4d569c27 Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Fri, 4 Apr 2008 18:14:00 +0000 Subject: make AssetBase use Properties instead of fields. This probably breaks compatibility on grid ops because native serialization is used here. --- OpenSim/Framework/AssetBase.cs | 61 ++++++++++++++++++++++++++++++++++++------ 1 file changed, 53 insertions(+), 8 deletions(-) diff --git a/OpenSim/Framework/AssetBase.cs b/OpenSim/Framework/AssetBase.cs index 864db10..ab09ac3 100644 --- a/OpenSim/Framework/AssetBase.cs +++ b/OpenSim/Framework/AssetBase.cs @@ -33,14 +33,14 @@ namespace OpenSim.Framework [Serializable] public class AssetBase { - public byte[] Data; - public LLUUID FullID; - public sbyte Type; - public sbyte InvType; - public string Name = String.Empty; - public string Description = String.Empty; - public bool Local = false; - public bool Temporary = false; + private byte[] _data; + private LLUUID _fullid; + private sbyte _type; + private sbyte _invtype; + private string _name = String.Empty; + private string _description = String.Empty; + private bool _local = false; + private bool _temporary = false; public AssetBase() { @@ -51,5 +51,50 @@ namespace OpenSim.Framework FullID = assetId; Name = name; } + + public virtual LLUUID FullID { + get { return _fullid; } + set { _fullid = value; } + } + + public virtual string ID { + get { return _fullid.ToString(); } + set { _fullid = new LLUUID(value); } + } + + public virtual byte[] Data { + get { return _data; } + set { _data = value; } + } + + public virtual sbyte Type { + get { return _type; } + set { _type = value; } + } + + public virtual sbyte InvType { + get { return _invtype; } + set { _invtype = value; } + } + + public virtual string Name { + get { return _name; } + set { _name = value; } + } + + public virtual string Description { + get { return _description; } + set { _description = value; } + } + + public virtual bool Local { + get { return _local; } + set { _local = value; } + } + + public virtual bool Temporary { + get { return _temporary; } + set { _temporary = value; } + } } } -- cgit v1.1