diff options
* Optimized usings (the 'LL ate my scripts' commit)
* added some licensing info
Diffstat (limited to 'OpenSim/Region/Capabilities/LLSDHelpers.cs')
-rw-r--r-- | OpenSim/Region/Capabilities/LLSDHelpers.cs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/OpenSim/Region/Capabilities/LLSDHelpers.cs b/OpenSim/Region/Capabilities/LLSDHelpers.cs index 76d9345..19ef0c9 100644 --- a/OpenSim/Region/Capabilities/LLSDHelpers.cs +++ b/OpenSim/Region/Capabilities/LLSDHelpers.cs | |||
@@ -27,9 +27,8 @@ | |||
27 | */ | 27 | */ |
28 | using System; | 28 | using System; |
29 | using System.Collections; | 29 | using System.Collections; |
30 | using System.Collections.Generic; | ||
31 | using System.Text; | ||
32 | using System.IO; | 30 | using System.IO; |
31 | using System.Reflection; | ||
33 | using System.Xml; | 32 | using System.Xml; |
34 | using libsecondlife; | 33 | using libsecondlife; |
35 | 34 | ||
@@ -43,7 +42,7 @@ namespace OpenSim.Region.Capabilities | |||
43 | XmlTextWriter writer = new XmlTextWriter(sw); | 42 | XmlTextWriter writer = new XmlTextWriter(sw); |
44 | writer.Formatting = Formatting.None; | 43 | writer.Formatting = Formatting.None; |
45 | writer.WriteStartElement(String.Empty, "llsd", String.Empty); | 44 | writer.WriteStartElement(String.Empty, "llsd", String.Empty); |
46 | LLSDHelpers.SerializeLLSDType(writer, obj); | 45 | SerializeLLSDType(writer, obj); |
47 | writer.WriteEndElement(); | 46 | writer.WriteEndElement(); |
48 | writer.Close(); | 47 | writer.Close(); |
49 | return sw.ToString(); | 48 | return sw.ToString(); |
@@ -59,7 +58,7 @@ namespace OpenSim.Region.Capabilities | |||
59 | { | 58 | { |
60 | case "MAP": | 59 | case "MAP": |
61 | writer.WriteStartElement(String.Empty, "map", String.Empty); | 60 | writer.WriteStartElement(String.Empty, "map", String.Empty); |
62 | System.Reflection.FieldInfo[] fields = myType.GetFields(); | 61 | FieldInfo[] fields = myType.GetFields(); |
63 | for (int i = 0; i < fields.Length; i++) | 62 | for (int i = 0; i < fields.Length; i++) |
64 | { | 63 | { |
65 | object fieldValue = fields[i].GetValue(obj); | 64 | object fieldValue = fields[i].GetValue(obj); |
@@ -115,7 +114,7 @@ namespace OpenSim.Region.Capabilities | |||
115 | IDictionaryEnumerator enumerator = llsd.GetEnumerator(); | 114 | IDictionaryEnumerator enumerator = llsd.GetEnumerator(); |
116 | while (enumerator.MoveNext()) | 115 | while (enumerator.MoveNext()) |
117 | { | 116 | { |
118 | System.Reflection.FieldInfo field = myType.GetField((string)enumerator.Key); | 117 | FieldInfo field = myType.GetField((string)enumerator.Key); |
119 | if (field != null) | 118 | if (field != null) |
120 | { | 119 | { |
121 | if (enumerator.Value is Hashtable) | 120 | if (enumerator.Value is Hashtable) |