From f1f0bc23f4501ba99035283d3407ddad2b21b785 Mon Sep 17 00:00:00 2001
From: Jeff Ames
Date: Sun, 12 Sep 2010 13:43:49 -0400
Subject: Formatting cleanup.
---
OpenSim/Framework/PrimitiveBaseShape.cs | 74 ++++++++++++++++-----------------
1 file changed, 37 insertions(+), 37 deletions(-)
(limited to 'OpenSim/Framework/PrimitiveBaseShape.cs')
diff --git a/OpenSim/Framework/PrimitiveBaseShape.cs b/OpenSim/Framework/PrimitiveBaseShape.cs
index 70a61cc..0a81363 100644
--- a/OpenSim/Framework/PrimitiveBaseShape.cs
+++ b/OpenSim/Framework/PrimitiveBaseShape.cs
@@ -175,7 +175,7 @@ namespace OpenSim.Framework
}
}
}
-
+
///
/// Entries to store media textures on each face
///
@@ -1216,28 +1216,28 @@ namespace OpenSim.Framework
prim.Properties.Permissions = new Permissions();
prim.Properties.SalePrice = 10;
prim.Properties.SaleType = new SaleType();
-
+
return prim;
}
-
+
///
/// Encapsulates a list of media entries.
///
- /// This class is necessary because we want to replace auto-serialization of MediaEntry with something more
+ /// This class is necessary because we want to replace auto-serialization of MediaEntry with something more
/// OSD like and less vulnerable to change.
public class MediaList : List, IXmlSerializable
- {
+ {
public const string MEDIA_TEXTURE_TYPE = "sl";
-
+
public MediaList() : base() {}
public MediaList(IEnumerable collection) : base(collection) {}
public MediaList(int capacity) : base(capacity) {}
-
+
public XmlSchema GetSchema()
{
return null;
}
-
+
public string ToXml()
{
lock (this)
@@ -1245,78 +1245,78 @@ namespace OpenSim.Framework
using (StringWriter sw = new StringWriter())
{
using (XmlTextWriter xtw = new XmlTextWriter(sw))
- {
+ {
xtw.WriteStartElement("OSMedia");
xtw.WriteAttributeString("type", MEDIA_TEXTURE_TYPE);
xtw.WriteAttributeString("version", "0.1");
-
+
OSDArray meArray = new OSDArray();
foreach (MediaEntry me in this)
{
OSD osd = (null == me ? new OSD() : me.GetOSD());
meArray.Add(osd);
- }
-
+ }
+
xtw.WriteStartElement("OSData");
xtw.WriteRaw(OSDParser.SerializeLLSDXmlString(meArray));
xtw.WriteEndElement();
-
+
xtw.WriteEndElement();
-
- xtw.Flush();
+
+ xtw.Flush();
return sw.ToString();
}
- }
- }
+ }
+ }
}
-
+
public void WriteXml(XmlWriter writer)
- {
+ {
writer.WriteRaw(ToXml());
}
-
+
public static MediaList FromXml(string rawXml)
{
MediaList ml = new MediaList();
ml.ReadXml(rawXml);
return ml;
}
-
+
public void ReadXml(string rawXml)
- {
+ {
using (StringReader sr = new StringReader(rawXml))
{
using (XmlTextReader xtr = new XmlTextReader(sr))
- {
+ {
xtr.MoveToContent();
-
+
string type = xtr.GetAttribute("type");
//m_log.DebugFormat("[MOAP]: Loaded media texture entry with type {0}", type);
-
+
if (type != MEDIA_TEXTURE_TYPE)
- return;
-
- xtr.ReadStartElement("OSMedia");
-
+ return;
+
+ xtr.ReadStartElement("OSMedia");
+
OSDArray osdMeArray = (OSDArray)OSDParser.DeserializeLLSDXml(xtr.ReadInnerXml());
foreach (OSD osdMe in osdMeArray)
{
MediaEntry me = (osdMe is OSDMap ? MediaEntry.FromOSD(osdMe) : new MediaEntry());
Add(me);
}
-
- xtr.ReadEndElement();
+
+ xtr.ReadEndElement();
}
}
- }
-
+ }
+
public void ReadXml(XmlReader reader)
{
if (reader.IsEmptyElement)
return;
-
+
ReadXml(reader.ReadInnerXml());
- }
+ }
}
- }
-}
\ No newline at end of file
+ }
+}
--
cgit v1.1