aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Capabilities/LLSD.cs
diff options
context:
space:
mode:
authorUbitUmarov2018-07-14 14:05:47 +0100
committerUbitUmarov2018-07-14 14:05:47 +0100
commitc7baee16380d67cecf7397258820eb50e2968eca (patch)
tree953049b7ec8bdaf4d6dcfc25dab84a655ca60759 /OpenSim/Capabilities/LLSD.cs
parentmissed one (diff)
downloadopensim-SC-c7baee16380d67cecf7397258820eb50e2968eca.zip
opensim-SC-c7baee16380d67cecf7397258820eb50e2968eca.tar.gz
opensim-SC-c7baee16380d67cecf7397258820eb50e2968eca.tar.bz2
opensim-SC-c7baee16380d67cecf7397258820eb50e2968eca.tar.xz
add using into a few more places
Diffstat (limited to '')
-rw-r--r--OpenSim/Capabilities/LLSD.cs20
1 files changed, 10 insertions, 10 deletions
diff --git a/OpenSim/Capabilities/LLSD.cs b/OpenSim/Capabilities/LLSD.cs
index 76e439f..342164d 100644
--- a/OpenSim/Capabilities/LLSD.cs
+++ b/OpenSim/Capabilities/LLSD.cs
@@ -107,17 +107,17 @@ namespace OpenSim.Framework.Capabilities
107 /// <returns></returns> 107 /// <returns></returns>
108 public static byte[] LLSDSerialize(object obj) 108 public static byte[] LLSDSerialize(object obj)
109 { 109 {
110 StringWriter sw = new StringWriter(); 110 using(StringWriter sw = new StringWriter())
111 XmlTextWriter writer = new XmlTextWriter(sw); 111 using(XmlTextWriter writer = new XmlTextWriter(sw))
112 writer.Formatting = Formatting.None; 112 {
113 113 writer.Formatting = Formatting.None;
114 writer.WriteStartElement(String.Empty, "llsd", String.Empty);
115 LLSDWriteOne(writer, obj);
116 writer.WriteEndElement();
117
118 writer.Close();
119 114
120 return Util.UTF8.GetBytes(sw.ToString()); 115 writer.WriteStartElement(String.Empty, "llsd", String.Empty);
116 LLSDWriteOne(writer, obj);
117 writer.WriteEndElement();
118 writer.Flush();
119 return Util.UTF8.GetBytes(sw.ToString());
120 }
121 } 121 }
122 122
123 /// <summary> 123 /// <summary>