byte[] GetAbuseReports(Dictionary <string, object> request) { List <AbuseReport> ars = m_AbuseReportsService.GetAbuseReports(int.Parse(request["start"].ToString()), int.Parse(request["count"].ToString()), request["filter"].ToString()); Dictionary <string, object> returnvalue = new Dictionary <string, object>(); foreach (AbuseReport ar in ars) { returnvalue.Add(ar.Number.ToString(), ar); } string xmlString = WebUtils.BuildXmlResponse(returnvalue); //m_log.DebugFormat("[FRIENDS HANDLER]: resp string: {0}", xmlString); UTF8Encoding encoding = new UTF8Encoding(); return(encoding.GetBytes(xmlString)); }
byte[] GetAbuseReports(OSDMap map) { OSDMap resp = new OSDMap(); IAbuseReports ar = m_registry.RequestModuleInterface <IAbuseReports>(); List <AbuseReport> lar = ar.GetAbuseReports(map["start"].AsInteger(), map["count"].AsInteger(), map["filter"].AsString()); OSDArray returnvalue = new OSDArray(); foreach (AbuseReport tar in lar) { returnvalue.Add(tar.ToOSD()); } resp["abusereports"] = returnvalue; string xmlString = OSDParser.SerializeJsonString(resp); UTF8Encoding encoding = new UTF8Encoding(); return(encoding.GetBytes(xmlString)); }
private byte[] GetAbuseReports(Dictionary <string, object> request) { List <AbuseReport> ars = m_AbuseReportsService.GetAbuseReports(int.Parse(request["start"].ToString()), int.Parse(request["count"].ToString()), request["filter"].ToString()); #if (!ISWIN) Dictionary <string, object> returnvalue = new Dictionary <string, object>(); foreach (AbuseReport ar in ars) { returnvalue.Add(ar.Number.ToString(), ar); } #else Dictionary <string, object> returnvalue = ars.ToDictionary <AbuseReport, string, object>(ar => ar.Number.ToString(), ar => ar); #endif string xmlString = WebUtils.BuildXmlResponse(returnvalue); //MainConsole.Instance.DebugFormat("[FRIENDS HANDLER]: resp string: {0}", xmlString); UTF8Encoding encoding = new UTF8Encoding(); return(encoding.GetBytes(xmlString)); }