* Optimized usings

* Shortened type references
* Removed redundant 'this' qualifier
This commit is contained in:
lbsa71
2007-10-30 09:05:31 +00:00
parent c32d1f0562
commit 67e12b95ea
353 changed files with 15459 additions and 10338 deletions

View File

@@ -26,13 +26,11 @@
*
*/
using System;
using System.Collections.Generic;
using System.Text;
using OpenSim.Framework.Servers;
using System.IO;
using System.Collections;
using System.IO;
using System.Text;
using libsecondlife;
using OpenSim.Framework.Servers;
namespace OpenSim.Region.Capabilities
{
@@ -42,11 +40,11 @@ namespace OpenSim.Region.Capabilities
private LLSDMethod<TRequest, TResponse> m_method;
public LLSDStreamhandler(string httpMethod, string path, LLSDMethod<TRequest, TResponse> method)
: base(httpMethod, path )
: base(httpMethod, path)
{
m_method = method;
}
public override byte[] Handle(string path, Stream request)
{
//Encoding encoding = Encoding.UTF8;
@@ -55,16 +53,15 @@ namespace OpenSim.Region.Capabilities
//string requestBody = streamReader.ReadToEnd();
//streamReader.Close();
Hashtable hash = (Hashtable)LLSD.LLSDDeserialize( request );
Hashtable hash = (Hashtable) LLSD.LLSDDeserialize(request);
TRequest llsdRequest = new TRequest();
LLSDHelpers.DeserialiseLLSDMap(hash, llsdRequest);
TResponse response = m_method(llsdRequest);
Encoding encoding = new UTF8Encoding(false);
return encoding.GetBytes( LLSDHelpers.SerialiseLLSDReply(response) );
return encoding.GetBytes(LLSDHelpers.SerialiseLLSDReply(response));
}
}
}
}